|
@@ 2816-2817 (lines=2) @@
|
| 2813 |
|
if ( false === $sanitized ) |
| 2814 |
|
$params = pods_sanitize( $params ); |
| 2815 |
|
|
| 2816 |
|
if ( !isset( $params->name ) || empty( $params->name ) ) |
| 2817 |
|
return pods_error( __( 'Name must be given to save an Object', 'pods' ), $this ); |
| 2818 |
|
|
| 2819 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 2820 |
|
return pods_error( __( 'Type must be given to save an Object', 'pods' ), $this ); |
|
@@ 2819-2820 (lines=2) @@
|
| 2816 |
|
if ( !isset( $params->name ) || empty( $params->name ) ) |
| 2817 |
|
return pods_error( __( 'Name must be given to save an Object', 'pods' ), $this ); |
| 2818 |
|
|
| 2819 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 2820 |
|
return pods_error( __( 'Type must be given to save an Object', 'pods' ), $this ); |
| 2821 |
|
|
| 2822 |
|
$object = array( |
| 2823 |
|
'id' => 0, |
|
@@ 6410-6411 (lines=2) @@
|
| 6407 |
|
else { |
| 6408 |
|
$params = (object) pods_sanitize( $params ); |
| 6409 |
|
|
| 6410 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 6411 |
|
return pods_error( __( 'Object type is required', 'pods' ), $this ); |
| 6412 |
|
|
| 6413 |
|
if ( ( !isset( $params->id ) || empty( $params->id ) ) && ( !isset( $params->name ) || empty( $params->name ) ) ) |
| 6414 |
|
return pods_error( __( 'Either Object ID or Name are required', 'pods' ), $this ); |
|
@@ 6473-6474 (lines=2) @@
|
| 6470 |
|
public function load_objects ( $params ) { |
| 6471 |
|
$params = (object) pods_sanitize( $params ); |
| 6472 |
|
|
| 6473 |
|
if ( !isset( $params->type ) || empty( $params->type ) ) |
| 6474 |
|
return pods_error( __( 'Pods Object type is required', 'pods' ), $this ); |
| 6475 |
|
|
| 6476 |
|
$order = 'ASC'; |
| 6477 |
|
$orderby = 'menu_order'; |
|
@@ 6726-6727 (lines=2) @@
|
| 6723 |
|
public function load_pod_item ( $params ) { |
| 6724 |
|
$params = (object) pods_sanitize( $params ); |
| 6725 |
|
|
| 6726 |
|
if ( !isset( $params->pod ) || empty( $params->pod ) ) |
| 6727 |
|
return pods_error( __( 'Pod name required', 'pods' ), $this ); |
| 6728 |
|
if ( !isset( $params->id ) || empty( $params->id ) ) |
| 6729 |
|
return pods_error( __( 'Item ID required', 'pods' ), $this ); |
| 6730 |
|
|
|
@@ 6728-6729 (lines=2) @@
|
| 6725 |
|
|
| 6726 |
|
if ( !isset( $params->pod ) || empty( $params->pod ) ) |
| 6727 |
|
return pods_error( __( 'Pod name required', 'pods' ), $this ); |
| 6728 |
|
if ( !isset( $params->id ) || empty( $params->id ) ) |
| 6729 |
|
return pods_error( __( 'Item ID required', 'pods' ), $this ); |
| 6730 |
|
|
| 6731 |
|
$pod = false; |
| 6732 |
|
|