@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | * Show the container only on terms from the specified taxonomies. |
| 188 | 188 | * |
| 189 | 189 | * @param string|array $taxonomies |
| 190 | - * @return object $this |
|
| 190 | + * @return Term_Meta_Container $this |
|
| 191 | 191 | **/ |
| 192 | 192 | public function show_on_taxonomy( $taxonomies ) { |
| 193 | 193 | $taxonomies = (array) $taxonomies; |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | * Show the container only on particular term level. |
| 202 | 202 | * |
| 203 | 203 | * @param int $term_level |
| 204 | - * @return object $this |
|
| 204 | + * @return Term_Meta_Container $this |
|
| 205 | 205 | */ |
| 206 | 206 | public function show_on_level( $term_level ) { |
| 207 | 207 | $this->settings['show_on_level'] = $term_level; |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | * Show the container only on particular page referenced by it's path. |
| 343 | 343 | * |
| 344 | 344 | * @param int|string $page page ID or page path |
| 345 | - * @return object $this |
|
| 345 | + * @return Post_Meta_Container $this |
|
| 346 | 346 | **/ |
| 347 | 347 | public function show_on_page( $page ) { |
| 348 | 348 | $page_id = absint( $page ); |
@@ -368,7 +368,7 @@ discard block |
||
| 368 | 368 | * Show the container only on pages whose parent is referenced by $parent_page_path. |
| 369 | 369 | * |
| 370 | 370 | * @param string $parent_page_path |
| 371 | - * @return object $this |
|
| 371 | + * @return Post_Meta_Container $this |
|
| 372 | 372 | **/ |
| 373 | 373 | public function show_on_page_children( $parent_page_path ) { |
| 374 | 374 | $page = get_page_by_path( $parent_page_path ); |
@@ -390,7 +390,7 @@ discard block |
||
| 390 | 390 | * @see show_on_taxonomy_term() |
| 391 | 391 | * |
| 392 | 392 | * @param string $category_slug |
| 393 | - * @return object $this |
|
| 393 | + * @return Post_Meta_Container $this |
|
| 394 | 394 | **/ |
| 395 | 395 | public function show_on_category( $category_slug ) { |
| 396 | 396 | $this->settings['show_on']['category'] = $category_slug; |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | * Show the container only on pages whose template has filename $template_path. |
| 403 | 403 | * |
| 404 | 404 | * @param string|array $template_path |
| 405 | - * @return object $this |
|
| 405 | + * @return Post_Meta_Container $this |
|
| 406 | 406 | **/ |
| 407 | 407 | public function show_on_template( $template_path ) { |
| 408 | 408 | // Backwards compatibility where only pages support templates |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | * Hide the container from pages whose template has filename $template_path. |
| 428 | 428 | * |
| 429 | 429 | * @param string|array $template_path |
| 430 | - * @return object $this |
|
| 430 | + * @return Post_Meta_Container $this |
|
| 431 | 431 | **/ |
| 432 | 432 | public function hide_on_template( $template_path ) { |
| 433 | 433 | if ( is_array( $template_path ) ) { |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | * Levels start from 1 (top level post) |
| 448 | 448 | * |
| 449 | 449 | * @param int $level |
| 450 | - * @return object $this |
|
| 450 | + * @return Post_Meta_Container $this |
|
| 451 | 451 | **/ |
| 452 | 452 | public function show_on_level( $level ) { |
| 453 | 453 | if ( $level < 0 ) { |
@@ -464,7 +464,7 @@ discard block |
||
| 464 | 464 | * |
| 465 | 465 | * @param string $taxonomy_slug |
| 466 | 466 | * @param string $term_slug |
| 467 | - * @return object $this |
|
| 467 | + * @return Post_Meta_Container $this |
|
| 468 | 468 | **/ |
| 469 | 469 | public function show_on_taxonomy_term( $term_slug, $taxonomy_slug ) { |
| 470 | 470 | $term = get_term_by( 'slug', $term_slug, $taxonomy_slug ); |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | * Learn more about {@link http://codex.wordpress.org/Post_Formats Post Formats (Codex)} |
| 482 | 482 | * |
| 483 | 483 | * @param string|array $post_format Name of the format as listed on Codex |
| 484 | - * @return object $this |
|
| 484 | + * @return Post_Meta_Container $this |
|
| 485 | 485 | **/ |
| 486 | 486 | public function show_on_post_format( $post_format ) { |
| 487 | 487 | if ( is_array( $post_format ) ) { |
@@ -503,8 +503,8 @@ discard block |
||
| 503 | 503 | /** |
| 504 | 504 | * Show the container only on posts from the specified type(s). |
| 505 | 505 | * |
| 506 | - * @param string|array $post_types |
|
| 507 | - * @return object $this |
|
| 506 | + * @param string $post_types |
|
| 507 | + * @return Post_Meta_Container $this |
|
| 508 | 508 | **/ |
| 509 | 509 | public function show_on_post_type( $post_types ) { |
| 510 | 510 | $post_types = (array) $post_types; |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | /** |
| 41 | 41 | * Return a differently formatted value for end-users |
| 42 | 42 | * |
| 43 | - * @return mixed |
|
| 43 | + * @return boolean |
|
| 44 | 44 | **/ |
| 45 | 45 | public function get_formatted_value() { |
| 46 | 46 | return ( $this->get_value() === $this->option_value ); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * Checks whether the current request is valid |
| 47 | 47 | * |
| 48 | - * @return bool |
|
| 48 | + * @return null|boolean |
|
| 49 | 49 | **/ |
| 50 | 50 | public function is_valid_save( $user_id = 0 ) { |
| 51 | 51 | if ( ! $this->verified_nonce_in_request() ) { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * Check container attachment rules against object id |
| 97 | 97 | * |
| 98 | 98 | * @param int $object_id |
| 99 | - * @return bool |
|
| 99 | + * @return null|boolean |
|
| 100 | 100 | **/ |
| 101 | 101 | public function is_valid_attach_for_object( $object_id = null ) { |
| 102 | 102 | $valid = true; |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * Show the container only on users who have the $role role. |
| 252 | 252 | * |
| 253 | 253 | * @param string $role |
| 254 | - * @return object $this |
|
| 254 | + * @return User_Meta_Container $this |
|
| 255 | 255 | **/ |
| 256 | 256 | public function show_on_user_role( $role ) { |
| 257 | 257 | $this->settings['show_on']['role'] = (array) $role; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | * Show the container only for users who have either capabilities or roles setup |
| 264 | 264 | * |
| 265 | 265 | * @param array $show_for |
| 266 | - * @return object $this |
|
| 266 | + * @return User_Meta_Container $this |
|
| 267 | 267 | **/ |
| 268 | 268 | public function show_for( $show_for ) { |
| 269 | 269 | $this->settings['show_for'] = $this->parse_show_for( $show_for ); |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | * Check if a key is a legacy map property key |
| 72 | 72 | * |
| 73 | 73 | * @param string $key |
| 74 | - * @return bool |
|
| 74 | + * @return integer |
|
| 75 | 75 | */ |
| 76 | 76 | public function is_legacy_map_key( $key ) { |
| 77 | 77 | $map_regex = array_map( function( $map_key ) { |
@@ -136,7 +136,6 @@ discard block |
||
| 136 | 136 | * Get a key-value array of legacy values for fields in the container of the passed datastore |
| 137 | 137 | * |
| 138 | 138 | * @param Container $container |
| 139 | - * @param Datastore_Interface $datastore |
|
| 140 | 139 | * @return array |
| 141 | 140 | */ |
| 142 | 141 | protected function get_legacy_storage_array_from_database( Container $container ) { |