@@ 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, |
|
@@ 6407-6408 (lines=2) @@ | ||
6404 | else { |
|
6405 | $params = (object) pods_sanitize( $params ); |
|
6406 | ||
6407 | if ( !isset( $params->type ) || empty( $params->type ) ) |
|
6408 | return pods_error( __( 'Object type is required', 'pods' ), $this ); |
|
6409 | ||
6410 | if ( ( !isset( $params->id ) || empty( $params->id ) ) && ( !isset( $params->name ) || empty( $params->name ) ) ) |
|
6411 | return pods_error( __( 'Either Object ID or Name are required', 'pods' ), $this ); |
|
@@ 6470-6471 (lines=2) @@ | ||
6467 | public function load_objects ( $params ) { |
|
6468 | $params = (object) pods_sanitize( $params ); |
|
6469 | ||
6470 | if ( !isset( $params->type ) || empty( $params->type ) ) |
|
6471 | return pods_error( __( 'Pods Object type is required', 'pods' ), $this ); |
|
6472 | ||
6473 | $order = 'ASC'; |
|
6474 | $orderby = 'menu_order'; |
|
@@ 6723-6724 (lines=2) @@ | ||
6720 | public function load_pod_item ( $params ) { |
|
6721 | $params = (object) pods_sanitize( $params ); |
|
6722 | ||
6723 | if ( !isset( $params->pod ) || empty( $params->pod ) ) |
|
6724 | return pods_error( __( 'Pod name required', 'pods' ), $this ); |
|
6725 | if ( !isset( $params->id ) || empty( $params->id ) ) |
|
6726 | return pods_error( __( 'Item ID required', 'pods' ), $this ); |
|
6727 | ||
@@ 6725-6726 (lines=2) @@ | ||
6722 | ||
6723 | if ( !isset( $params->pod ) || empty( $params->pod ) ) |
|
6724 | return pods_error( __( 'Pod name required', 'pods' ), $this ); |
|
6725 | if ( !isset( $params->id ) || empty( $params->id ) ) |
|
6726 | return pods_error( __( 'Item ID required', 'pods' ), $this ); |
|
6727 | ||
6728 | $pod = false; |
|
6729 |