@@ -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)) { |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | * Show the container only on pages whose parent is referenced by $parent_page_path. |
440 | 440 | * |
441 | 441 | * @param string $parent_page_path |
442 | - * @return object $this |
|
442 | + * @return Post_Meta_Container $this |
|
443 | 443 | **/ |
444 | 444 | public function show_on_page_children( $parent_page_path ) { |
445 | 445 | $page = get_page_by_path( $parent_page_path ); |
@@ -458,7 +458,7 @@ discard block |
||
458 | 458 | * Show the container only on particular page referenced by it's path. |
459 | 459 | * |
460 | 460 | * @param int|string $page page ID or page path |
461 | - * @return object $this |
|
461 | + * @return Post_Meta_Container $this |
|
462 | 462 | **/ |
463 | 463 | public function show_on_page( $page ) { |
464 | 464 | if ( is_int( $page ) ) { |
@@ -483,7 +483,7 @@ discard block |
||
483 | 483 | * @see show_on_taxonomy_term() |
484 | 484 | * |
485 | 485 | * @param string $category_slug |
486 | - * @return object $this |
|
486 | + * @return Post_Meta_Container $this |
|
487 | 487 | **/ |
488 | 488 | public function show_on_category( $category_slug ) { |
489 | 489 | $this->settings['show_on']['category'] = $category_slug; |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | * Show the container only on pages whose template has filename $template_path. |
496 | 496 | * |
497 | 497 | * @param string|array $template_path |
498 | - * @return object $this |
|
498 | + * @return Post_Meta_Container $this |
|
499 | 499 | **/ |
500 | 500 | public function show_on_template( $template_path ) { |
501 | 501 | $this->show_on_post_type( 'page' ); |
@@ -517,7 +517,7 @@ discard block |
||
517 | 517 | * Hide the container from pages whose template has filename $template_path. |
518 | 518 | * |
519 | 519 | * @param string|array $template_path |
520 | - * @return object $this |
|
520 | + * @return Post_Meta_Container $this |
|
521 | 521 | **/ |
522 | 522 | public function hide_on_template( $template_path ) { |
523 | 523 | if ( is_array( $template_path ) ) { |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | * Levels start from 1 (top level post) |
538 | 538 | * |
539 | 539 | * @param int $level |
540 | - * @return object $this |
|
540 | + * @return Post_Meta_Container $this |
|
541 | 541 | **/ |
542 | 542 | public function show_on_level( $level ) { |
543 | 543 | if ( $level < 0 ) { |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | * |
555 | 555 | * @param string $taxonomy_slug |
556 | 556 | * @param string $term_slug |
557 | - * @return object $this |
|
557 | + * @return Post_Meta_Container $this |
|
558 | 558 | **/ |
559 | 559 | public function show_on_taxonomy_term( $term_slug, $taxonomy_slug ) { |
560 | 560 | $term = get_term_by( 'slug', $term_slug, $taxonomy_slug ); |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | * Learn more about {@link http://codex.wordpress.org/Post_Formats Post Formats (Codex)} |
572 | 572 | * |
573 | 573 | * @param string|array $post_format Name of the format as listed on Codex |
574 | - * @return object $this |
|
574 | + * @return Post_Meta_Container $this |
|
575 | 575 | **/ |
576 | 576 | public function show_on_post_format( $post_format ) { |
577 | 577 | if ( is_array( $post_format ) ) { |
@@ -593,8 +593,8 @@ discard block |
||
593 | 593 | /** |
594 | 594 | * Show the container only on posts from the specified type(s). |
595 | 595 | * |
596 | - * @param string|array $post_types |
|
597 | - * @return object $this |
|
596 | + * @param string $post_types |
|
597 | + * @return Post_Meta_Container $this |
|
598 | 598 | **/ |
599 | 599 | public function show_on_post_type( $post_types ) { |
600 | 600 | $post_types = (array) $post_types; |
@@ -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; |
@@ -305,8 +305,8 @@ discard block |
||
305 | 305 | /** |
306 | 306 | * Assign DataStore instance for use during load, save and delete |
307 | 307 | * |
308 | - * @param object $store |
|
309 | - * @return object $this |
|
308 | + * @param Datastore_Interface $store |
|
309 | + * @return Field $this |
|
310 | 310 | **/ |
311 | 311 | public function set_datastore( Datastore_Interface $store ) { |
312 | 312 | $this->store = $store; |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | /** |
317 | 317 | * Return the DataStore instance used by the field |
318 | 318 | * |
319 | - * @return object $store |
|
319 | + * @return Datastore_Interface $store |
|
320 | 320 | **/ |
321 | 321 | public function get_datastore() { |
322 | 322 | return $this->store; |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | * Assign the type of the container this field is in |
327 | 327 | * |
328 | 328 | * @param string |
329 | - * @return object $this |
|
329 | + * @return Field $this |
|
330 | 330 | **/ |
331 | 331 | public function set_context( $context ) { |
332 | 332 | $this->context = $context; |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * name and the conditional logic fields. |
430 | 430 | * |
431 | 431 | * @param string $prefix |
432 | - * @return object $this |
|
432 | + * @return Field $this |
|
433 | 433 | **/ |
434 | 434 | public function set_prefix( $prefix ) { |
435 | 435 | $escaped_prefix = preg_quote( $this->name_prefix, '~' ); |
@@ -474,7 +474,7 @@ discard block |
||
474 | 474 | * Set additional text to be displayed during field render, |
475 | 475 | * containing information and guidance for the user |
476 | 476 | * |
477 | - * @return object $this |
|
477 | + * @return Field $this |
|
478 | 478 | **/ |
479 | 479 | public function set_help_text( $help_text ) { |
480 | 480 | $this->help_text = $help_text; |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | * Alias for set_help_text() |
486 | 486 | * |
487 | 487 | * @see set_help_text() |
488 | - * @return object $this |
|
488 | + * @return Field $this |
|
489 | 489 | **/ |
490 | 490 | public function help_text( $help_text ) { |
491 | 491 | return $this->set_help_text( $help_text ); |
@@ -494,7 +494,7 @@ discard block |
||
494 | 494 | /** |
495 | 495 | * Return the field help text |
496 | 496 | * |
497 | - * @return object $this |
|
497 | + * @return string $this |
|
498 | 498 | **/ |
499 | 499 | public function get_help_text() { |
500 | 500 | return $this->help_text; |
@@ -504,7 +504,7 @@ discard block |
||
504 | 504 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
505 | 505 | * |
506 | 506 | * @param bool $autoload |
507 | - * @return object $this |
|
507 | + * @return Field $this |
|
508 | 508 | **/ |
509 | 509 | public function set_autoload( $autoload ) { |
510 | 510 | $this->autoload = $autoload; |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
525 | 525 | * |
526 | 526 | * @param bool $lazyload |
527 | - * @return object $this |
|
527 | + * @return Field $this |
|
528 | 528 | **/ |
529 | 529 | public function set_lazyload( $lazyload ) { |
530 | 530 | $this->lazyload = $lazyload; |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | * Set the field width. |
545 | 545 | * |
546 | 546 | * @param int $width |
547 | - * @return object $this |
|
547 | + * @return Field $this |
|
548 | 548 | **/ |
549 | 549 | public function set_width( $width ) { |
550 | 550 | $this->width = (int) $width; |
@@ -564,7 +564,7 @@ discard block |
||
564 | 564 | * Add custom CSS class to the field html container. |
565 | 565 | * |
566 | 566 | * @param string|array $classes |
567 | - * @return object $this |
|
567 | + * @return Field $this |
|
568 | 568 | **/ |
569 | 569 | public function add_class( $classes ) { |
570 | 570 | if ( ! is_array( $classes ) ) { |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | * Whether this field is mandatory for the user |
589 | 589 | * |
590 | 590 | * @param bool $required |
591 | - * @return object $this |
|
591 | + * @return Field $this |
|
592 | 592 | **/ |
593 | 593 | public function set_required( $required ) { |
594 | 594 | $this->required = $required; |
@@ -637,6 +637,7 @@ discard block |
||
637 | 637 | /** |
638 | 638 | * Cleans up an object class for usage as HTML class |
639 | 639 | * |
640 | + * @param string $type |
|
640 | 641 | * @return string |
641 | 642 | */ |
642 | 643 | protected function clean_type( $type ) { |
@@ -654,7 +655,7 @@ discard block |
||
654 | 655 | /** |
655 | 656 | * Return an array of html classes to be used for the field container |
656 | 657 | * |
657 | - * @return array |
|
658 | + * @return string[] |
|
658 | 659 | */ |
659 | 660 | public function get_html_class() { |
660 | 661 | $html_classes = array(); |
@@ -632,7 +632,7 @@ |
||
632 | 632 | /** |
633 | 633 | * Assign DataStore instance for use by the container fields |
634 | 634 | * |
635 | - * @param object $store |
|
635 | + * @param Datastore_Interface $store |
|
636 | 636 | **/ |
637 | 637 | function set_datastore(Datastore_Interface $store) { |
638 | 638 | $this->store = $store; |