Ticket #19417: 19417.refresh.diff
File 19417.refresh.diff, 6.6 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]); … … 500 499 * @param callback $function_to_check optional. If specified, return the priority of that function on this hook or false if not attached. 501 500 * @return int|boolean Optionally returns the priority on that hook for the specified function. 502 501 */ 503 function has_action( $tag, $function_to_check = false) {504 return has_filter( $tag, $function_to_check);502 function has_action( $tag, $function_to_check = false ) { 503 return has_filter( $tag, $function_to_check ); 505 504 } 506 505 507 506 /** … … 518 517 * @param string $tag The action hook to which the function to be removed is hooked. 519 518 * @param callback $function_to_remove The name of the function which should be removed. 520 519 * @param int $priority optional The priority of the function (default: 10). 521 * @param int $accepted_args optional. The number of arguments the function accepts (default: 1).522 520 * @return boolean Whether the function is removed. 523 521 */ 524 function remove_action( $tag, $function_to_remove, $priority = 10, $accepted_args = 1) {525 return remove_filter( $tag, $function_to_remove, $priority, $accepted_args);522 function remove_action( $tag, $function_to_remove, $priority = 10 ) { 523 return remove_filter( $tag, $function_to_remove, $priority ); 526 524 } 527 525 528 526 /** -
wp-includes/taxonomy.php
1218 1218 } 1219 1219 1220 1220 // $args can be whatever, only use the args defined in defaults to compute the key 1221 $filter_key = ( has_filter('list_terms_exclusions')) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : '';1221 $filter_key = false !== has_filter( 'list_terms_exclusions' ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : ''; 1222 1222 $key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key ); 1223 1223 $last_changed = wp_cache_get('last_changed', 'terms'); 1224 1224 if ( !$last_changed ) { -
wp-includes/functions.php
984 984 $feed = get_default_feed(); 985 985 986 986 $hook = 'do_feed_' . $feed; 987 if ( !has_action($hook) ) {987 if ( false === has_action( $hook ) ) { 988 988 $message = sprintf( __( 'ERROR: %s is not a valid feed template.' ), esc_html($feed)); 989 989 wp_die( $message, '', array( 'response' => 404 ) ); 990 990 } -
wp-includes/class-wp.php
405 405 } 406 406 407 407 // query_string filter deprecated. Use request filter instead. 408 if ( has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in.408 if ( false !== has_filter( 'query_string' ) ) { // Don't bother filtering and parsing if no plugins are hooked in. 409 409 $this->query_string = apply_filters('query_string', $this->query_string); 410 410 parse_str($this->query_string, $this->query_vars); 411 411 } -
wp-includes/capabilities.php
1105 1105 1106 1106 $meta_key = isset( $args[ 1 ] ) ? $args[ 1 ] : false; 1107 1107 1108 if ( $meta_key && has_filter( "auth_post_meta_{$meta_key}" ) ) {1108 if ( $meta_key && false !== has_filter( "auth_post_meta_{$meta_key}" ) ) { 1109 1109 $allowed = apply_filters( "auth_post_meta_{$meta_key}", false, $meta_key, $post->ID, $user_id, $cap, $caps ); 1110 1110 if ( ! $allowed ) 1111 1111 $caps[] = $cap; -
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> -
wp-admin/includes/plugin.php
1507 1507 1508 1508 function get_plugin_page_hook( $plugin_page, $parent_page ) { 1509 1509 $hook = get_plugin_page_hookname( $plugin_page, $parent_page ); 1510 if ( has_action($hook) )1510 if ( false !== has_action($hook) ) 1511 1511 return $hook; 1512 1512 else 1513 1513 return null; -
wp-admin/user-edit.php
207 207 <td><label for="rich_editing"><input name="rich_editing" type="checkbox" id="rich_editing" value="false" <?php checked('false', $profileuser->rich_editing); ?> /> <?php _e('Disable the visual editor when writing'); ?></label></td> 208 208 </tr> 209 209 <?php endif; ?> 210 <?php if ( count($_wp_admin_css_colors) > 1 && has_action('admin_color_scheme_picker') ) : ?>210 <?php if ( ( count( $_wp_admin_css_colors ) > 1 ) && ( false !== has_action( 'admin_color_scheme_picker' ) ) ) : ?> 211 211 <tr> 212 212 <th scope="row"><?php _e('Admin Color Scheme')?></th> 213 213 <td><?php do_action( 'admin_color_scheme_picker' ); ?></td>