|
@@ 2828-2829 (lines=2) @@
|
| 2825 |
|
if ( false === $sanitized ) |
| 2826 |
|
$params = pods_sanitize( $params ); |
| 2827 |
|
|
| 2828 |
|
if ( !isset( $params->name ) || empty( $params->name ) ) |
| 2829 |
|
return pods_error( __( 'Name must be given to save an Object', 'pods' ), $this ); |
| 2830 |
|
|
| 2831 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 2832 |
|
return pods_error( __( 'Type must be given to save an Object', 'pods' ), $this ); |
|
@@ 2831-2832 (lines=2) @@
|
| 2828 |
|
if ( !isset( $params->name ) || empty( $params->name ) ) |
| 2829 |
|
return pods_error( __( 'Name must be given to save an Object', 'pods' ), $this ); |
| 2830 |
|
|
| 2831 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 2832 |
|
return pods_error( __( 'Type must be given to save an Object', 'pods' ), $this ); |
| 2833 |
|
|
| 2834 |
|
$object = array( |
| 2835 |
|
'id' => 0, |
|
@@ 6457-6458 (lines=2) @@
|
| 6454 |
|
else { |
| 6455 |
|
$params = (object) pods_sanitize( $params ); |
| 6456 |
|
|
| 6457 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 6458 |
|
return pods_error( __( 'Object type is required', 'pods' ), $this ); |
| 6459 |
|
|
| 6460 |
|
if ( ( !isset( $params->id ) || empty( $params->id ) ) && ( !isset( $params->name ) || empty( $params->name ) ) ) |
| 6461 |
|
return pods_error( __( 'Either Object ID or Name are required', 'pods' ), $this ); |
|
@@ 6520-6521 (lines=2) @@
|
| 6517 |
|
public function load_objects ( $params ) { |
| 6518 |
|
$params = (object) pods_sanitize( $params ); |
| 6519 |
|
|
| 6520 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 6521 |
|
return pods_error( __( 'Pods Object type is required', 'pods' ), $this ); |
| 6522 |
|
|
| 6523 |
|
$order = 'ASC'; |
| 6524 |
|
$orderby = 'menu_order'; |
|
@@ 6773-6774 (lines=2) @@
|
| 6770 |
|
public function load_pod_item ( $params ) { |
| 6771 |
|
$params = (object) pods_sanitize( $params ); |
| 6772 |
|
|
| 6773 |
|
if ( !isset( $params->pod ) || empty( $params->pod ) ) |
| 6774 |
|
return pods_error( __( 'Pod name required', 'pods' ), $this ); |
| 6775 |
|
if ( !isset( $params->id ) || empty( $params->id ) ) |
| 6776 |
|
return pods_error( __( 'Item ID required', 'pods' ), $this ); |
| 6777 |
|
|
|
@@ 6775-6776 (lines=2) @@
|
| 6772 |
|
|
| 6773 |
|
if ( !isset( $params->pod ) || empty( $params->pod ) ) |
| 6774 |
|
return pods_error( __( 'Pod name required', 'pods' ), $this ); |
| 6775 |
|
if ( !isset( $params->id ) || empty( $params->id ) ) |
| 6776 |
|
return pods_error( __( 'Item ID required', 'pods' ), $this ); |
| 6777 |
|
|
| 6778 |
|
$pod = false; |
| 6779 |
|
|