Ticket #19417: 19417.diff
File 19417.diff, 4.5 KB (added by , 13 years ago) |
---|
-
wp-includes/plugin.php
251 251 * @param string $tag The filter hook to which the function to be removed is hooked. 252 252 * @param callback $function_to_remove The name of the function which should be removed. 253 253 * @param int $priority optional. The priority of the function (default: 10). 254 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1).255 254 * @return boolean Whether the function existed before it was removed. 256 255 */ 257 function remove_filter($tag, $function_to_remove, $priority = 10 , $accepted_args = 1) {256 function remove_filter($tag, $function_to_remove, $priority = 10 ) { 258 257 $function_to_remove = _wp_filter_build_unique_id($tag, $function_to_remove, $priority); 259 258 260 259 $r = isset($GLOBALS['wp_filter'][$tag][$priority][$function_to_remove]); … … 520 519 * @param string $tag The action hook to which the function to be removed is hooked. 521 520 * @param callback $function_to_remove The name of the function which should be removed. 522 521 * @param int $priority optional The priority of the function (default: 10). 523 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1).524 522 * @return boolean Whether the function is removed. 525 523 */ 526 function remove_action( $tag, $function_to_remove, $priority = 10, $accepted_args = 1) {527 return remove_filter( $tag, $function_to_remove, $priority, $accepted_args);524 function remove_action( $tag, $function_to_remove, $priority = 10 ) { 525 return remove_filter( $tag, $function_to_remove, $priority ); 528 526 } 529 527 530 528 /** -
wp-includes/taxonomy.php
1205 1205 } 1206 1206 1207 1207 // $args can be whatever, only use the args defined in defaults to compute the key 1208 $filter_key = ( has_filter('list_terms_exclusions')) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : '';1208 $filter_key = false !== has_filter( 'list_terms_exclusions' ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; 1209 1209 $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); 1210 1210 $last_changed = wp_cache_get('last_changed', 'terms'); 1211 1211 if ( !$last_changed ) { -
wp-includes/capabilities.php
1086 1086 1087 1087 $meta_key = isset( $args[ 1 ] ) ? $args[ 1 ] : false; 1088 1088 1089 if ( $meta_key && has_filter( "auth_post_meta_{$meta_key}" ) ) {1089 if ( $meta_key && false !== has_filter( "auth_post_meta_{$meta_key}" ) ) { 1090 1090 $allowed = apply_filters( "auth_post_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps ); 1091 1091 if ( ! $allowed ) 1092 1092 $caps[] = $cap; -
wp-includes/class-wp.php
402 402 } 403 403 404 404 // query_string filter deprecated. Use request filter instead. 405 if ( has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in.405 if ( false !== has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in. 406 406 $this->query_string = apply_filters('query_string', $this->query_string); 407 407 parse_str($this->query_string, $this->query_vars); 408 408 } -
wp-admin/includes/class-wp-ms-sites-list-table.php
150 150 'users' => __( 'Users' ) 151 151 ); 152 152 153 if ( has_filter( 'wpmublogsaction' ) )153 if ( false !== has_filter( 'wpmublogsaction' ) ) 154 154 $sites_columns['plugins'] = __( 'Actions' ); 155 155 156 156 $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns ); … … 317 317 break; 318 318 319 319 case 'plugins': ?> 320 <?php if ( has_filter( 'wpmublogsaction' ) ) {320 <?php if ( false !== has_filter( 'wpmublogsaction' ) ) { 321 321 echo "<td valign='top' class='$column_name column-$column_name'$style>"; 322 322 do_action( 'wpmublogsaction', $blog['blog_id'] ); ?> 323 323 </td>