Changeset 2184
- Timestamp:
- 02/01/2005 06:20:54 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r2183 r2184 219 219 } elseif ( !isset($wp_template_redirect) ) { 220 220 $wp_template_redirect = true; 221 do_action('template_redirect' , '');221 do_action('template_redirect'); 222 222 if ( is_feed() ) { 223 223 include(ABSPATH . '/wp-feed.php'); -
trunk/wp-content/themes/classic/footer.php
r2040 r2184 8 8 </div> 9 9 10 <?php do_action('wp_footer' , ''); ?>10 <?php do_action('wp_footer'); ?> 11 11 </body> 12 12 </html> -
trunk/wp-content/themes/default/footer.php
r2089 r2184 15 15 <?php /* "Just what do you think you're doing Dave?" */ ?> 16 16 17 <?php do_action('wp_footer', ''); ?>17 <?php do_action('wp_footer'); ?> 18 18 19 19 </body> -
trunk/wp-includes/classes.php
r2179 r2184 1140 1140 $this->rules = $page_rewrite + $root_rewrite + $comments_rewrite + $search_rewrite + $category_rewrite + $author_rewrite + $date_rewrite + $post_rewrite; 1141 1141 1142 do_action('generate_rewrite_rules', '');1142 do_action('generate_rewrite_rules', array(&$this)); 1143 1143 $this->rules = apply_filters('rewrite_rules_array', $this->rules); 1144 1144 return $this->rules; -
trunk/wp-includes/functions-post.php
r2166 r2184 385 385 global $wpdb; 386 386 387 do_action('wp_blacklist_check' , '');387 do_action('wp_blacklist_check'); 388 388 389 389 if ( preg_match_all('/&#(\d+);/', $comment . $author . $url, $chars) ) { … … 450 450 $time_newcomment = mysql2date('U', $now_gmt); 451 451 if ( ($time_newcomment - $time_lastcomment) < 15 ) { 452 do_action('comment_flood_trigger' , '');452 do_action('comment_flood_trigger'); 453 453 die( __('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.') ); 454 454 } -
trunk/wp-includes/functions.php
r2183 r2184 871 871 // Filters: these are the core of WP's plugin architecture 872 872 873 function apply_filters($tag, $string, $filter = true) {873 function merge_filters($tag) { 874 874 global $wp_filter; 875 875 if (isset($wp_filter['all'])) { … … 884 884 } 885 885 886 if (isset($wp_filter[$tag])) 887 ksort($wp_filter[$tag]); 888 } 889 890 function apply_filters($tag, $string) { 891 global $wp_filter; 892 893 $args = array($string) + array_slice(func_get_args(), 3); 894 895 merge_filters($tag); 896 886 897 if (isset($wp_filter[$tag])) { 887 ksort($wp_filter[$tag]);888 898 foreach ($wp_filter[$tag] as $priority => $functions) { 889 899 if (!is_null($functions)) { 890 900 foreach($functions as $function) { 891 if ($filter) 892 $string = call_user_func($function, $string); 893 else 894 call_user_func($function, $string); 901 $string = call_user_func_array($function, $args); 895 902 } 896 903 } … … 925 932 // The *_action functions are just aliases for the *_filter functions, they take special strings instead of generic content 926 933 927 function do_action($tag, $string) { 928 apply_filters($tag, $string, false); 929 return $string; 934 function do_action($tag, $arg = '') { 935 global $wp_filter; 936 937 if ( is_array($arg) ) 938 $args = $arg + array_slice(func_get_args(), 2); 939 else 940 $args = array($action) + array_slice(func_get_args(), 2); 941 942 merge_filters($tag); 943 944 if (isset($wp_filter[$tag])) { 945 foreach ($wp_filter[$tag] as $priority => $functions) { 946 if (!is_null($functions)) { 947 foreach($functions as $function) { 948 $string = call_user_func_array($function, $args); 949 } 950 } 951 } 952 } 930 953 } 931 954 … … 1065 1088 1066 1089 function wp_head() { 1067 do_action('wp_head' , '');1090 do_action('wp_head'); 1068 1091 } 1069 1092 -
trunk/wp-includes/template-functions-general.php
r2142 r2184 55 55 56 56 function wp_meta() { 57 do_action('wp_meta' , 1);57 do_action('wp_meta'); 58 58 } 59 59 -
trunk/wp-settings.php
r2171 r2184 121 121 122 122 function shutdown_action_hook() { 123 do_action('shutdown' , '');123 do_action('shutdown'); 124 124 } 125 125 register_shutdown_function('shutdown_action_hook'); 126 126 127 127 // Everything is loaded. 128 do_action('init' , '');128 do_action('init'); 129 129 ?>
Note: See TracChangeset
for help on using the changeset viewer.