Ticket #49572: 49572.returning-from-filter.diff
File 49572.returning-from-filter.diff, 13.8 KB (added by , 4 years ago) |
---|
-
src/wp-admin/includes/export.php
328 328 /** 329 329 * Filters whether to selectively skip term meta used for WXR exports. 330 330 * 331 * Returning a truthy value tothe filter will skip the current meta331 * Returning a truthy value from the filter will skip the current meta 332 332 * object from being exported. 333 333 * 334 334 * @since 4.6.0 … … 595 595 /** 596 596 * Filters whether to selectively skip post meta used for WXR exports. 597 597 * 598 * Returning a truthy value tothe filter will skip the current meta598 * Returning a truthy value from the filter will skip the current meta 599 599 * object from being exported. 600 600 * 601 601 * @since 3.3.0 … … 638 638 /** 639 639 * Filters whether to selectively skip comment meta used for WXR exports. 640 640 * 641 * Returning a truthy value tothe filter will skip the current meta641 * Returning a truthy value from the filter will skip the current meta 642 642 * object from being exported. 643 643 * 644 644 * @since 4.0.0 -
src/wp-admin/includes/file.php
880 880 /** 881 881 * Filters whether to short-circuit moving the uploaded file after passing all checks. 882 882 * 883 * If a non-null value is passed to the filter, moving the file and any related error884 * reporting will be completely skipped.883 * If a non-null value is returned from the filter, moving the file and any related 884 * error reporting will be completely skipped. 885 885 * 886 886 * @since 4.9.0 887 887 * -
src/wp-admin/includes/media.php
208 208 * 209 209 * @since 2.6.0 210 210 * 211 * @param bool $bool Whether to disable appending captions. Returning true tothe filter211 * @param bool $bool Whether to disable appending captions. Returning true from the filter 212 212 * will disable captions. Default empty string. 213 213 */ 214 214 if ( empty( $caption ) || apply_filters( 'disable_captions', '' ) ) { -
src/wp-admin/includes/misc.php
695 695 * The filter can also be used to modify non-standard [items]_per_page 696 696 * settings. See the parent function for a full list of standard options. 697 697 * 698 * Returning false tothe filter will skip saving the current option.698 * Returning false from the filter will skip saving the current option. 699 699 * 700 700 * @since 2.8.0 701 701 * @since 5.4.2 Only applied to options ending with '_page', … … 716 716 * 717 717 * The dynamic portion of the hook, `$option`, refers to the option name. 718 718 * 719 * Returning false tothe filter will skip saving the current option.719 * Returning false from the filter will skip saving the current option. 720 720 * 721 721 * @since 5.4.2 722 722 * -
src/wp-includes/canonical.php
849 849 /** 850 850 * Filters whether to attempt to guess a redirect URL for a 404 request. 851 851 * 852 * Passing a false value tothe filter will disable the URL guessing852 * Returning a false value from the filter will disable the URL guessing 853 853 * and return early. 854 854 * 855 855 * @since 5.5.0 … … 864 864 /** 865 865 * Filters whether to short-circuit redirect URL guessing for 404 requests. 866 866 * 867 * Passing a non-null value tothe filter will effectively short-circuit867 * Returning a non-null value from the filter will effectively short-circuit 868 868 * the URL guessing, returning the passed value instead. 869 869 * 870 870 * @since 5.5.0 … … 881 881 /** 882 882 * Filters whether to perform a strict or loose guess. 883 883 * 884 * Passing a truthy value tothe filter will redirect only exact post_name matches.884 * Returning a truthy value from the filter will redirect only exact post_name matches. 885 885 * 886 886 * @since 5.5.0 887 887 * -
src/wp-includes/class-wp-oembed.php
381 381 * This allows one to short-circuit the default logic, perhaps by 382 382 * replacing it with a routine that is more optimal for your setup. 383 383 * 384 * Passing a non-null value to the filter will effectively short-circuit retrieval,385 * returningthe passed value instead.384 * Returning a non-null value from the filter will effectively short-circuit retrieval 385 * and return the passed value instead. 386 386 * 387 387 * @since 4.5.3 388 388 * -
src/wp-includes/comment.php
831 831 * Filters a comment's approval status before it is set. 832 832 * 833 833 * @since 2.1.0 834 * @since 4.9.0 Returning a WP_Error value from the filter will short circuit comment insertion834 * @since 4.9.0 Returning a WP_Error value from the filter will short-circuit comment insertion 835 835 * and allow skipping further processing. 836 836 * 837 837 * @param int|string|WP_Error $approved The approval status. Accepts 1, 0, 'spam', 'trash', -
src/wp-includes/formatting.php
64 64 /** 65 65 * Filters whether to skip running wptexturize(). 66 66 * 67 * Passing false to the filter will effectively short-circuit wptexturize().68 * returningthe original text passed to the function instead.67 * Returning false from the filter will effectively short-circuit wptexturize() 68 * and return the original text passed to the function instead. 69 69 * 70 70 * The filter runs only once, the first time wptexturize() is called. 71 71 * -
src/wp-includes/functions.php
2654 2654 /** 2655 2655 * Filters whether to treat the upload bits as an error. 2656 2656 * 2657 * Returning a non-array from the filter will effectively short-circuit preparing the upload 2658 * bits, returningthat value instead. An error message should be returned as a string.2657 * Returning a non-array from the filter will effectively short-circuit preparing the upload bits 2658 * and return that value instead. An error message should be returned as a string. 2659 2659 * 2660 2660 * @since 3.0.0 2661 2661 * … … 4578 4578 /** 4579 4579 * Filters whether to load the Widgets library. 4580 4580 * 4581 * Passing a falsey value tothe filter will effectively short-circuit4581 * Returning a falsey value from the filter will effectively short-circuit 4582 4582 * the Widgets library from loading. 4583 4583 * 4584 4584 * @since 2.8.0 … … 5580 5580 /** 5581 5581 * Filters whether global terms are enabled. 5582 5582 * 5583 * Passing a non-null value to the filter will effectively short-circuit the function,5584 * returningthe value of the 'global_terms_enabled' site option instead.5583 * Returning a non-null value from the filter will effectively short-circuit the function 5584 * and return the value of the 'global_terms_enabled' site option instead. 5585 5585 * 5586 5586 * @since 3.0.0 5587 5587 * … … 6448 6448 /** 6449 6449 * Filters whether to load the authentication check. 6450 6450 * 6451 * Passing a falsey value tothe filter will effectively short-circuit6451 * Returning a falsey value from the filter will effectively short-circuit 6452 6452 * loading the authentication check. 6453 6453 * 6454 6454 * @since 3.6.0 -
src/wp-includes/link-template.php
3857 3857 /** 3858 3858 * Filters whether to preempt generating a shortlink for the given post. 3859 3859 * 3860 * Passing a truthy value to the filter will effectively short-circuit the3861 * shortlink-generation process, returning that value instead.3860 * Returning a truthy value from the filter will effectively short-circuit 3861 * the shortlink generation process, returning that value instead. 3862 3862 * 3863 3863 * @since 3.0.0 3864 3864 * -
src/wp-includes/media.php
541 541 /** 542 542 * Filters whether to preempt calculating the image resize dimensions. 543 543 * 544 * Passing a non-null value tothe filter will effectively short-circuit544 * Returning a non-null value from the filter will effectively short-circuit 545 545 * image_resize_dimensions(), returning that value instead. 546 546 * 547 547 * @since 3.4.0 … … 1625 1625 * @see wp_img_tag_add_srcset_and_sizes_attr() 1626 1626 * 1627 1627 * @param string $content The HTML content to be filtered. 1628 * @param string $context Optional. Additional context to pass to the filters. Defaults to `current_filter()` when not set. 1628 * @param string $context Optional. Additional context to pass to the filters. 1629 * Defaults to `current_filter()` when not set. 1629 1630 * @return string Converted content with images modified. 1630 1631 */ 1631 1632 function wp_filter_content_tags( $content, $context = null ) { … … 2369 2370 /** 2370 2371 * Filters the playlist output. 2371 2372 * 2372 * Passing a non-empty value tothe filter will short-circuit generation2373 * Returning a non-empty value from the filter will short-circuit generation 2373 2374 * of the default playlist output, returning the passed value instead. 2374 2375 * 2375 2376 * @since 3.9.0 -
src/wp-includes/nav-menu-template.php
89 89 /** 90 90 * Filters whether to short-circuit the wp_nav_menu() output. 91 91 * 92 * Passing a non-null value to the filter will short-circuit 93 * wp_nav_menu(), echoing that value if $args->echo is true, 94 * returning that value otherwise. 92 * Returning a non-null value from the filter will short-circuit wp_nav_menu(), 93 * echoing that value if $args->echo is true, returning that value otherwise. 95 94 * 96 95 * @since 3.9.0 97 96 * -
src/wp-includes/option.php
40 40 * 41 41 * The dynamic portion of the hook name, `$option`, refers to the option name. 42 42 * 43 * Passing a truthy value tothe filter will short-circuit retrieving43 * Returning a truthy value from the filter will short-circuit retrieving 44 44 * the option value, returning the passed value instead. 45 45 * 46 46 * @since 1.5.0 … … 687 687 * 688 688 * The dynamic portion of the hook name, `$transient`, refers to the transient name. 689 689 * 690 * Passing a truthy value tothe filter will effectively short-circuit retrieval690 * Returning a truthy value from the filter will effectively short-circuit retrieval 691 691 * of the transient, returning the passed value instead. 692 692 * 693 693 * @since 2.8.0 … … 1237 1237 * 1238 1238 * The dynamic portion of the hook name, `$option`, refers to the option name. 1239 1239 * 1240 * Passing a truthy value to the filter will effectively short-circuit retrieval,1241 * returningthe passed value instead.1240 * Returning a truthy value from the filter will effectively short-circuit retrieval 1241 * and return the passed value instead. 1242 1242 * 1243 1243 * @since 2.9.0 As 'pre_site_option_' . $key 1244 1244 * @since 3.0.0 … … 1750 1750 * 1751 1751 * The dynamic portion of the hook name, `$transient`, refers to the transient name. 1752 1752 * 1753 * Passing a truthy value to the filter will effectively short-circuit retrieval,1754 * returningthe passed value instead.1753 * Returning a truthy value from the filter will effectively short-circuit retrieval 1754 * and return the passed value instead. 1755 1755 * 1756 1756 * @since 2.9.0 1757 1757 * @since 4.4.0 The `$transient` parameter was added. -
src/wp-includes/post.php
3685 3685 * 1. The post type supports the title, editor, and excerpt fields 3686 3686 * 2. The title, editor, and excerpt fields are all empty 3687 3687 * 3688 * Passing a truthy value tothe filter will effectively short-circuit3689 * the new post being inserted , returning0. If $wp_error is true, a WP_Error3688 * Returning a truthy value from the filter will effectively short-circuit 3689 * the new post being inserted and return 0. If $wp_error is true, a WP_Error 3690 3690 * will be returned instead. 3691 3691 * 3692 3692 * @since 3.3.0 -
src/wp-includes/user.php
608 608 /** 609 609 * Filters the list of a user's sites before it is populated. 610 610 * 611 * Passing a non-null value tothe filter will effectively short circuit611 * Returning a non-null value from the filter will effectively short circuit 612 612 * get_blogs_of_user(), returning that value instead. 613 613 * 614 614 * @since 4.6.0