Ticket #5225: plugin.phpdoc.4.diff

File plugin.phpdoc.4.diff, 7.0 KB (added by darkdragon, 5 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 
     
    9787 * 
    9888 * @package WordPress 
    9989 * @subpackage Plugin 
    100  * @since 1.5 
     90 * @since 0.71 
    10191 * @global array $wp_filter Stores all of the filters 
    10292 * @global array $merge_filters Merges the filter hooks using this function. 
    10393 * 
     
    132122} 
    133123 
    134124/** 
    135  * Merge the filter functions of a specific filter hook with generic filter functions. 
     125 * merge_filters() - Merge the filter functions of a specific filter hook with generic filter functions. 
    136126 * 
    137127 * It is possible to defined generic filter functions using the filter hook 
    138128 * <em>all</e>. These functions are called for every filter tag. This function 
     
    164154} 
    165155 
    166156/** 
    167  * Removes a function from a specified filter hook. 
     157 * remove_filter() - Removes a function from a specified filter hook. 
    168158 * 
    169159 * This function removes a function attached to a specified filter hook. This 
    170160 * method can be used to remove default functions attached to a specific filter 
     
    176166 * 
    177167 * @package WordPress 
    178168 * @subpackage Plugin 
    179  * @since 1.5 
     169 * @since 1.2 
    180170 * 
    181171 * @param string $tag The filter hook to which the function to be removed is hooked. 
    182172 * @param callback $function_to_remove The name of the function which should be removed. 
     
    196186} 
    197187 
    198188/** 
    199  * Hooks a function on to a specific action. 
     189 * add_action() - Hooks a function on to a specific action. 
    200190 * 
    201191 * Actions are the hooks that the WordPress core launches at specific points 
    202192 * during execution, or when specific events occur. Plugins can specify that 
     
    207197 * 
    208198 * @package WordPress 
    209199 * @subpackage Plugin 
    210  * @since 1.5 
     200 * @since 1.2 
    211201 * 
    212202 * @param string $tag The name of the action to which the <tt>$function_to-add</tt> is hooked. 
    213203 * @param callback $function_to_add The name of the function you wish to be called. 
     
    219209} 
    220210 
    221211/** 
    222  * Execute functions hooked on a specific action hook. 
     212 * do_action() - Execute functions hooked on a specific action hook. 
    223213 * 
    224214 * This function invokes all functions attached to action hook <tt>$tag</tt>. 
    225215 * It is possible to create new action hooks by simply calling this function, 
     
    232222 * 
    233223 * @package WordPress 
    234224 * @subpackage Plugin 
    235  * @since 1.5 
     225 * @since 1.2 
    236226 * @global array $wp_filter Stores all of the filters 
    237227 * @global array $wp_actions Increments the amount of times action was triggered. 
    238228 * 
     
    271261} 
    272262 
    273263/** 
    274  * Return the number times an action is fired. 
     264 * did_action() - Return the number times an action is fired. 
    275265 * 
    276266 * @package WordPress 
    277267 * @subpackage Plugin 
     
    291281} 
    292282 
    293283/** 
    294  * Execute functions hooked on a specific action hook, specifying arguments in an array. 
     284 * do_action_ref_array() - Execute functions hooked on a specific action hook, specifying arguments in an array. 
    295285 * 
    296286 * @see do_action() This function is identical, but the arguments passed to 
    297287 * the functions hooked to <tt>$tag</tt> are supplied using an array. 
     
    331321} 
    332322 
    333323/** 
    334  * Removes a function from a specified action hook. 
     324 * remove_action() - Removes a function from a specified action hook. 
    335325 * 
    336326 * This function removes a function attached to a specified action hook. This 
    337327 * method can be used to remove default functions attached to a specific filter 
     
    341331 * 
    342332 * @package WordPress 
    343333 * @subpackage Plugin 
    344  * @since 1.5 
     334 * @since 1.2 
    345335 * 
    346336 * @param string $tag The action hook to which the function to be removed is hooked. 
    347337 * @param callback $function_to_remove The name of the function which should be removed. 
     
    379369} 
    380370 
    381371/** 
    382  * Hook a function on a plugin activation action hook. 
     372 * register_activation_hook() - Hook a function on a plugin activation action hook. 
    383373 * 
    384374 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is 
    385375 * activated. In the name of this hook, PLUGINNAME is replaced with the name of 
     
    392382 * 
    393383 * @package WordPress 
    394384 * @subpackage Plugin 
    395  * @since 1.5 
     385 * @since 2.0 
    396386 * 
    397387 * @access private 
    398388 * 
     
    405395} 
    406396 
    407397/** 
    408  * Hook a function on a plugin deactivation action hook. 
     398 * register_deactivation_hook() - Hook a function on a plugin deactivation action hook. 
    409399 * 
    410400 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is 
    411401 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name of 
     
    431421} 
    432422 
    433423/** 
    434  * Build Unique ID for storage and retrieval 
     424 * _wp_filter_build_unique_id() - Build Unique ID for storage and retrieval 
    435425 * 
    436426 * The old way to serialize the callback caused issues and this function is the 
    437427 * solution. It works by checking for objects and creating an a new property in 
     
    486476                return $function[0].$function[1]; 
    487477} 
    488478 
    489 ?> 
    490  No newline at end of file 
     479?>