@@ -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; |
@@ -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 ( ! isset( $_REQUEST[ $this->get_nonce_name() ] ) || ! wp_verify_nonce( $_REQUEST[ $this->get_nonce_name() ], $this->get_nonce_name() ) ) { |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | * Perform checks whether the current save() request is valid |
64 | 64 | * |
65 | 65 | * @param int $user_id ID of the user against which save() is ran |
66 | - * @return bool |
|
66 | + * @return null|boolean |
|
67 | 67 | **/ |
68 | 68 | public function is_valid_save_conditions( $user_id ) { |
69 | 69 | $valid = true; |
@@ -198,7 +198,6 @@ discard block |
||
198 | 198 | /** |
199 | 199 | * Validate and parse the show_for logic rules. |
200 | 200 | * |
201 | - * @param array $rules |
|
202 | 201 | * @return array |
203 | 202 | */ |
204 | 203 | protected function parse_show_for( $show_for ) { |
@@ -246,7 +245,7 @@ discard block |
||
246 | 245 | * Show the container only on users who have the $role role. |
247 | 246 | * |
248 | 247 | * @param string $role |
249 | - * @return object $this |
|
248 | + * @return User_Meta_Container $this |
|
250 | 249 | **/ |
251 | 250 | public function show_on_user_role( $role ) { |
252 | 251 | $this->settings['show_on']['role'] = (array) $role; |
@@ -258,7 +257,7 @@ discard block |
||
258 | 257 | * Show the container only for users who have either capabilities or roles setup |
259 | 258 | * |
260 | 259 | * @param array $show_for |
261 | - * @return object $this |
|
260 | + * @return User_Meta_Container $this |
|
262 | 261 | **/ |
263 | 262 | public function show_for( $show_for ) { |
264 | 263 | $this->settings['show_for'] = $this->parse_show_for( $show_for ); |
@@ -225,6 +225,7 @@ |
||
225 | 225 | /** |
226 | 226 | * Convert an array of storage key patterns to a parentheses-enclosed sql comparison |
227 | 227 | * |
228 | + * @param string $column |
|
228 | 229 | * @return string |
229 | 230 | **/ |
230 | 231 | protected function storage_key_patterns_to_sql( $column, $patterns ) { |
@@ -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 ); |
@@ -200,6 +200,7 @@ |
||
200 | 200 | /** |
201 | 201 | * Return a clone of a field with hierarchy settings applied |
202 | 202 | * |
203 | + * @param Complex_Field $parent_field |
|
203 | 204 | * @return bool |
204 | 205 | **/ |
205 | 206 | public function get_clone_under_field_in_hierarchy( $field, $parent_field, $entry_index = 0 ) { |
@@ -345,7 +345,7 @@ |
||
345 | 345 | /** |
346 | 346 | * Convert field data to a new storage key |
347 | 347 | * |
348 | - * @param array $hierarchy |
|
348 | + * @param array $full_hierarchy |
|
349 | 349 | * @param array $hierarchy_index |
350 | 350 | * @param integer $value_index |
351 | 351 | * @param string $value_key |
@@ -54,6 +54,7 @@ |
||
54 | 54 | /** |
55 | 55 | * Recursive function to replace meta keys in meta_query arrays |
56 | 56 | * |
57 | + * @param string $container_type |
|
57 | 58 | * @return array |
58 | 59 | */ |
59 | 60 | protected function filter_meta_query_array( $condition, $container_type ) { |
@@ -406,8 +406,8 @@ discard block |
||
406 | 406 | /** |
407 | 407 | * Assign DataStore instance for use during load, save and delete |
408 | 408 | * |
409 | - * @param object $datastore |
|
410 | - * @return object $this |
|
409 | + * @param Datastore_Interface $datastore |
|
410 | + * @return Field $this |
|
411 | 411 | **/ |
412 | 412 | public function set_datastore( Datastore_Interface $datastore, $set_as_default = false ) { |
413 | 413 | if ( $set_as_default && ! $this->has_default_datastore() ) { |
@@ -421,7 +421,7 @@ discard block |
||
421 | 421 | /** |
422 | 422 | * Return the DataStore instance used by the field |
423 | 423 | * |
424 | - * @return object $datastore |
|
424 | + * @return Datastore_Interface $datastore |
|
425 | 425 | **/ |
426 | 426 | public function get_datastore() { |
427 | 427 | return $this->datastore; |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | * Assign the type of the container this field is in |
432 | 432 | * |
433 | 433 | * @param string |
434 | - * @return object $this |
|
434 | + * @return Field $this |
|
435 | 435 | **/ |
436 | 436 | public function set_context( $context ) { |
437 | 437 | $this->context = $context; |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | /** |
469 | 469 | * Return a differently formatted value for end-users |
470 | 470 | * |
471 | - * @return mixed |
|
471 | + * @return string |
|
472 | 472 | **/ |
473 | 473 | public function get_formatted_value() { |
474 | 474 | $value = $this->get_value(); |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | * Set additional text to be displayed during field render, |
589 | 589 | * containing information and guidance for the user |
590 | 590 | * |
591 | - * @return object $this |
|
591 | + * @return Field $this |
|
592 | 592 | **/ |
593 | 593 | public function set_help_text( $help_text ) { |
594 | 594 | $this->help_text = $help_text; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * Alias for set_help_text() |
600 | 600 | * |
601 | 601 | * @see set_help_text() |
602 | - * @return object $this |
|
602 | + * @return Field $this |
|
603 | 603 | **/ |
604 | 604 | public function help_text( $help_text ) { |
605 | 605 | return $this->set_help_text( $help_text ); |
@@ -608,7 +608,7 @@ discard block |
||
608 | 608 | /** |
609 | 609 | * Return the field help text |
610 | 610 | * |
611 | - * @return object $this |
|
611 | + * @return string $this |
|
612 | 612 | **/ |
613 | 613 | public function get_help_text() { |
614 | 614 | return $this->help_text; |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | * Whether or not this value should be auto loaded. Applicable to theme options only. |
619 | 619 | * |
620 | 620 | * @param bool $autoload |
621 | - * @return object $this |
|
621 | + * @return Field $this |
|
622 | 622 | **/ |
623 | 623 | public function set_autoload( $autoload ) { |
624 | 624 | $this->autoload = $autoload; |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | * Whether or not this field will be initialized when the field is in the viewport (visible). |
639 | 639 | * |
640 | 640 | * @param bool $lazyload |
641 | - * @return object $this |
|
641 | + * @return Field $this |
|
642 | 642 | **/ |
643 | 643 | public function set_lazyload( $lazyload ) { |
644 | 644 | $this->lazyload = $lazyload; |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | * Set the field width. |
659 | 659 | * |
660 | 660 | * @param int $width |
661 | - * @return object $this |
|
661 | + * @return Field $this |
|
662 | 662 | **/ |
663 | 663 | public function set_width( $width ) { |
664 | 664 | $this->width = (int) $width; |
@@ -678,7 +678,7 @@ discard block |
||
678 | 678 | * Add custom CSS class to the field html container. |
679 | 679 | * |
680 | 680 | * @param string|array $classes |
681 | - * @return object $this |
|
681 | + * @return Field $this |
|
682 | 682 | **/ |
683 | 683 | public function add_class( $classes ) { |
684 | 684 | if ( ! is_array( $classes ) ) { |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | * Whether this field is mandatory for the user |
703 | 703 | * |
704 | 704 | * @param bool $required |
705 | - * @return object $this |
|
705 | + * @return Field $this |
|
706 | 706 | **/ |
707 | 707 | public function set_required( $required = true ) { |
708 | 708 | $this->required = $required; |
@@ -751,6 +751,7 @@ discard block |
||
751 | 751 | /** |
752 | 752 | * Cleans up an object class for usage as HTML class |
753 | 753 | * |
754 | + * @param string $type |
|
754 | 755 | * @return string |
755 | 756 | */ |
756 | 757 | protected function clean_type( $type ) { |
@@ -768,7 +769,7 @@ discard block |
||
768 | 769 | /** |
769 | 770 | * Return an array of html classes to be used for the field container |
770 | 771 | * |
771 | - * @return array |
|
772 | + * @return string[] |
|
772 | 773 | */ |
773 | 774 | public function get_html_class() { |
774 | 775 | $html_classes = array(); |