Ticket #30947: 30947.diff
File 30947.diff, 15.3 KB (added by , 10 years ago) |
---|
-
src/wp-includes/admin-bar.php
44 44 45 45 return true; 46 46 } 47 // Don't remove. Wrong way to disable.48 add_action( 'template_redirect', '_wp_admin_bar_init', 0 );49 add_action( 'admin_init', '_wp_admin_bar_init' );50 47 51 48 /** 52 49 * Render the admin bar to the page based on the $wp_admin_bar->menu member var. … … 92 89 */ 93 90 do_action( 'wp_after_admin_bar_render' ); 94 91 } 95 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 );96 add_action( 'in_admin_header', 'wp_admin_bar_render', 0 );97 92 98 93 /** 99 94 * Add the WordPress logo menu. -
src/wp-includes/author-template.php
451 451 function __clear_multi_author_cache() { 452 452 delete_transient( 'is_multi_author' ); 453 453 } 454 add_action('transition_post_status', '__clear_multi_author_cache'); -
src/wp-includes/canonical.php
553 553 return false; 554 554 } 555 555 556 add_action('template_redirect', 'redirect_canonical');557 558 556 function wp_redirect_admin_locations() { 559 557 global $wp_rewrite; 560 558 if ( ! ( is_404() && $wp_rewrite->using_permalinks() ) ) … … 582 580 exit; 583 581 } 584 582 } 585 586 add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 ); -
src/wp-includes/default-filters.php
306 306 add_filter( 'determine_current_user', 'wp_validate_auth_cookie' ); 307 307 add_filter( 'determine_current_user', 'wp_validate_logged_in_cookie', 20 ); 308 308 309 unset($filter, $action); 309 /** 310 * Filters formerly mixed into wp-includes 311 */ 312 // Theme 313 add_action( 'setup_theme', 'preview_theme' ); 314 add_action( 'wp_loaded', '_custom_header_background_just_in_time' ); 315 add_action( 'plugins_loaded', '_wp_customize_include' ); 316 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' ); 317 add_action( 'delete_attachment', '_delete_attachment_theme_mod' ); 318 319 // Calendar widget cache 320 add_action( 'save_post', 'delete_get_calendar_cache' ); 321 add_action( 'delete_post', 'delete_get_calendar_cache' ); 322 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' ); 323 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' ); 324 325 // Author 326 add_action( 'transition_post_status', '__clear_multi_author_cache' ); 327 328 // Post 329 add_action( 'init', 'create_initial_post_types', 0 ); // highest priority 330 add_action( 'admin_menu', '_add_post_type_submenus' ); 331 add_action( 'before_delete_post', '_reset_front_page_settings_for_post' ); 332 add_action( 'wp_trash_post', '_reset_front_page_settings_for_post' ); 333 334 // Post Formats 335 add_filter( 'request', '_post_format_request' ); 336 add_filter( 'term_link', '_post_format_link', 10, 3 ); 337 add_filter( 'get_post_format', '_post_format_get_term' ); 338 add_filter( 'get_terms', '_post_format_get_terms', 10, 3 ); 339 add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' ); 340 341 // KSES 342 add_action( 'init', 'kses_init' ); 343 add_action( 'set_current_user', 'kses_init' ); 344 345 // Script Loader 346 add_action( 'wp_default_scripts', 'wp_default_scripts' ); 347 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' ); 348 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' ); 349 350 add_action( 'wp_default_styles', 'wp_default_styles' ); 351 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); 352 353 // Taxonomy 354 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority 355 356 // Update 357 add_action( 'admin_init', '_maybe_update_core' ); 358 add_action( 'wp_version_check', 'wp_version_check' ); 359 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 ); 360 add_action( 'load-plugins.php', 'wp_update_plugins' ); 361 add_action( 'load-update.php', 'wp_update_plugins' ); 362 add_action( 'load-update-core.php', 'wp_update_plugins' ); 363 add_action( 'admin_init', '_maybe_update_plugins' ); 364 add_action( 'wp_update_plugins', 'wp_update_plugins' ); 365 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 ); 366 add_action( 'load-themes.php', 'wp_update_themes' ); 367 add_action( 'load-update.php', 'wp_update_themes' ); 368 add_action( 'load-update-core.php', 'wp_update_themes' ); 369 add_action( 'admin_init', '_maybe_update_themes' ); 370 add_action( 'wp_update_themes', 'wp_update_themes' ); 371 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 ); 372 add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 ); 373 add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' ); 374 add_action( 'init', 'wp_schedule_update_checks' ); 375 376 // Canonical 377 add_action( 'template_redirect', 'redirect_canonical' ); 378 add_action( 'template_redirect', 'wp_redirect_admin_locations', 1000 ); 379 380 // Shortcodes 381 add_filter( 'the_content', 'do_shortcode', 11 ); // AFTER wpautop() 382 383 // Media 384 add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' ); 385 add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' ); 386 387 // Nav menu 388 add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 ); 389 390 // Admin Bar 391 // Don't remove. Wrong way to disable. 392 add_action( 'template_redirect', '_wp_admin_bar_init', 0 ); 393 add_action( 'admin_init', '_wp_admin_bar_init' ); 394 add_action( 'wp_footer', 'wp_admin_bar_render', 1000 ); 395 add_action( 'in_admin_header', 'wp_admin_bar_render', 0 ); 396 397 unset( $filter, $action ); -
src/wp-includes/general-template.php
1756 1756 function delete_get_calendar_cache() { 1757 1757 wp_cache_delete( 'get_calendar', 'calendar' ); 1758 1758 } 1759 add_action( 'save_post', 'delete_get_calendar_cache' );1760 add_action( 'delete_post', 'delete_get_calendar_cache' );1761 add_action( 'update_option_start_of_week', 'delete_get_calendar_cache' );1762 add_action( 'update_option_gmt_offset', 'delete_get_calendar_cache' );1763 1759 1764 1760 /** 1765 1761 * Display all of the allowed tags in HTML format with attributes. -
src/wp-includes/kses.php
1452 1452 kses_init_filters(); 1453 1453 } 1454 1454 1455 add_action('init', 'kses_init');1456 add_action('set_current_user', 'kses_init');1457 1458 1455 /** 1459 1456 * Inline CSS filter 1460 1457 * -
src/wp-includes/media.php
1156 1156 add_action( 'wp_footer', 'wp_underscore_playlist_templates', 0 ); 1157 1157 add_action( 'admin_footer', 'wp_underscore_playlist_templates', 0 ); 1158 1158 } 1159 add_action( 'wp_playlist_scripts', 'wp_playlist_scripts' );1160 1159 1161 1160 /** 1162 1161 * The playlist shortcode. … … 2595 2594 2596 2595 $wp_scripts->add_data( 'wp-plupload', 'data', $script ); 2597 2596 } 2598 add_action( 'customize_controls_enqueue_scripts', 'wp_plupload_default_settings' );2599 2597 2600 2598 /** 2601 2599 * Prepares an attachment post object for JS, where it is expected -
src/wp-includes/ms-default-filters.php
13 13 * @since 3.0.0 14 14 */ 15 15 16 // Functions 17 add_action( 'update_option_blog_public', 'update_blog_public', 10, 2 ); 18 add_filter( 'option_users_can_register', 'users_can_register_signup_filter' ); 19 add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' ); 20 16 21 // Users 17 22 add_filter( 'wpmu_validate_user_signup', 'signup_nonce_check' ); 18 23 add_action( 'init', 'maybe_add_existing_user_to_blog' ); -
src/wp-includes/ms-functions.php
2028 2028 function update_blog_public( $old_value, $value ) { 2029 2029 update_blog_status( get_current_blog_id(), 'public', (int) $value ); 2030 2030 } 2031 add_action('update_option_blog_public', 'update_blog_public', 10, 2);2032 2031 2033 2032 /** 2034 2033 * Check whether a usermeta key has to do with the current blog. … … 2069 2068 2070 2069 return false; 2071 2070 } 2072 add_filter('option_users_can_register', 'users_can_register_signup_filter');2073 2071 2074 2072 /** 2075 2073 * Ensure that the welcome message is not empty. Currently unused. … … 2098 2096 } 2099 2097 return $text; 2100 2098 } 2101 add_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );2102 2099 2103 2100 /** 2104 2101 * Whether to force SSL on content. -
src/wp-includes/nav-menu-template.php
673 673 $_used_ids[] = $item->ID; 674 674 return $id; 675 675 } 676 add_filter( 'nav_menu_item_id', '_nav_menu_item_id_use_once', 10, 2 ); -
src/wp-includes/post-formats.php
161 161 $qvs['post_type'] = $tax->object_type; 162 162 return $qvs; 163 163 } 164 add_filter( 'request', '_post_format_request' );165 164 166 165 /** 167 166 * Filters the post format term link to remove the format prefix. … … 180 179 return add_query_arg( 'post_format', str_replace( 'post-format-', '', $term->slug ), $link ); 181 180 } 182 181 } 183 add_filter( 'term_link', '_post_format_link', 10, 3 );184 182 185 183 /** 186 184 * Remove the post format prefix from the name property of the term object created by get_term(). … … 194 192 } 195 193 return $term; 196 194 } 197 add_filter( 'get_post_format', '_post_format_get_term' );198 195 199 196 /** 200 197 * Remove the post format prefix from the name property of the term objects created by get_terms(). … … 218 215 } 219 216 return $terms; 220 217 } 221 add_filter( 'get_terms', '_post_format_get_terms', 10, 3 );222 218 223 219 /** 224 220 * Remove the post format prefix from the name property of the term objects created by wp_get_object_terms(). … … 234 230 } 235 231 return $terms; 236 232 } 237 add_filter( 'wp_get_object_terms', '_post_format_wp_get_object_terms' ); -
src/wp-includes/post.php
164 164 'exclude_from_search' => false, 165 165 ) ); 166 166 } 167 add_action( 'init', 'create_initial_post_types', 0 ); // highest priority168 167 169 168 /** 170 169 * Retrieve attached file path based on attachment ID. … … 1708 1707 add_submenu_page( $ptype_obj->show_in_menu, $ptype_obj->labels->name, $ptype_obj->labels->all_items, $ptype_obj->cap->edit_posts, "edit.php?post_type=$ptype" ); 1709 1708 } 1710 1709 } 1711 add_action( 'admin_menu', '_add_post_type_submenus' );1712 1710 1713 1711 /** 1714 1712 * Register support of certain features for a post type. … … 2707 2705 } 2708 2706 unstick_post( $post->ID ); 2709 2707 } 2710 add_action( 'before_delete_post', '_reset_front_page_settings_for_post' );2711 add_action( 'wp_trash_post', '_reset_front_page_settings_for_post' );2712 2708 2713 2709 /** 2714 2710 * Move a post or page to the Trash -
src/wp-includes/script-loader.php
1051 1051 $compress_css = false; 1052 1052 } 1053 1053 } 1054 1055 add_action( 'wp_default_scripts', 'wp_default_scripts' );1056 add_filter( 'wp_print_scripts', 'wp_just_in_time_script_localization' );1057 add_filter( 'print_scripts_array', 'wp_prototype_before_jquery' );1058 1059 add_action( 'wp_default_styles', 'wp_default_styles' );1060 add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); -
src/wp-includes/shortcodes.php
399 399 400 400 return $m[1] . $m[6]; 401 401 } 402 403 add_filter('the_content', 'do_shortcode', 11); // AFTER wpautop() -
src/wp-includes/taxonomy.php
127 127 'show_in_nav_menus' => current_theme_supports( 'post-formats' ), 128 128 ) ); 129 129 } 130 add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority131 130 132 131 /** 133 132 * Get a list of registered taxonomy objects. -
src/wp-includes/theme.php
676 676 677 677 ob_start( 'preview_theme_ob_filter' ); 678 678 } 679 add_action('setup_theme', 'preview_theme');680 679 681 680 /** 682 681 * Private function to modify the current template when previewing a theme … … 1663 1662 } 1664 1663 } 1665 1664 } 1666 add_action( 'wp_loaded', '_custom_header_background_just_in_time' );1667 1665 1668 1666 /** 1669 1667 * Gets the theme support arguments passed when registering that support … … 1872 1870 remove_theme_mod( 'background_image' ); 1873 1871 } 1874 1872 1875 add_action( 'delete_attachment', '_delete_attachment_theme_mod' );1876 1877 1873 /** 1878 1874 * Checks if a theme has been changed and runs 'after_switch_theme' hook on the next WP load 1879 1875 * … … 1930 1926 // Init Customize class 1931 1927 $GLOBALS['wp_customize'] = new WP_Customize_Manager; 1932 1928 } 1933 add_action( 'plugins_loaded', '_wp_customize_include' );1934 1929 1935 1930 /** 1936 1931 * Adds settings for the customize-loader script. … … 1966 1961 1967 1962 $wp_scripts->add_data( 'customize-loader', 'data', $script ); 1968 1963 } 1969 add_action( 'admin_enqueue_scripts', '_wp_customize_loader_settings' );1970 1964 1971 1965 /** 1972 1966 * Returns a URL to load the Customizer. -
src/wp-includes/update.php
669 669 if ( ( ! is_main_site() && ! is_network_admin() ) || ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) { 670 670 return; 671 671 } 672 673 add_action( 'admin_init', '_maybe_update_core' );674 add_action( 'wp_version_check', 'wp_version_check' );675 add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );676 677 add_action( 'load-plugins.php', 'wp_update_plugins' );678 add_action( 'load-update.php', 'wp_update_plugins' );679 add_action( 'load-update-core.php', 'wp_update_plugins' );680 add_action( 'admin_init', '_maybe_update_plugins' );681 add_action( 'wp_update_plugins', 'wp_update_plugins' );682 add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0 );683 684 add_action( 'load-themes.php', 'wp_update_themes' );685 add_action( 'load-update.php', 'wp_update_themes' );686 add_action( 'load-update-core.php', 'wp_update_themes' );687 add_action( 'admin_init', '_maybe_update_themes' );688 add_action( 'wp_update_themes', 'wp_update_themes' );689 add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );690 691 add_action( 'update_option_WPLANG', 'wp_clean_update_cache' , 10, 0 );692 693 add_action( 'wp_maybe_auto_update', 'wp_maybe_auto_update' );694 695 add_action('init', 'wp_schedule_update_checks');