WordPress.org

Make WordPress Core

Ticket #19203: 19203.grammar-check.diff

File 19203.grammar-check.diff, 1.9 KB (added by JustinSainton, 6 years ago)
  • wp-includes/plugin.php

     
    2222/**
    2323 * Hooks a function or method to a specific filter action.
    2424 *
    25  * Filters are the hooks that WordPress launches to modify text of various types
     25 * Filters are the hooks that WordPress launches to modify data of various types
    2626 * before adding it to the database or sending it to the browser screen. Plugins
    27  * can specify that one or more of its PHP functions is executed to
    28  * modify specific types of text at these times, using the Filter API.
     27 * can specify that one or more of its PHP functions are to be executed to
     28 * modify the data at these times, using the Filter API.
    2929 *
    3030 * To use the API, the following code should be used to bind a callback to the
    3131 * filter.
    3232 *
    3333 * <code>
    34  * function example_hook($example) { echo $example; }
     34 * function example_hook($example) { var_dump($example); }
    3535 * add_filter('example_filter', 'example_hook');
    3636 * </code>
    3737 *
     
    114114 *
    115115 * The function allows for additional arguments to be added and passed to hooks.
    116116 * <code>
     117 * // Our filter function
    117118 * function example_hook($string, $arg1, $arg2)
    118119 * {
    119120 *              //Do stuff
    120121 *              return $string;
    121122 * }
     123 * add_filter('example_filter', 'example_hook', 10, 3);
     124 *
     125 * // Apply the filters, which will call our 'example_hook' function since we
     126 * // hooked the 'example_filter' hook in the add_filter() function.
    122127 * $value = apply_filters('example_filter', 'filter me', 'arg1', 'arg2');
    123128 * </code>
    124129 *
     
    707712 * @uses $wp_filter Used to process all of the functions in the 'all' hook
    708713 *
    709714 * @param array $args The collected parameters from the hook that was called.
    710  * @param string $hook Optional. The hook name that was used to call the 'all' hook.
    711715 */
    712716function _wp_call_all_hook($args) {
    713717        global $wp_filter;