Changeset 6026 for trunk/wp-includes/plugin.php
- Timestamp:
- 09/03/2007 11:32:58 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/plugin.php
r6025 r6026 3 3 /** 4 4 * Hooks a function to a specific filter action. 5 * 5 * 6 6 * Filters are the hooks that WordPress launches to modify text of various types 7 * before adding it to the database or sending it to the browser screen. Plugins 8 * can specify that one or more of its PHP functions is executed to 7 * before adding it to the database or sending it to the browser screen. Plugins 8 * can specify that one or more of its PHP functions is executed to 9 9 * modify specific types of text at these times, using the Filter API. 10 * See the [Plugin API] for a list of filter hooks. 10 * See the [Plugin API] for a list of filter hooks. 11 11 * 12 12 * @param string $tag The name of the filter to hook the <tt>$function_to_add</tt> to. … … 29 29 /** 30 30 * Call the functions added to a filter hook. 31 * 31 * 32 32 * The callback functions attached to filter hook <tt>$tag</tt> are invoked by 33 33 * calling this function. This function can be used to create a new filter hook … … 67 67 /** 68 68 * Merge the filter functions of a specific filter hook with generic filter functions. 69 * 70 * It is possible to defined generic filter functions using the filter hook 71 * <em>all</e>. These functions are called for every filter tag. This function 69 * 70 * It is possible to defined generic filter functions using the filter hook 71 * <em>all</e>. These functions are called for every filter tag. This function 72 72 * merges the functions attached to the <em>all</em> hook with the functions 73 73 * of a specific hoook defined by <tt>$tag</tt>. … … 88 88 89 89 /** 90 * Removes a function from a specified filter hook. 91 * 92 * This function removes a function attached to a specified filter hook. This 93 * method can be used to remove default functions attached to a specific filter 90 * Removes a function from a specified filter hook. 91 * 92 * This function removes a function attached to a specified filter hook. This 93 * method can be used to remove default functions attached to a specific filter 94 94 * hook and possibly replace them with a substitute. 95 95 * @param string $tag The filter hook to which the function to be removed is hooked. … … 112 112 /** 113 113 * Hooks a function on to a specific action. 114 * 115 * Actions are the hooks that the WordPress core launches at specific points 114 * 115 * Actions are the hooks that the WordPress core launches at specific points 116 116 * during execution, or when specific events occur. Plugins can specify that 117 * one or more of its PHP functions are executed at these points, using the 117 * one or more of its PHP functions are executed at these points, using the 118 118 * Action API. 119 * 119 * 120 120 * @param string $tag The name of the action to which the <tt>$function_to-add</tt> is hooked. 121 121 * @param callback $function_to_add The name of the function you wish to be called. Note: any of the syntaxes explained in the PHP documentation for the 'callback' type (http://us2.php.net/manual/en/language.pseudo-types.php#language.types.callback) are valid. 122 122 * @param int $priority optional. Used to specify the order in which the functions associated with a particular action are executed (default: 10). Lower numbers correspond with earlier execution, and functions with the same priority are executed in the order in which they were added to the action. 123 * @param int $accepted_args optional. The number of arguments the function accept (default 1). In WordPress 1.5.1+, hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run. 123 * @param int $accepted_args optional. The number of arguments the function accept (default 1). In WordPress 1.5.1+, hooked functions can take extra arguments that are set when the matching do_action() or apply_filters() call is run. 124 124 * @return boolean Always true. 125 125 */ … … 130 130 /** 131 131 * Execute functions hooked on a specific action hook. 132 * 132 * 133 133 * This function invokes all functions attached to action hook <tt>$tag</tt>. 134 134 * It is possible to create new action hooks by simply calling this function, … … 136 136 * @uses merge_filters 137 137 * @param string $tag The name of the action to be executed. 138 * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. 138 * @param mixed $arg,... Optional additional arguments which are passed on to the functions hooked to the action. 139 139 */ 140 140 function do_action($tag, $arg = '') { … … 184 184 /** 185 185 * Execute functions hooked on a specific action hook, specifying arguments in a array. 186 * 187 * This function is identical to {@link do_action}, but the argumetns passe to 186 * 187 * This function is identical to {@link do_action}, but the argumetns passe to 188 188 * the functions hooked to <tt>$tag</tt> are supplied using an array. 189 189 * @param string $tag The name of the action to be executed. … … 213 213 214 214 /** 215 * Removes a function from a specified action hook. 216 * 217 * This function removes a function attached to a specified action hook. This 218 * method can be used to remove default functions attached to a specific filter 215 * Removes a function from a specified action hook. 216 * 217 * This function removes a function attached to a specified action hook. This 218 * method can be used to remove default functions attached to a specific filter 219 219 * hook and possibly replace them with a substitute. 220 220 * @param string $tag The action hook to which the function to be removed is hooked. … … 234 234 /** 235 235 * Gets the basename of a plugin. 236 * 236 * 237 237 * This method extract the name of a plugin from its filename. 238 238 * @param string $file The filename of plugin. … … 248 248 /** 249 249 * Hook a function on a plugin activation action hook. 250 * 250 * 251 251 * When a plugin is activated, the action 'activate_PLUGINNAME' hook is 252 252 * activated. In the name of this hook, PLUGINNAME is replaced with the name of 253 253 * the plugin, including the optional subdirectory. For example, when the plugin 254 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 255 * name of this hook will become 'activate_sampleplugin/sample.php'. 256 * When the plugin consists of only one file and is (as by default) located at 257 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 254 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 255 * name of this hook will become 'activate_sampleplugin/sample.php'. 256 * When the plugin consists of only one file and is (as by default) located at 257 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 258 258 * 'activate_sample.php'. 259 259 * @param string $file The filename of the plugin including the path. … … 267 267 /** 268 268 * Hook a function on a plugin deactivation action hook. 269 * 269 * 270 270 * When a plugin is deactivated, the action 'deactivate_PLUGINNAME' hook is 271 271 * deactivated. In the name of this hook, PLUGINNAME is replaced with the name of 272 272 * the plugin, including the optional subdirectory. For example, when the plugin 273 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 274 * name of this hook will become 'activate_sampleplugin/sample.php'. 275 * When the plugin consists of only one file and is (as by default) located at 276 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 273 * is located in <tt>wp-content/plugin/sampleplugin/sample.php</tt>, then the 274 * name of this hook will become 'activate_sampleplugin/sample.php'. 275 * When the plugin consists of only one file and is (as by default) located at 276 * <tt>wp-content/plugin/sample.php</tt> the name of this hook will be 277 277 * 'activate_sample.php'. 278 278 * @param string $file The filename of the plugin including the path.
Note: See TracChangeset
for help on using the changeset viewer.