X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f..5d244c8fd9a27c9f89dd08da2af6fbc67d4fce63:/wp-admin/customize.php diff --git a/wp-admin/customize.php b/wp-admin/customize.php index 3cfa0c78..178db282 100644 --- a/wp-admin/customize.php +++ b/wp-admin/customize.php @@ -13,7 +13,7 @@ define( 'IFRAME_REQUEST', true ); require_once( dirname( __FILE__ ) . '/admin.php' ); if ( ! current_user_can( 'customize' ) ) { - wp_die( __( 'Cheatin’ uh?' ) ); + wp_die( __( 'Cheatin’ uh?' ), 403 ); } wp_reset_vars( array( 'url', 'return' ) ); @@ -53,8 +53,6 @@ do_action( 'customize_controls_init' ); wp_enqueue_script( 'customize-controls' ); wp_enqueue_style( 'customize-controls' ); -wp_enqueue_script( 'accordion' ); - /** * Enqueue Customizer control scripts. * @@ -78,14 +76,23 @@ endif; $is_ios = wp_is_mobile() && preg_match( '/iPad|iPod|iPhone/', $_SERVER['HTTP_USER_AGENT'] ); -if ( $is_ios ) +if ( $is_ios ) { $body_class .= ' ios'; +} -if ( is_rtl() ) - $body_class .= ' rtl'; +if ( is_rtl() ) { + $body_class .= ' rtl'; +} $body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) ); -$admin_title = sprintf( __( '%1$s — WordPress' ), strip_tags( sprintf( __( 'Customize %s' ), $wp_customize->theme()->display('Name') ) ) ); +if ( $wp_customize->is_theme_active() ) { + $document_title_tmpl = _x( 'Customize: %s', 'Placeholder is the document title from the preview' ); +} else { + $document_title_tmpl = _x( 'Live Preview: %s', 'Placeholder is the document title from the preview' ); +} +$document_title_tmpl = html_entity_decode( $document_title_tmpl, ENT_QUOTES, 'UTF-8' ); // because exported to JS and assigned to document.title +$admin_title = sprintf( $document_title_tmpl, __( 'Loading…' ) ); + ?><?php echo $admin_title; ?>