Scripts: Remove default attributes from tags.
`SCRIPT`, `STYLE`, and stylesheet `LINK` tags do not require a type attribute since the HTML5 standard was released in 2008. Removing the type attribute simplifies logic and normalizes the produced HTML content. Developed in https://github.com/WordPress/wordpress-develop/pull/10664. Follow-up to [61411], [46164]. Props jonsurrell, sabernhardt, westonruter. Fixes #64428. See #59883, #64442. Built from https://develop.svn.wordpress.org/trunk@61440 git-svn-id: http://core.svn.wordpress.org/trunk@60752 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<title>WordPress › ReadMe</title>
|
||||
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" type="text/css" />
|
||||
<link rel="stylesheet" href="wp-admin/css/install.css?ver=20100228" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
|
||||
@@ -114,6 +114,6 @@ if ( function_exists( 'get_site_option' )
|
||||
?>
|
||||
|
||||
<div class="clear"></div></div><!-- wpwrap -->
|
||||
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
|
||||
<script>if(typeof wpOnload==='function')wpOnload();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -101,7 +101,7 @@ wp_enqueue_script( 'svg-painter' );
|
||||
|
||||
$admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
||||
pagenow = '<?php echo esc_js( $current_screen->id ); ?>',
|
||||
@@ -253,7 +253,7 @@ $admin_body_classes = apply_filters( 'admin_body_class', '' );
|
||||
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
|
||||
?>
|
||||
<body class="wp-admin wp-core-ui no-js <?php echo esc_attr( $admin_body_classes ); ?>">
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
document.body.className = document.body.className.replace('no-js','js');
|
||||
</script>
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ $admin_title = sprintf( $wp_customize->get_document_title_template(), __( 'Loadi
|
||||
?>
|
||||
<title><?php echo esc_html( $admin_title ); ?></title>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var ajaxurl = <?php echo wp_json_encode( admin_url( 'admin-ajax.php', 'relative' ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>,
|
||||
pagenow = 'customize';
|
||||
</script>
|
||||
|
||||
@@ -769,7 +769,7 @@ if ( post_type_supports( $post_type, 'comments' ) ) {
|
||||
?>
|
||||
|
||||
<?php if ( ! wp_is_mobile() && post_type_supports( $post_type, 'title' ) && '' === $post->post_title ) : ?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
try{document.post.title.focus();}catch(e){}
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -283,7 +283,7 @@ $referer = wp_get_referer();
|
||||
</form>
|
||||
|
||||
<?php if ( ! wp_is_mobile() ) : ?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
try{document.post.name.focus();}catch(e){}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -312,7 +312,7 @@ do_action( "{$taxonomy}_edit_form", $tag, $taxonomy );
|
||||
</div>
|
||||
|
||||
<?php if ( ! wp_is_mobile() ) : ?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
try{document.forms.edittag.name.focus();}catch(e){}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -689,7 +689,7 @@ if ( $can_edit_terms ) {
|
||||
</div><!-- /wrap -->
|
||||
|
||||
<?php if ( ! wp_is_mobile() ) : ?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
try{document.forms.addtag['tag-name'].focus();}catch(e){}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -26,7 +26,7 @@ $title = __( 'Export' );
|
||||
*/
|
||||
function export_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function($) {
|
||||
var form = $('#export-filters'),
|
||||
filters = form.find('.export-filters');
|
||||
|
||||
@@ -141,7 +141,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
}
|
||||
$this->error = implode( ', ', $messages );
|
||||
}
|
||||
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
|
||||
echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -172,7 +172,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
public function before( $title = '' ) {
|
||||
$this->in_loop = true;
|
||||
printf( '<h2>' . $this->upgrader->strings['skin_before_update_header'] . ' <span class="spinner waiting-' . $this->upgrader->update_current . '"></span></h2>', $title, $this->upgrader->update_current, $this->upgrader->update_count );
|
||||
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').css("display", "inline-block");</script>';
|
||||
echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').css("display", "inline-block");</script>';
|
||||
// This progress messages div gets moved via JavaScript when clicking on "More details.".
|
||||
echo '<div class="update-messages hide-if-js" id="progress-' . esc_attr( $this->upgrader->update_current ) . '"><p>';
|
||||
$this->flush_output();
|
||||
@@ -200,7 +200,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
)
|
||||
);
|
||||
|
||||
echo '<script type="text/javascript">jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>';
|
||||
echo '<script>jQuery(\'#progress-' . esc_js( $this->upgrader->update_current ) . '\').show();</script>';
|
||||
}
|
||||
if ( $this->result && ! is_wp_error( $this->result ) ) {
|
||||
if ( ! $this->error ) {
|
||||
@@ -210,7 +210,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
|
||||
'</p></div>';
|
||||
}
|
||||
|
||||
echo '<script type="text/javascript">jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
|
||||
echo '<script>jQuery(\'.waiting-' . esc_js( $this->upgrader->update_current ) . '\').hide();</script>';
|
||||
}
|
||||
|
||||
$this->reset();
|
||||
|
||||
@@ -376,7 +376,7 @@ class Custom_Image_Header {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
(function($){
|
||||
var default_color = '<?php echo esc_js( $default_color ); ?>',
|
||||
header_text_fields;
|
||||
@@ -431,7 +431,7 @@ class Custom_Image_Header {
|
||||
public function js_2() {
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
function onEndCrop( coords ) {
|
||||
jQuery( '#x1' ).val(coords.x);
|
||||
jQuery( '#y1' ).val(coords.y);
|
||||
|
||||
@@ -118,7 +118,7 @@ final class WP_Internal_Pointers {
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
(function($){
|
||||
var options = <?php echo wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>, setup;
|
||||
|
||||
|
||||
@@ -1871,6 +1871,6 @@ class WP_List_Table {
|
||||
),
|
||||
);
|
||||
|
||||
printf( "<script type='text/javascript'>list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
|
||||
printf( "<script>list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,7 +357,7 @@ class WP_Themes_List_Table extends WP_List_Table {
|
||||
$args = array_merge( $args, $extra_args );
|
||||
}
|
||||
|
||||
printf( "<script type='text/javascript'>var theme_list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
|
||||
printf( "<script>var theme_list_args = %s;</script>\n", wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) );
|
||||
parent::_js_vars();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -245,7 +245,7 @@ class WP_Upgrader_Skin {
|
||||
}
|
||||
|
||||
if ( defined( 'IFRAME_REQUEST' ) ) {
|
||||
echo '<script type="text/javascript">
|
||||
echo '<script>
|
||||
if ( window.postMessage && JSON ) {
|
||||
window.parent.postMessage(
|
||||
JSON.stringify( {
|
||||
@@ -258,7 +258,7 @@ class WP_Upgrader_Skin {
|
||||
}
|
||||
</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">
|
||||
echo '<script>
|
||||
(function( wp ) {
|
||||
if ( wp && wp.updates && wp.updates.decrementCount ) {
|
||||
wp.updates.decrementCount( "' . $type . '" );
|
||||
|
||||
@@ -1511,7 +1511,7 @@ function post_form_autocomplete_off() {
|
||||
*/
|
||||
function options_permalink_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function() {
|
||||
jQuery('.permalink-structure input:radio').change(function() {
|
||||
if ( 'custom' == this.value )
|
||||
|
||||
@@ -272,7 +272,7 @@ function _cleanup_image_add_caption( $matches ) {
|
||||
*/
|
||||
function media_send_to_editor( $html ) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var win = window.dialogArguments || opener || parent || top;
|
||||
win.send_to_editor( <?php echo wp_json_encode( $html, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?> );
|
||||
</script>
|
||||
@@ -550,7 +550,7 @@ function wp_iframe( $content_func, ...$args ) {
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>', pagenow = 'media-upload-popup', adminpage = 'media-upload-popup',
|
||||
isRtl = <?php echo (int) is_rtl(); ?>;
|
||||
@@ -612,7 +612,7 @@ function wp_iframe( $content_func, ...$args ) {
|
||||
?>
|
||||
</head>
|
||||
<body<?php echo $body_id_attr; ?> class="wp-core-ui no-js">
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
document.body.className = document.body.className.replace('no-js', 'js');
|
||||
</script>
|
||||
<?php
|
||||
@@ -623,7 +623,7 @@ function wp_iframe( $content_func, ...$args ) {
|
||||
do_action( 'admin_print_footer_scripts' );
|
||||
|
||||
?>
|
||||
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
|
||||
<script>if(typeof wpOnload==='function')wpOnload();</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
@@ -821,7 +821,7 @@ function media_upload_form_handler() {
|
||||
|
||||
if ( isset( $_POST['insert-gallery'] ) || isset( $_POST['update-gallery'] ) ) {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var win = window.dialogArguments || opener || parent || top;
|
||||
win.tb_remove();
|
||||
</script>
|
||||
@@ -2070,7 +2070,7 @@ function get_compat_media_markup( $attachment_id, $args = null ) {
|
||||
function media_upload_header() {
|
||||
$post_id = isset( $_REQUEST['post_id'] ) ? (int) $_REQUEST['post_id'] : 0;
|
||||
|
||||
echo '<script type="text/javascript">post_id = ' . $post_id . ';</script>';
|
||||
echo '<script>post_id = ' . $post_id . ';</script>';
|
||||
|
||||
if ( empty( $_GET['chromeless'] ) ) {
|
||||
echo '<div id="media-upload-header">';
|
||||
@@ -2219,7 +2219,7 @@ function media_upload_form( $errors = null ) {
|
||||
$plupload_init = apply_filters( 'plupload_init', $plupload_init );
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
<?php
|
||||
// Verify size is an int. If not return default value.
|
||||
$large_size_h = absint( get_option( 'large_size_h' ) );
|
||||
@@ -2361,7 +2361,7 @@ function media_upload_type_form( $type = 'file', $errors = null, $id = null ) {
|
||||
|
||||
<?php media_upload_form( $errors ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery(function($){
|
||||
var preloaded = $(".media-item.preloaded");
|
||||
if ( preloaded.length > 0 ) {
|
||||
@@ -2427,7 +2427,7 @@ function media_upload_type_url_form( $type = null, $errors = null, $id = null )
|
||||
|
||||
<h3 class="media-title"><?php _e( 'Insert media from another website' ); ?></h3>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var addExtImage = {
|
||||
|
||||
width : '',
|
||||
@@ -2568,7 +2568,7 @@ function media_upload_gallery_form( $errors ) {
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery(function($){
|
||||
var preloaded = $(".media-item.preloaded");
|
||||
if ( preloaded.length > 0 ) {
|
||||
@@ -2896,7 +2896,7 @@ function media_upload_library_form( $errors ) {
|
||||
<form enctype="multipart/form-data" method="post" action="<?php echo esc_url( $form_action_url ); ?>" class="<?php echo $form_class; ?>" id="library-form">
|
||||
<?php wp_nonce_field( 'media-form' ); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery(function($){
|
||||
var preloaded = $(".media-item.preloaded");
|
||||
if ( preloaded.length > 0 ) {
|
||||
|
||||
@@ -914,7 +914,7 @@ function post_comment_meta_box( $post ) {
|
||||
$hidden = get_hidden_meta_boxes( get_current_screen() );
|
||||
if ( ! in_array( 'commentsdiv', $hidden, true ) ) {
|
||||
?>
|
||||
<script type="text/javascript">jQuery(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
|
||||
<script>jQuery(function(){commentsBox.get(<?php echo $total; ?>, 10);});</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
@@ -1080,7 +1080,7 @@ function wp_color_scheme_settings() {
|
||||
);
|
||||
}
|
||||
|
||||
echo '<script type="text/javascript">var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ";</script>\n";
|
||||
echo '<script>var _wpColorScheme = ' . wp_json_encode( array( 'icons' => $icon_colors ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ";</script>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -847,7 +847,7 @@ function can_edit_network( $network_id ) {
|
||||
*/
|
||||
function _thickbox_path_admin_subfolder() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var tb_pathToImage = "<?php echo esc_js( includes_url( 'js/thickbox/loadingAnimation.gif', 'relative' ) ); ?>";
|
||||
</script>
|
||||
<?php
|
||||
@@ -1010,7 +1010,7 @@ function confirm_delete_users( $users ) {
|
||||
*/
|
||||
function network_settings_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function($) {
|
||||
var languageSelect = $( '#WPLANG' );
|
||||
$( 'form' ).on( 'submit', function() {
|
||||
|
||||
@@ -33,7 +33,7 @@ function options_discussion_add_js() {
|
||||
*/
|
||||
function options_general_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function($) {
|
||||
var $siteName = $( '#wp-admin-bar-site-name' ).children( 'a' ).first(),
|
||||
$siteIconPreview = $('#site-icon-preview-site-title'),
|
||||
@@ -112,7 +112,7 @@ function options_general_add_js() {
|
||||
*/
|
||||
function options_reading_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function($) {
|
||||
var section = $('#front-static-pages'),
|
||||
staticPage = section.find('input:radio[value="page"]'),
|
||||
|
||||
@@ -2460,7 +2460,7 @@ function the_block_editor_meta_boxes() {
|
||||
* will not be printed again after this point.
|
||||
*/
|
||||
if ( wp_script_is( 'wp-edit-post', 'done' ) ) {
|
||||
printf( "<script type='text/javascript'>\n%s\n</script>\n", trim( $script ) );
|
||||
printf( "<script>\n%s\n</script>\n", trim( $script ) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -2138,7 +2138,7 @@ function iframe_header( $title = '', $deprecated = false ) {
|
||||
<?php
|
||||
wp_enqueue_style( 'colors' );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
addLoadEvent = function(func){if(typeof jQuery!=='undefined')jQuery(function(){func();});else if(typeof wpOnload!=='function'){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
|
||||
function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_remove();}
|
||||
var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?>',
|
||||
@@ -2187,7 +2187,7 @@ var ajaxurl = '<?php echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ); ?
|
||||
$admin_body_classes = ltrim( $admin_body_classes . ' ' . $admin_body_class );
|
||||
?>
|
||||
<body <?php echo $admin_body_id; ?>class="wp-admin wp-core-ui no-js iframe <?php echo esc_attr( $admin_body_classes ); ?>">
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
(function(){
|
||||
var c = document.body.className;
|
||||
c = c.replace(/no-js/, 'js');
|
||||
@@ -2226,7 +2226,7 @@ function iframe_footer() {
|
||||
do_action( 'admin_print_footer_scripts' );
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">if(typeof wpOnload==='function')wpOnload();</script>
|
||||
<script>if(typeof wpOnload==='function')wpOnload();</script>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
@@ -2495,7 +2495,7 @@ function get_media_states( $post ) {
|
||||
*/
|
||||
function compression_test() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var compressionNonce = <?php echo wp_json_encode( wp_create_nonce( 'update_can_compress_scripts' ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>;
|
||||
var testCompression = {
|
||||
get : function(test) {
|
||||
|
||||
@@ -1720,7 +1720,7 @@ function _redirect_to_about_wordpress( $new_version ) {
|
||||
);
|
||||
echo '</div>';
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
window.location = 'about.php?updated';
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -470,13 +470,13 @@ switch ( $step ) {
|
||||
|
||||
if ( ! wp_is_mobile() ) {
|
||||
?>
|
||||
<script type="text/javascript">var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
|
||||
<script>var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
|
||||
<?php
|
||||
}
|
||||
|
||||
wp_print_scripts( $scripts_to_print );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function( $ ) {
|
||||
$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
|
||||
} );
|
||||
|
||||
@@ -77,7 +77,7 @@ if ( get_user_setting( 'uploader' ) || isset( $_GET['browser-uploader'] ) ) {
|
||||
|
||||
<?php media_upload_form(); ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var post_id = <?php echo absint( $post_id ); ?>, shortform = 3;
|
||||
</script>
|
||||
<input type="hidden" name="post_id" id="post_id" value="<?php echo absint( $post_id ); ?>" />
|
||||
|
||||
@@ -236,7 +236,7 @@ if ( ! wp_is_large_network( 'users' ) && apply_filters( 'show_network_site_users
|
||||
require_once ABSPATH . 'wp-admin/admin-header.php';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var current_site_id = <?php echo absint( $id ); ?>;
|
||||
</script>
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ switch ( $action ) {
|
||||
}
|
||||
echo '</ul>';
|
||||
?><p><?php _e( 'If your browser does not start loading the next page automatically, click this link:' ); ?> <a class="button" href="upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>"><?php _e( 'Next Sites' ); ?></a></p>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
<!--
|
||||
function nextpage() {
|
||||
location.href = "upgrade.php?action=upgrade&n=<?php echo ( $n + 5 ); ?>";
|
||||
|
||||
@@ -210,7 +210,7 @@ function dismissed_updates() {
|
||||
$show_text = esc_js( __( 'Show hidden updates' ) );
|
||||
$hide_text = esc_js( __( 'Hide hidden updates' ) );
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function( $ ) {
|
||||
$( '#show-dismissed' ).on( 'click', function() {
|
||||
var isExpanded = ( 'true' === $( this ).attr( 'aria-expanded' ) );
|
||||
@@ -935,7 +935,7 @@ function do_core_upgrade( $reinstall = false ) {
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
window.location = '<?php echo esc_url( self_admin_url( 'about.php?updated' ) ); ?>';
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -967,13 +967,13 @@ switch ( $action ) {
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
if (window.location.hash == '#password') {
|
||||
document.getElementById('pass1').focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function( $ ) {
|
||||
var languageSelect = $( '#locale' );
|
||||
$( 'form' ).on( 'submit', function() {
|
||||
|
||||
@@ -369,7 +369,7 @@ if ( ! function_exists( 'twentyeleven_admin_header_style' ) ) :
|
||||
*/
|
||||
function twentyeleven_admin_header_style() {
|
||||
?>
|
||||
<style type="text/css" id="twentyeleven-admin-header-css">
|
||||
<style id="twentyeleven-admin-header-css">
|
||||
.appearance_page_custom-header #headimg {
|
||||
border: none;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
api = wp.customize;
|
||||
|
||||
if ( ! $style.length ) {
|
||||
$style = $( 'head' ).append( '<style type="text/css" id="twentyfifteen-color-scheme-css" />' )
|
||||
$style = $( 'head' ).append( '<style id="twentyfifteen-color-scheme-css" />' )
|
||||
.find( '#twentyfifteen-color-scheme-css' );
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ if ( ! function_exists( 'twentyfourteen_admin_header_style' ) ) :
|
||||
*/
|
||||
function twentyfourteen_admin_header_style() {
|
||||
?>
|
||||
<style type="text/css" id="twentyfourteen-admin-header-css">
|
||||
<style id="twentyfourteen-admin-header-css">
|
||||
.appearance_page_custom-header #headimg {
|
||||
background-color: #000;
|
||||
border: none;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
api = wp.customize;
|
||||
|
||||
if ( ! style.length ) {
|
||||
style = $( 'head' ).append( '<style type="text/css" id="twentysixteen-color-scheme-css" />' )
|
||||
style = $( 'head' ).append( '<style id="twentysixteen-color-scheme-css" />' )
|
||||
.find( '#twentysixteen-color-scheme-css' );
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ get_header(); ?>
|
||||
|
||||
</div><!-- #content -->
|
||||
</div><!-- #container -->
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
// Focus on search field after it has loaded.
|
||||
document.getElementById('s') && document.getElementById('s').focus();
|
||||
</script>
|
||||
|
||||
@@ -154,7 +154,7 @@ function twentythirteen_header_style() {
|
||||
function twentythirteen_admin_header_style() {
|
||||
$header_image = get_header_image();
|
||||
?>
|
||||
<style type="text/css" id="twentythirteen-admin-header-css">
|
||||
<style id="twentythirteen-admin-header-css">
|
||||
.appearance_page_custom-header #headimg {
|
||||
border: none;
|
||||
-webkit-box-sizing: border-box;
|
||||
|
||||
@@ -107,7 +107,7 @@ function twentytwelve_header_style() {
|
||||
*/
|
||||
function twentytwelve_admin_header_style() {
|
||||
?>
|
||||
<style type="text/css" id="twentytwelve-admin-header-css">
|
||||
<style id="twentytwelve-admin-header-css">
|
||||
.appearance_page_custom-header #headimg {
|
||||
border: none;
|
||||
font-family: "Open Sans", Helvetica, Arial, sans-serif;
|
||||
|
||||
@@ -978,7 +978,7 @@ final class _WP_Editors {
|
||||
}
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
window.wp = window.wp || {};
|
||||
window.wp.editor = window.wp.editor || {};
|
||||
window.wp.editor.getDefaultSettings = function() {
|
||||
@@ -1563,7 +1563,7 @@ final class _WP_Editors {
|
||||
|
||||
wp_print_scripts( array( 'wp-tinymce' ) );
|
||||
|
||||
echo "<script type='text/javascript'>\n" . self::wp_mce_translation() . "</script>\n";
|
||||
echo "<script>\n" . self::wp_mce_translation() . "</script>\n";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1620,7 +1620,7 @@ final class _WP_Editors {
|
||||
do_action( 'before_wp_tiny_mce', self::$mce_settings );
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
tinyMCEPreInit = {
|
||||
baseURL: "<?php echo $baseurl; ?>",
|
||||
suffix: "<?php echo $suffix; ?>",
|
||||
@@ -1644,7 +1644,7 @@ final class _WP_Editors {
|
||||
|
||||
if ( self::$ext_plugins ) {
|
||||
// Load the old-format English strings to prevent unsightly labels in old style popups.
|
||||
echo "<script type='text/javascript' src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
|
||||
echo "<script src='{$baseurl}/langs/wp-langs-en.js?$version'></script>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1659,7 +1659,7 @@ final class _WP_Editors {
|
||||
do_action( 'wp_tiny_mce_init', self::$mce_settings );
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
<?php
|
||||
|
||||
if ( self::$ext_plugins ) {
|
||||
|
||||
@@ -88,7 +88,7 @@ class WP_Embed {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
jQuery( function($) {
|
||||
$.get("<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ) . '?action=oembed-cache&post=' . $post->ID; ?>");
|
||||
} );
|
||||
|
||||
26
wp-includes/css/dist/index.php
vendored
26
wp-includes/css/dist/index.php
vendored
@@ -22,6 +22,11 @@ return array(
|
||||
'path' => 'preferences/style',
|
||||
'dependencies' => array('wp-components'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-commands',
|
||||
'path' => 'commands/style',
|
||||
'dependencies' => array('wp-components'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-reusable-blocks',
|
||||
'path' => 'reusable-blocks/style',
|
||||
@@ -32,11 +37,6 @@ return array(
|
||||
'path' => 'patterns/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-components'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-commands',
|
||||
'path' => 'commands/style',
|
||||
'dependencies' => array('wp-components'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-widgets',
|
||||
'path' => 'widgets/style',
|
||||
@@ -67,26 +67,26 @@ return array(
|
||||
'path' => 'customize-widgets/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-preferences', 'wp-widgets'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-edit-widgets',
|
||||
'path' => 'edit-widgets/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-edit-post',
|
||||
'path' => 'edit-post/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-commands', 'wp-components', 'wp-editor', 'wp-preferences', 'wp-widgets'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-block-library',
|
||||
'path' => 'block-library/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-components', 'wp-patterns'),
|
||||
'handle' => 'wp-edit-widgets',
|
||||
'path' => 'edit-widgets/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-block-library', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences', 'wp-widgets'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-editor',
|
||||
'path' => 'editor/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-commands', 'wp-components', 'wp-media-utils', 'wp-patterns', 'wp-preferences'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-block-library',
|
||||
'path' => 'block-library/style',
|
||||
'dependencies' => array('wp-block-editor', 'wp-components', 'wp-patterns'),
|
||||
),
|
||||
array(
|
||||
'handle' => 'wp-block-editor',
|
||||
'path' => 'block-editor/style',
|
||||
|
||||
20
wp-includes/js/dist/script-modules/index.php
vendored
20
wp-includes/js/dist/script-modules/index.php
vendored
@@ -22,6 +22,11 @@ return array(
|
||||
'path' => 'latex-to-mathml/loader',
|
||||
'asset' => 'latex-to-mathml/loader.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/abilities',
|
||||
'path' => 'abilities/index',
|
||||
'asset' => 'abilities/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/interactivity-router',
|
||||
'path' => 'interactivity-router/index',
|
||||
@@ -32,11 +37,6 @@ return array(
|
||||
'path' => 'interactivity-router/full-page',
|
||||
'asset' => 'interactivity-router/full-page.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/abilities',
|
||||
'path' => 'abilities/index',
|
||||
'asset' => 'abilities/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/a11y',
|
||||
'path' => 'a11y/index',
|
||||
@@ -47,16 +47,16 @@ return array(
|
||||
'path' => 'core-abilities/index',
|
||||
'asset' => 'core-abilities/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/edit-site-init',
|
||||
'path' => 'edit-site-init/index',
|
||||
'asset' => 'edit-site-init/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/route',
|
||||
'path' => 'route/index',
|
||||
'asset' => 'route/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/edit-site-init',
|
||||
'path' => 'edit-site-init/index',
|
||||
'asset' => 'edit-site-init/index.min.asset.php',
|
||||
),
|
||||
array(
|
||||
'id' => '@wordpress/lazy-editor',
|
||||
'path' => 'lazy-editor/index',
|
||||
|
||||
@@ -3488,7 +3488,7 @@ function wp_enqueue_command_palette_assets() {
|
||||
* 'sayHello();' === wp_remove_surrounding_empty_script_tags( $js );
|
||||
*
|
||||
* // Otherwise if anything is different it warns in the JS console.
|
||||
* $js = '<script type="text/javascript">console.log( "hi" );</script>';
|
||||
* $js = '<script type="module">console.log( "hi" );</script>';
|
||||
* 'console.error( ... )' === wp_remove_surrounding_empty_script_tags( $js );
|
||||
*
|
||||
* @since 6.4.0
|
||||
|
||||
@@ -69,7 +69,7 @@ function wp_attach_theme_preview_middleware() {
|
||||
function wp_block_theme_activate_nonce() {
|
||||
$nonce_handle = 'switch-theme_' . wp_get_theme_preview_path();
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
window.WP_BLOCK_THEME_ACTIVATE_NONCE = <?php echo wp_json_encode( wp_create_nonce( $nonce_handle ), JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>;
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@@ -1893,11 +1893,9 @@ function _custom_background_cb() {
|
||||
$color = false;
|
||||
}
|
||||
|
||||
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
|
||||
|
||||
if ( ! $background && ! $color ) {
|
||||
if ( is_customize_preview() ) {
|
||||
printf( '<style%s id="custom-background-css"></style>', $type_attr );
|
||||
echo '<style id="custom-background-css"></style>';
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1951,7 +1949,7 @@ function _custom_background_cb() {
|
||||
$style .= $image . $position . $size . $repeat . $attachment;
|
||||
}
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( "<style{$type_attr} id=\"custom-background-css\"></style>" );
|
||||
$processor = new WP_HTML_Tag_Processor( '<style id="custom-background-css"></style>' );
|
||||
$processor->next_tag();
|
||||
|
||||
$style_tag_content = 'body.custom-background { ' . trim( $style ) . ' }';
|
||||
@@ -1972,9 +1970,6 @@ function wp_custom_css_cb() {
|
||||
|
||||
$processor = new WP_HTML_Tag_Processor( '<style></style>' );
|
||||
$processor->next_tag();
|
||||
if ( ! current_theme_supports( 'html5', 'style' ) ) {
|
||||
$processor->set_attribute( 'type', 'text/css' );
|
||||
}
|
||||
$processor->set_attribute( 'id', 'wp-custom-css' );
|
||||
$processor->set_modifiable_text( "\n{$styles}\n" );
|
||||
echo "{$processor->get_updated_html()}\n";
|
||||
@@ -3006,11 +3001,9 @@ function _custom_logo_header_styles() {
|
||||
$classes = (array) get_theme_support( 'custom-logo', 'header-text' );
|
||||
$classes = array_map( 'sanitize_html_class', $classes );
|
||||
$classes = '.' . implode( ', .', $classes );
|
||||
|
||||
$type_attr = current_theme_supports( 'html5', 'style' ) ? '' : ' type="text/css"';
|
||||
?>
|
||||
<!-- Custom Logo: hide header text -->
|
||||
<style id="custom-logo-css"<?php echo $type_attr; ?>>
|
||||
<style id="custom-logo-css">
|
||||
<?php echo $classes; ?> {
|
||||
position: absolute;
|
||||
clip-path: inset(50%);
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '7.0-alpha-61439';
|
||||
$wp_version = '7.0-alpha-61440';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
||||
Reference in New Issue
Block a user