diff --git src/wp-includes/admin-bar.php src/wp-includes/admin-bar.php
index 83deb96..2b11b5b 100644
|
|
|
function wp_admin_bar_render() {
|
| 71 | 71 | if ( ! is_admin_bar_showing() || ! is_object( $wp_admin_bar ) ) |
| 72 | 72 | return; |
| 73 | 73 | |
| | 74 | $switched = switch_to_locale( get_user_locale() ); |
| | 75 | |
| 74 | 76 | /** |
| 75 | 77 | * Load all necessary admin bar items. |
| 76 | 78 | * |
| … |
… |
function wp_admin_bar_render() {
|
| 97 | 99 | * @since 3.1.0 |
| 98 | 100 | */ |
| 99 | 101 | do_action( 'wp_after_admin_bar_render' ); |
| | 102 | |
| | 103 | if ( $switched ) { |
| | 104 | restore_previous_locale(); |
| | 105 | } |
| 100 | 106 | } |
| 101 | 107 | |
| 102 | 108 | /** |
| … |
… |
function _get_admin_bar_pref( $context = 'front', $user = 0 ) {
|
| 1003 | 1009 | |
| 1004 | 1010 | return 'true' === $pref; |
| 1005 | 1011 | } |
| | 1012 | |
| | 1013 | /** |
| | 1014 | * Temporarily changes the text direction when printing admin bar styles. |
| | 1015 | * |
| | 1016 | * @param string $html The link tag for the enqueued style. |
| | 1017 | * @param string $handle The style's registered handle. |
| | 1018 | * |
| | 1019 | * @return string The link tag for the enqueued style. |
| | 1020 | */ |
| | 1021 | function _admin_bar_style_set_text_direction( $html, $handle ) { |
| | 1022 | static $text_direction = null; |
| | 1023 | |
| | 1024 | if ( ! is_admin() && 'admin-bar' === $handle ) { |
| | 1025 | $switched = switch_to_locale( get_user_locale() ); |
| | 1026 | |
| | 1027 | $text_direction = wp_styles()->text_direction; |
| | 1028 | |
| | 1029 | wp_styles()->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr'; |
| | 1030 | |
| | 1031 | if ( $switched ) { |
| | 1032 | restore_previous_locale(); |
| | 1033 | } |
| | 1034 | } else if ( null !== $text_direction ) { |
| | 1035 | wp_styles()->text_direction = $text_direction; |
| | 1036 | } |
| | 1037 | |
| | 1038 | return $html; |
| | 1039 | } |
diff --git src/wp-includes/default-filters.php src/wp-includes/default-filters.php
index 5a73975..fefe7df 100644
|
|
|
add_filter( 'customize_controls_print_styles', 'wp_resource_hints', 1 );
|
| 434 | 434 | |
| 435 | 435 | add_action( 'wp_default_styles', 'wp_default_styles' ); |
| 436 | 436 | add_filter( 'style_loader_src', 'wp_style_loader_src', 10, 2 ); |
| | 437 | add_filter( 'style_loader_tag', '_admin_bar_style_loader_tag', 10, 2 ); |
| 437 | 438 | |
| 438 | 439 | // Taxonomy |
| 439 | 440 | add_action( 'init', 'create_initial_taxonomies', 0 ); // highest priority |