diff --git a/classes/PodsAPI.php b/classes/PodsAPI.php index 7f9c86f734..cb1212e930 100644 --- a/classes/PodsAPI.php +++ b/classes/PodsAPI.php @@ -8333,7 +8333,7 @@ public function get_pod_type_count( $type ) { * * @param bool $strict Makes sure the pod exists, throws an error if it doesn't work. * - * @return Pods\Whatsit\Pod|false Pod object or false if not found. + * @return Pods\Whatsit\Pod|false|WP_Error Pod object or false if not found. * * @throws Exception * @since 1.7.9 diff --git a/classes/PodsForm.php b/classes/PodsForm.php index 47ba5d5fe2..ee8650208b 100644 --- a/classes/PodsForm.php +++ b/classes/PodsForm.php @@ -1,6 +1,7 @@ ID; @@ -4324,10 +4323,6 @@ public function update_meta( $object_type, $_null = null, $object_id = 0, $meta_ } $pod->data->row[ $meta_key ] = $meta_value; - - if ( isset( $meta_cache[ '_pods_' . $key ] ) && $field_object && in_array( $field_object['type'], $tableless_field_types, true ) ) { - unset( $meta_cache[ '_pods_' . $key ] ); - } } $pod->save( $meta_key, $meta_value, $object_id, array( @@ -4594,11 +4589,9 @@ public static function split_shared_term( $term_id, $new_term_id, $term_taxonomy /** * @param $id - * - * @return bool */ public function delete_user( $id ) { - return $this->delete_object( 'user', $id ); + $this->delete_object( 'user', $id ); } /** @@ -4607,17 +4600,14 @@ public function delete_user( $id ) { * @return bool */ public function delete_comment( $id ) { - return $this->delete_object( 'comment', $id ); + $this->delete_object( 'comment', $id ); } /** * @param $id - * - * @return bool */ public function delete_media( $id ) { - - return $this->delete_object( 'media', $id ); + $this->delete_object( 'media', $id ); } /** diff --git a/components/Pages.php b/components/Pages.php index ae48592f65..72cec141e5 100644 --- a/components/Pages.php +++ b/components/Pages.php @@ -632,7 +632,7 @@ public function clear_cache( $data, $pod = null, $id = null, $groups = null, $po * @param $text * @param $post * - * @return string|void + * @return string */ public function set_title_text( $text, $post ) { return __( 'Enter URL here', 'pods' ); @@ -991,7 +991,7 @@ public function page_check() { * * @param bool $pods_page * - * @return string + * @return string|false */ public static function content( $return = false, $pods_page = false ) { @@ -1060,6 +1060,8 @@ public static function content( $return = false, $pods_page = false ) { } echo $content; + + return ''; } /** @@ -1084,8 +1086,8 @@ public function precode() { if ( $permission ) { $content = false; - if ( ! is_object( $pods ) && 404 != $pods && 0 < strlen( (string) pods_var( 'pod', self::$exists['options'] ) ) ) { - $slug = pods_var_raw( 'pod_slug', self::$exists['options'], null, null, true ); + if ( ! is_object( $pods ) && 404 != $pods && 0 < strlen( (string) pods_v( 'pod', self::$exists['options'] ) ) ) { + $slug = pods_v( 'pod_slug', self::$exists['options'], null, null, true ); $has_slug = 0 < strlen( $slug ); @@ -1094,7 +1096,7 @@ public function precode() { $slug = pods_evaluate_tags( $slug, true ); } - $pods = pods_get_instance( pods_var( 'pod', self::$exists['options'] ), $slug ); + $pods = pods_get_instance( pods_v_sanitized( 'pod', self::$exists['options'] ), $slug ); // Auto 404 handling if item doesn't exist if ( $has_slug && ( empty( $slug ) || ! $pods->exists() ) && apply_filters( 'pods_pages_auto_404', true, $slug, $pods, self::$exists ) ) { diff --git a/components/Templates/Templates.php b/components/Templates/Templates.php index 7b742ab1fa..1886b9d219 100644 --- a/components/Templates/Templates.php +++ b/components/Templates/Templates.php @@ -420,7 +420,7 @@ public function clear_cache( $data, $pod = null, $id = null, $groups = null, $po * @param $text * @param $post * - * @return string|void + * @return string */ public function set_title_text( $text, $post ) { return __( 'Enter template name here', 'pods' );