WordPress.org

Make WordPress Core

Ticket #19203: plugin.diff

File plugin.diff, 1.9 KB (added by amereservant, 9 years ago)

Patch for wp-includes/plugin.php docblocks

  • 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 it's 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 *
     
    111111 *
    112112 * The function allows for additional arguments to be added and passed to hooks.
    113113 * <code>
     114 * // Our filter function
    114115 * function example_hook($string, $arg1, $arg2)
    115116 * {
    116117 *              //Do stuff
    117118 *              return $string;
    118119 * }
     120 * add_filter('example_filter', 'example_hook', 10, 3);
     121 *
     122 * // Apply the filters, which will call our 'example_hook' function since we
     123 * // hooked the 'example_filter' hook in the add_filter() function.
    119124 * $value = apply_filters('example_filter', 'filter me', 'arg1', 'arg2');
    120125 * </code>
    121126 *
     
    704709 * @uses $wp_filter Used to process all of the functions in the 'all' hook
    705710 *
    706711 * @param array $args The collected parameters from the hook that was called.
    707  * @param string $hook Optional. The hook name that was used to call the 'all' hook.
    708712 */
    709713function _wp_call_all_hook($args) {
    710714        global $wp_filter;