web/wp-admin/customize.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
equal deleted inserted replaced
203:f507feede89a 204:09a1c134465b
    42 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    42 @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
    43 
    43 
    44 wp_user_settings();
    44 wp_user_settings();
    45 _wp_admin_html_begin();
    45 _wp_admin_html_begin();
    46 
    46 
    47 $body_class = '';
    47 $body_class = 'wp-core-ui';
    48 
    48 
    49 if ( wp_is_mobile() ) :
    49 if ( wp_is_mobile() ) :
    50 	$body_class .= ' mobile';
    50 	$body_class .= ' mobile';
    51 
    51 
    52 	?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2"><?php
    52 	?><meta name="viewport" id="viewport-meta" content="width=device-width, initial-scale=0.8, minimum-scale=0.5, maximum-scale=1.2"><?php
    54 
    54 
    55 $is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
    55 $is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] );
    56 
    56 
    57 if ( $is_ios )
    57 if ( $is_ios )
    58 	$body_class .= ' ios';
    58 	$body_class .= ' ios';
       
    59 
       
    60 if ( is_rtl() )
       
    61 	$body_class .=  ' rtl';
       
    62 $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
    59 
    63 
    60 $admin_title = sprintf( __( '%1$s &#8212; WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) );
    64 $admin_title = sprintf( __( '%1$s &#8212; WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) );
    61 ?><title><?php echo $admin_title; ?></title><?php
    65 ?><title><?php echo $admin_title; ?></title><?php
    62 
    66 
    63 do_action( 'customize_controls_print_styles' );
    67 do_action( 'customize_controls_print_styles' );
    65 ?>
    69 ?>
    66 </head>
    70 </head>
    67 <body class="<?php echo esc_attr( $body_class ); ?>">
    71 <body class="<?php echo esc_attr( $body_class ); ?>">
    68 <div class="wp-full-overlay expanded">
    72 <div class="wp-full-overlay expanded">
    69 	<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
    73 	<form id="customize-controls" class="wrap wp-full-overlay-sidebar">
       
    74 
    70 		<div id="customize-header-actions" class="wp-full-overlay-header">
    75 		<div id="customize-header-actions" class="wp-full-overlay-header">
    71 			<?php
    76 			<?php
    72 				$save_text = $wp_customize->is_theme_active() ? __( 'Save &amp; Publish' ) : __( 'Save &amp; Activate' );
    77 				$save_text = $wp_customize->is_theme_active() ? __( 'Save &amp; Publish' ) : __( 'Save &amp; Activate' );
    73 				submit_button( $save_text, 'primary', 'save', false );
    78 				submit_button( $save_text, 'primary save', 'save', false );
    74 			?>
    79 			?>
    75 			<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" />
    80 			<span class="spinner"></span>
    76 			<a class="back button" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>">
    81 			<a class="back button" href="<?php echo esc_url( $return ? $return : admin_url( 'themes.php' ) ); ?>">
    77 				<?php _e( 'Cancel' ); ?>
    82 				<?php _e( 'Cancel' ); ?>
    78 			</a>
    83 			</a>
    79 		</div>
    84 		</div>
    80 
    85 
    81 		<?php
    86 		<?php
    82 			$screenshot = $wp_customize->theme()->get_screenshot();
    87 			$screenshot = $wp_customize->theme()->get_screenshot();
    83 			$cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
    88 			$cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
    84 		?>
    89 		?>
    85 
    90 
    86 		<div class="wp-full-overlay-sidebar-content">
    91 		<div class="wp-full-overlay-sidebar-content" tabindex="-1">
    87 			<div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
    92 			<div id="customize-info" class="customize-section<?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
    88 				<div class="customize-section-title">
    93 				<div class="customize-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0">
    89 					<span class="preview-notice"><?php
    94 					<span class="preview-notice"><?php
    90 						/* translators: %s is the theme name in the Customize/Live Preview pane */
    95 						/* translators: %s is the theme name in the Customize/Live Preview pane */
    91 						echo sprintf( __( 'You are previewing %s' ), '<strong class="theme-name">' . $wp_customize->theme()->display('Name') . '</strong>' );
    96 						echo sprintf( __( 'You are previewing %s' ), '<strong class="theme-name">' . $wp_customize->theme()->display('Name') . '</strong>' );
    92 					?></span>
    97 					?></span>
    93 				</div>
    98 				</div>