Ticket #19203: 19203.grammar-check.diff
File 19203.grammar-check.diff, 1.9 KB (added by , 8 years ago) |
---|
-
wp-includes/plugin.php
22 22 /** 23 23 * Hooks a function or method to a specific filter action. 24 24 * 25 * Filters are the hooks that WordPress launches to modify textof various types25 * Filters are the hooks that WordPress launches to modify data of various types 26 26 * 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 isexecuted to28 * modify specific types of textat 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. 29 29 * 30 30 * To use the API, the following code should be used to bind a callback to the 31 31 * filter. 32 32 * 33 33 * <code> 34 * function example_hook($example) { echo $example; }34 * function example_hook($example) { var_dump($example); } 35 35 * add_filter('example_filter', 'example_hook'); 36 36 * </code> 37 37 * … … 114 114 * 115 115 * The function allows for additional arguments to be added and passed to hooks. 116 116 * <code> 117 * // Our filter function 117 118 * function example_hook($string, $arg1, $arg2) 118 119 * { 119 120 * //Do stuff 120 121 * return $string; 121 122 * } 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. 122 127 * $value = apply_filters('example_filter', 'filter me', 'arg1', 'arg2'); 123 128 * </code> 124 129 * … … 707 712 * @uses $wp_filter Used to process all of the functions in the 'all' hook 708 713 * 709 714 * @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.711 715 */ 712 716 function _wp_call_all_hook($args) { 713 717 global $wp_filter;