@@ -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)) { |
@@ -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; |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | * Show the container only on pages whose parent is referenced by $parent_page_path. |
435 | 435 | * |
436 | 436 | * @param string $parent_page_path |
437 | - * @return object $this |
|
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; |
@@ -306,8 +306,8 @@ discard block |
||
306 | 306 | /** |
307 | 307 | * Assign DataStore instance for use during load, save and delete |
308 | 308 | * |
309 | - * @param object $store |
|
310 | - * @return object $this |
|
309 | + * @param Datastore_Interface $store |
|
310 | + * @return Field $this |
|
311 | 311 | **/ |
312 | 312 | public function set_datastore( Datastore_Interface $store ) { |
313 | 313 | $this->store = $store; |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * Assign the type of the container this field is in |
328 | 328 | * |
329 | 329 | * @param string |
330 | - * @return object $this |
|
330 | + * @return Field $this |
|
331 | 331 | **/ |
332 | 332 | public function set_context( $context ) { |
333 | 333 | $this->context = $context; |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * Set field name prefix. Calling this method will update the current field name and the conditional logic fields. |
426 | 426 | * |
427 | 427 | * @param string $prefix |
428 | - * @return object $this |
|
428 | + * @return Field $this |
|
429 | 429 | **/ |
430 | 430 | public function set_prefix( $prefix ) { |
431 | 431 | $this->name = preg_replace( '~^' . preg_quote( $this->name_prefix, '~' ) . '~', '', $this->name ); |
@@ -469,7 +469,7 @@ discard block |
||
469 | 469 | * Set additional text to be displayed during field render, |
470 | 470 | * containing information and guidance for the user |
471 | 471 | * |
472 | - * @return object $this |
|
472 | + * @return Field $this |
|
473 | 473 | **/ |
474 | 474 | public function set_help_text( $help_text ) { |
475 | 475 | $this->help_text = $help_text; |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | * Alias for set_help_text() |
481 | 481 | * |
482 | 482 | * @see set_help_text() |
483 | - * @return object $this |
|
483 | + * @return Field $this |
|
484 | 484 | **/ |
485 | 485 | public function help_text( $help_text ) { |
486 | 486 | return $this->set_help_text( $help_text ); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | /** |
490 | 490 | * Return the field help text |
491 | 491 | * |
492 | - * @return object $this |
|
492 | + * @return string $this |
|
493 | 493 | **/ |
494 | 494 | public function get_help_text() { |
495 | 495 | return $this->help_text; |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
500 | 500 | * |
501 | 501 | * @param bool $autoload |
502 | - * @return object $this |
|
502 | + * @return Field $this |
|
503 | 503 | **/ |
504 | 504 | public function set_autoload( $autoload ) { |
505 | 505 | $this->autoload = $autoload; |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
520 | 520 | * |
521 | 521 | * @param bool $lazyload |
522 | - * @return object $this |
|
522 | + * @return Field $this |
|
523 | 523 | **/ |
524 | 524 | public function set_lazyload( $lazyload ) { |
525 | 525 | $this->lazyload = $lazyload; |
@@ -539,7 +539,7 @@ discard block |
||
539 | 539 | * Set the field width. |
540 | 540 | * |
541 | 541 | * @param int $width |
542 | - * @return object $this |
|
542 | + * @return Field $this |
|
543 | 543 | **/ |
544 | 544 | public function set_width( $width ) { |
545 | 545 | $this->width = (int) $width; |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | * Add custom CSS class to the field html container. |
560 | 560 | * |
561 | 561 | * @param string|array $classes |
562 | - * @return object $this |
|
562 | + * @return Field $this |
|
563 | 563 | **/ |
564 | 564 | public function add_class( $classes ) { |
565 | 565 | if ( ! is_array( $classes ) ) { |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | * Whether this field is mandatory for the user |
584 | 584 | * |
585 | 585 | * @param bool $required |
586 | - * @return object $this |
|
586 | + * @return Field $this |
|
587 | 587 | **/ |
588 | 588 | public function set_required( $required ) { |
589 | 589 | $this->required = $required; |
@@ -632,6 +632,7 @@ discard block |
||
632 | 632 | /** |
633 | 633 | * Cleans up an object class for usage as HTML class |
634 | 634 | * |
635 | + * @param string $type |
|
635 | 636 | * @return string |
636 | 637 | */ |
637 | 638 | protected function clean_type( $type ) { |
@@ -649,7 +650,7 @@ discard block |
||
649 | 650 | /** |
650 | 651 | * Return an array of html classes to be used for the field container |
651 | 652 | * |
652 | - * @return array |
|
653 | + * @return string[] |
|
653 | 654 | */ |
654 | 655 | public function get_html_class() { |
655 | 656 | $html_classes = array(); |