File tree 1 file changed +20
-0
lines changed 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -8383,6 +8383,10 @@ public function load_pod( $params, $strict = false ) {
8383
8383
$ params = get_object_vars ( (object ) $ params );
8384
8384
}
8385
8385
8386
+ if ( ! empty ( $ params ['name ' ] ) && $ params ['name ' ] instanceof Pod ) {
8387
+ return $ params ['name ' ];
8388
+ }
8389
+
8386
8390
if ( empty ( $ params ) ) {
8387
8391
return false ;
8388
8392
}
@@ -8586,6 +8590,14 @@ public function load_field( $params, $strict = false ) {
8586
8590
$ params = get_object_vars ( (object ) $ params );
8587
8591
}
8588
8592
8593
+ if ( ! empty ( $ params ['name ' ] ) && $ params ['name ' ] instanceof Field ) {
8594
+ return $ params ['name ' ];
8595
+ }
8596
+
8597
+ if ( empty ( $ params ) ) {
8598
+ return false ;
8599
+ }
8600
+
8589
8601
// Check if we need to bypass cache automatically.
8590
8602
if ( ! isset ( $ params ['bypass_cache ' ] ) ) {
8591
8603
$ api_cache = pods_api_cache ();
@@ -8940,6 +8952,14 @@ public function load_group( $params, $strict = false ) {
8940
8952
$ params = get_object_vars ( (object ) $ params );
8941
8953
}
8942
8954
8955
+ if ( ! empty ( $ params ['name ' ] ) && $ params ['name ' ] instanceof Group ) {
8956
+ return $ params ['name ' ];
8957
+ }
8958
+
8959
+ if ( empty ( $ params ) ) {
8960
+ return false ;
8961
+ }
8962
+
8943
8963
// Check if we need to bypass cache automatically.
8944
8964
if ( ! isset ( $ params ['bypass_cache ' ] ) ) {
8945
8965
$ api_cache = pods_api_cache ();
You can’t perform that action at this time.
0 commit comments