Make WordPress Core

Ticket #5225: plugin.6278.phpdoc.patch

File plugin.6278.phpdoc.patch, 7.1 KB (added by darkdragon, 14 years ago)

Will hopefully upload correctly.

  • plugin.php

     
    77 * The API callback examples reference functions, but can be methods of classes.
    88 * To hook methods, you'll need to pass an array one of two ways.
    99 *
    10  * For static methods (you won't have access to the <tt>$this</tt> variable in the
    11  * method):
    12  * <code>array('class_name', 'method_name');</code>
    13  *
    14  * The second method will need the reference to the object to have access to the
    15  * method.
    16  * <code>array(&$this, 'method_name');</code>
    17  * <code>
    18  * $obj = new myObject();
    19  * array(&$obj, 'method_name');
    20  * </code>
    2110 * Any of the syntaxes explained in the PHP documentation for the
    22  * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback' type} are valid.
     11 * {@link http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback 'callback'}
     12 * type are valid.
    2313 *
    2414 * Also see the {@link http://codex.wordpress.org/Plugin_API Plugin API} for more information
    2515 * and examples on how to use a lot of these functions.
     
    3020 */
    3121
    3222/**
    33  * Hooks a function or method to a specific filter action.
     23 * add_filter() - Hooks a function or method to a specific filter action.
    3424 *
    3525 * Filters are the hooks that WordPress launches to modify text of various types
    3626 * before adding it to the database or sending it to the browser screen. Plugins
     
    5848 *
    5949 * @package WordPress
    6050 * @subpackage Plugin
    61  * @since 1.5
     51 * @since 0.71
    6252 * @global array $wp_filter Stores all of the filters added in the form of
    6353 *      wp_filter['tag']['array of priorities']['array of functions serialized']['array of ['array (functions, accepted_args)]']
    6454 * @global array $merged_filters Tracks the tags that need to be merged for later. If the hook is added, it doesn't need to run through that process.
     
    7969}
    8070
    8171/**
    82  * Call the functions added to a filter hook.
     72 * apply_filters() - Call the functions added to a filter hook.
    8373 *
    8474 * The callback functions attached to filter hook <tt>$tag</tt> are invoked by
    8575 * calling this function. This function can be used to create a new filter hook
     
    9181 * function example_hook($string, $arg1, $arg2)
    9282 * {
    9383 *              //Do stuff
     84 *              return $string;
    9485 * }
    9586 * $value = apply_filters('example_filter', 'filter me', 'arg1', 'arg2');
    9687 * </code>
    9788 *
    9889 * @package WordPress
    9990 * @subpackage Plugin
    100  * @since 1.5
     91 * @since 0.71
    10192 * @global array $wp_filter Stores all of the filters
    10293 * @global array $merge_filters Merges the filter hooks using this function.
    10394 *
     
    132123}
    133124
    134125/**
    135  * Merge the filter functions of a specific filter hook with generic filter functions.
     126 * merge_filters() - Merge the filter functions of a specific filter hook with generic filter functions.
    136127 *
    137128 * It is possible to defined generic filter functions using the filter hook
    138129 * <em>all</e>. These functions are called for every filter tag. This function
     
    164155}
    165156
    166157/**
    167  * Removes a function from a specified filter hook.
     158 * remove_filter() - Removes a function from a specified filter hook.
    168159 *
    169160 * This function removes a function attached to a specified filter hook. This
    170161 * method can be used to remove default functions attached to a specific filter
     
    176167 *
    177168 * @package WordPress
    178169 * @subpackage Plugin
    179  * @since 1.5
     170 * @since 1.2
    180171 *
    181172 * @param string $tag The filter hook to which the function to be removed is hooked.
    182173 * @param callback $function_to_remove The name of the function which should be removed.
     
    196187}
    197188
    198189/**
    199  * Hooks a function on to a specific action.
     190 * add_action() - Hooks a function on to a specific action.
    200191 *
    201192 * Actions are the hooks that the WordPress core launches at specific points
    202193 * during execution, or when specific events occur. Plugins can specify that
     
    207198 *
    208199 * @package WordPress
    209200 * @subpackage Plugin
    210  * @since 1.5
     201 * @since 1.2
    211202 *
    212203 * @param string $tag The name of the action to which the <tt>$function_to-add</tt> is hooked.
    213204 * @param callback $function_to_add The name of the function you wish to be called.
     
    219210}
    220211
    221212/**
    222  * Execute functions hooked on a specific action hook.
     213 * do_action() - Execute functions hooked on a specific action hook.
    223214 *
    224215 * This function invokes all functions attached to action hook <tt>$tag</tt>.
    225216 * It is possible to create new action hooks by simply calling this function,
     
    232223 *
    233224 * @package WordPress
    234225 * @subpackage Plugin
    235  * @since 1.5
     226 * @since 1.2
    236227 * @global array $wp_filter Stores all of the filters
    237228 * @global array $wp_actions Increments the amount of times action was triggered.
    238229 *
     
    271262}
    272263
    273264/**
    274  * Return the number times an action is fired.
     265 * did_action() - Return the number times an action is fired.
    275266 *
    276267 * @package WordPress
    277268 * @subpackage Plugin
     
    291282}
    292283
    293284/**
    294  * Execute functions hooked on a specific action hook, specifying arguments in an array.
     285 * do_action_ref_array() - Execute functions hooked on a specific action hook, specifying arguments in an array.
    295286 *
    296287 * @see do_action() This function is identical, but the arguments passed to
    297288 * the functions hooked to <tt>$tag</tt> are supplied using an array.
     
    331322}
    332323
    333324/**
    334  * Removes a function from a specified action hook.
     325 * remove_action() - Removes a function from a specified action hook.
    335326 *
    336327 * This function removes a function attached to a specified action hook. This
    337328 * method can be used to remove default functions attached to a specific filter
     
    341332 *
    342333 * @package WordPress
    343334 * @subpackage Plugin
    344  * @since 1.5
     335 * @since 1.2
    345336 *
    346337 * @param string $tag The action hook to which the function to be removed is hooked.
    347338 * @param callback $function_to_remove The name of the function which should be removed.
     
    358349//
    359350
    360351/**
    361  * Gets the basename of a plugin.
     352 * plugin_basename() - Gets the basename of a plugin.
    362353 *
    363354 * This method extract the name of a plugin from its filename.
    364355 *
     
    379370}
    380371
    381372/**
    382  * Hook a function on a plugin activation action hook.
     373 * register_activation_hook() - Hook a function on a plugin activation action hook.
    383374 *
    384375 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is
    385376 * activated. In the name of this hook, PLUGINNAME is replaced with the name of
     
    392383 *
    393384 * @package WordPress
    394385 * @subpackage Plugin
    395  * @since 1.5
     386 * @since 2.0
    396387 *
    397388 * @access private
    398389 *
     
    405396}
    406397
    407398/**
    408  * Hook a function on a plugin deactivation action hook.
     399 * register_deactivation_hook() - Hook a function on a plugin deactivation action hook.
    409400 *
    410401 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is
    411402 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name of
     
    431422}
    432423
    433424/**
    434  * Build Unique ID for storage and retrieval
     425 * _wp_filter_build_unique_id() - Build Unique ID for storage and retrieval
    435426 *
    436427 * The old way to serialize the callback caused issues and this function is the
    437428 * solution. It works by checking for objects and creating an a new property in