@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | /** |
| 59 | 59 | * Checks whether the current request is valid |
| 60 | 60 | * |
| 61 | - * @return bool |
|
| 61 | + * @return null|boolean |
|
| 62 | 62 | **/ |
| 63 | 63 | function is_valid_save($user_id = 0) { |
| 64 | 64 | if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | * Perform checks whether the current save() request is valid |
| 77 | 77 | * |
| 78 | 78 | * @param int $user_id ID of the user against which save() is ran |
| 79 | - * @return bool |
|
| 79 | + * @return null|boolean |
|
| 80 | 80 | **/ |
| 81 | 81 | function is_valid_save_conditions($user_id) { |
| 82 | 82 | $valid = true; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | * Show the container only on users who have the $role role. |
| 107 | 107 | * |
| 108 | 108 | * @param string $role |
| 109 | - * @return object $this |
|
| 109 | + * @return User_Meta_Container $this |
|
| 110 | 110 | **/ |
| 111 | 111 | function show_on_user_role($role) { |
| 112 | 112 | $this->settings['show_on']['role'] = (array) $role; |
@@ -547,7 +547,7 @@ |
||
| 547 | 547 | * Recursive sorting function by array key. |
| 548 | 548 | * @param array &$array The input array. |
| 549 | 549 | * @param int $sort_flags Flags for controlling sorting behavior. |
| 550 | - * @return array Sorted array. |
|
| 550 | + * @return boolean Sorted array. |
|
| 551 | 551 | */ |
| 552 | 552 | public static function ksort_recursive( &$array, $sort_flags = SORT_REGULAR ) { |
| 553 | 553 | if (!is_array($array)) { |
@@ -433,8 +433,8 @@ discard block |
||
| 433 | 433 | /** |
| 434 | 434 | * Show the container only on pages whose parent is referenced by $parent_page_path. |
| 435 | 435 | * |
| 436 | - * @param string $page_path |
|
| 437 | - * @return object $this |
|
| 436 | + * @param string $parent_page_path |
|
| 437 | + * @return Post_Meta_Container $this |
|
| 438 | 438 | **/ |
| 439 | 439 | public function show_on_page_children( $parent_page_path ) { |
| 440 | 440 | $page = get_page_by_path( $parent_page_path ); |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | * Show the container only on particular page referenced by it's path. |
| 453 | 453 | * |
| 454 | 454 | * @param int|string $page page ID or page path |
| 455 | - * @return object $this |
|
| 455 | + * @return Post_Meta_Container $this |
|
| 456 | 456 | **/ |
| 457 | 457 | public function show_on_page( $page ) { |
| 458 | 458 | if ( is_int( $page ) ) { |
@@ -476,7 +476,7 @@ discard block |
||
| 476 | 476 | * @see show_on_taxonomy_term() |
| 477 | 477 | * |
| 478 | 478 | * @param string $category_slug |
| 479 | - * @return object $this |
|
| 479 | + * @return Post_Meta_Container $this |
|
| 480 | 480 | **/ |
| 481 | 481 | public function show_on_category( $category_slug ) { |
| 482 | 482 | $this->settings['show_on']['category'] = $category_slug; |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | * Show the container only on pages whose template has filename $template_path. |
| 489 | 489 | * |
| 490 | 490 | * @param string|array $template_path |
| 491 | - * @return object $this |
|
| 491 | + * @return Post_Meta_Container $this |
|
| 492 | 492 | **/ |
| 493 | 493 | public function show_on_template( $template_path ) { |
| 494 | 494 | if ( is_array( $template_path ) ) { |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | * Hide the container from pages whose template has filename $template_path. |
| 508 | 508 | * |
| 509 | 509 | * @param string|array $template_path |
| 510 | - * @return object $this |
|
| 510 | + * @return Post_Meta_Container $this |
|
| 511 | 511 | **/ |
| 512 | 512 | public function hide_on_template( $template_path ) { |
| 513 | 513 | if ( is_array( $template_path ) ) { |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | * Levels start from 1 (top level post) |
| 528 | 528 | * |
| 529 | 529 | * @param int $level |
| 530 | - * @return object $this |
|
| 530 | + * @return Post_Meta_Container $this |
|
| 531 | 531 | **/ |
| 532 | 532 | public function show_on_level( $level ) { |
| 533 | 533 | if ( $level < 0 ) { |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | * |
| 545 | 545 | * @param string $taxonomy_slug |
| 546 | 546 | * @param string $term_slug |
| 547 | - * @return object $this |
|
| 547 | + * @return Post_Meta_Container $this |
|
| 548 | 548 | **/ |
| 549 | 549 | public function show_on_taxonomy_term( $term_slug, $taxonomy_slug ) { |
| 550 | 550 | $term = get_term_by( 'slug', $term_slug, $taxonomy_slug ); |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | * Learn more about {@link http://codex.wordpress.org/Post_Formats Post Formats (Codex)} |
| 562 | 562 | * |
| 563 | 563 | * @param string|array $post_format Name of the format as listed on Codex |
| 564 | - * @return object $this |
|
| 564 | + * @return Post_Meta_Container $this |
|
| 565 | 565 | **/ |
| 566 | 566 | public function show_on_post_format( $post_format ) { |
| 567 | 567 | if ( is_array( $post_format ) ) { |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | * Show the container only on posts from the specified type(s). |
| 585 | 585 | * |
| 586 | 586 | * @param string|array $post_types |
| 587 | - * @return object $this |
|
| 587 | + * @return Post_Meta_Container $this |
|
| 588 | 588 | **/ |
| 589 | 589 | public function show_on_post_type( $post_types ) { |
| 590 | 590 | $post_types = (array) $post_types; |
@@ -304,8 +304,8 @@ discard block |
||
| 304 | 304 | /** |
| 305 | 305 | * Assign DataStore instance for use during load, save and delete |
| 306 | 306 | * |
| 307 | - * @param object $store |
|
| 308 | - * @return object $this |
|
| 307 | + * @param Datastore_Interface $store |
|
| 308 | + * @return Field $this |
|
| 309 | 309 | **/ |
| 310 | 310 | public function set_datastore( Datastore_Interface $store ) { |
| 311 | 311 | $this->store = $store; |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | * Assign the type of the container this field is in |
| 326 | 326 | * |
| 327 | 327 | * @param string |
| 328 | - * @return object $this |
|
| 328 | + * @return Field $this |
|
| 329 | 329 | **/ |
| 330 | 330 | public function set_context( $context ) { |
| 331 | 331 | $this->context = $context; |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | * Set field name prefix. Calling this method will update the current field name and the conditional logic fields. |
| 424 | 424 | * |
| 425 | 425 | * @param string $prefix |
| 426 | - * @return object $this |
|
| 426 | + * @return Field $this |
|
| 427 | 427 | **/ |
| 428 | 428 | public function set_prefix( $prefix ) { |
| 429 | 429 | $this->name = preg_replace( '~^' . preg_quote( $this->name_prefix, '~' ) . '~', '', $this->name ); |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | * Set additional text to be displayed during field render, |
| 468 | 468 | * containing information and guidance for the user |
| 469 | 469 | * |
| 470 | - * @return object $this |
|
| 470 | + * @return Field $this |
|
| 471 | 471 | **/ |
| 472 | 472 | public function set_help_text( $help_text ) { |
| 473 | 473 | $this->help_text = $help_text; |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | * Alias for set_help_text() |
| 479 | 479 | * |
| 480 | 480 | * @see set_help_text() |
| 481 | - * @return object $this |
|
| 481 | + * @return Field $this |
|
| 482 | 482 | **/ |
| 483 | 483 | public function help_text( $help_text ) { |
| 484 | 484 | return $this->set_help_text( $help_text ); |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | /** |
| 488 | 488 | * Return the field help text |
| 489 | 489 | * |
| 490 | - * @return object $this |
|
| 490 | + * @return string $this |
|
| 491 | 491 | **/ |
| 492 | 492 | public function get_help_text() { |
| 493 | 493 | return $this->help_text; |
@@ -497,7 +497,7 @@ discard block |
||
| 497 | 497 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
| 498 | 498 | * |
| 499 | 499 | * @param bool $autoload |
| 500 | - * @return object $this |
|
| 500 | + * @return Field $this |
|
| 501 | 501 | **/ |
| 502 | 502 | public function set_autoload( $autoload ) { |
| 503 | 503 | $this->autoload = $autoload; |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
| 518 | 518 | * |
| 519 | 519 | * @param bool $lazyload |
| 520 | - * @return object $this |
|
| 520 | + * @return Field $this |
|
| 521 | 521 | **/ |
| 522 | 522 | public function set_lazyload( $lazyload ) { |
| 523 | 523 | $this->lazyload = $lazyload; |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | * Set the field width. |
| 538 | 538 | * |
| 539 | 539 | * @param int $width |
| 540 | - * @return object $this |
|
| 540 | + * @return Field $this |
|
| 541 | 541 | **/ |
| 542 | 542 | public function set_width( $width ) { |
| 543 | 543 | $this->width = (int) $width; |
@@ -557,7 +557,7 @@ discard block |
||
| 557 | 557 | * Add custom CSS class to the field html container. |
| 558 | 558 | * |
| 559 | 559 | * @param string|array $classes |
| 560 | - * @return object $this |
|
| 560 | + * @return Field $this |
|
| 561 | 561 | **/ |
| 562 | 562 | public function add_class( $classes ) { |
| 563 | 563 | if ( ! is_array( $classes ) ) { |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | * Whether this field is mandatory for the user |
| 582 | 582 | * |
| 583 | 583 | * @param bool $required |
| 584 | - * @return object $this |
|
| 584 | + * @return Field $this |
|
| 585 | 585 | **/ |
| 586 | 586 | public function set_required( $required ) { |
| 587 | 587 | $this->required = $required; |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | |
| 591 | 591 | /** |
| 592 | 592 | * HTML id attribute getter. |
| 593 | - * @return string |
|
| 593 | + * @return integer |
|
| 594 | 594 | */ |
| 595 | 595 | public function get_id() { |
| 596 | 596 | return $this->id; |
@@ -630,6 +630,7 @@ discard block |
||
| 630 | 630 | /** |
| 631 | 631 | * Cleans up an object class for usage as HTML class |
| 632 | 632 | * |
| 633 | + * @param string $type |
|
| 633 | 634 | * @return string |
| 634 | 635 | */ |
| 635 | 636 | protected function clean_type( $type ) { |
@@ -647,7 +648,7 @@ discard block |
||
| 647 | 648 | /** |
| 648 | 649 | * Return an array of html classes to be used for the field container |
| 649 | 650 | * |
| 650 | - * @return array |
|
| 651 | + * @return string[] |
|
| 651 | 652 | */ |
| 652 | 653 | public function get_html_class() { |
| 653 | 654 | $html_classes = array(); |
@@ -833,7 +834,7 @@ discard block |
||
| 833 | 834 | /** |
| 834 | 835 | * Changes the options array structure. This is needed to keep the array items order when it is JSON encoded. |
| 835 | 836 | * |
| 836 | - * @param array $options |
|
| 837 | + * @param string $options |
|
| 837 | 838 | * @return array |
| 838 | 839 | */ |
| 839 | 840 | public function parse_options( $options ) { |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | * Show the container only on terms from the specified taxonomies. |
| 189 | 189 | * |
| 190 | 190 | * @param string|array $taxonomies |
| 191 | - * @return object $this |
|
| 191 | + * @return Term_Meta_Container $this |
|
| 192 | 192 | **/ |
| 193 | 193 | public function show_on_taxonomy( $taxonomies ) { |
| 194 | 194 | $taxonomies = (array) $taxonomies; |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * Show the container only on particular term level. |
| 203 | 203 | * |
| 204 | 204 | * @param int $term_level |
| 205 | - * @return object $this |
|
| 205 | + * @return Term_Meta_Container $this |
|
| 206 | 206 | */ |
| 207 | 207 | public function show_on_level( $term_level ) { |
| 208 | 208 | $this->settings['show_on_level'] = $term_level; |