Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<title>WordPress &#8250; 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">
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/admin-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@
?>

<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>
4 changes: 2 additions & 2 deletions src/wp-admin/admin-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

$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 ); ?>',
Expand Down Expand Up @@ -253,7 +253,7 @@
$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>

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/customize.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
?>
<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>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/edit-form-advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@
?>

<?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; ?>
2 changes: 1 addition & 1 deletion src/wp-admin/edit-form-comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
</form>

<?php if ( ! wp_is_mobile() ) : ?>
<script type="text/javascript">
<script>
try{document.post.name.focus();}catch(e){}
</script>
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/edit-tag-form.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
</div>

<?php if ( ! wp_is_mobile() ) : ?>
<script type="text/javascript">
<script>
try{document.forms.edittag.name.focus();}catch(e){}
</script>
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/edit-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@
</div><!-- /wrap -->

<?php if ( ! wp_is_mobile() ) : ?>
<script type="text/javascript">
<script>
try{document.forms.addtag['tag-name'].focus();}catch(e){}
</script>
<?php
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
function export_add_js() {
?>
<script type="text/javascript">
<script>
jQuery( function($) {
var form = $('#export-filters'),
filters = form.find('.export-filters');
Expand Down
8 changes: 4 additions & 4 deletions src/wp-admin/includes/class-bulk-upgrader-skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function error( $errors ) {
}
$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>';
}

/**
Expand Down Expand Up @@ -172,7 +172,7 @@ public function bulk_footer() {
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();
Expand Down Expand Up @@ -200,7 +200,7 @@ public function after( $title = '' ) {
)
);

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 ) {
Expand All @@ -210,7 +210,7 @@ public function after( $title = '' ) {
'</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();
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-custom-image-header.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ public function js_1() {
}
}
?>
<script type="text/javascript">
<script>
(function($){
var default_color = '<?php echo esc_js( $default_color ); ?>',
header_text_fields;
Expand Down Expand Up @@ -431,7 +431,7 @@ function toggle_text() {
public function js_2() {

?>
<script type="text/javascript">
<script>
function onEndCrop( coords ) {
jQuery( '#x1' ).val(coords.x);
jQuery( '#y1' ).val(coords.y);
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-internal-pointers.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private static function print_js( $pointer_id, $selector, $args ) {
}

?>
<script type="text/javascript">
<script>
(function($){
var options = <?php echo wp_json_encode( $args, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ); ?>, setup;

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -1871,6 +1871,6 @@ public function _js_vars() {
),
);

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 ) );
}
}
2 changes: 1 addition & 1 deletion src/wp-admin/includes/class-wp-themes-list-table.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function _js_vars( $extra_args = array() ) {
$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();
}
}
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-wp-upgrader-skin.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ protected function decrement_update_count( $type ) {
}

if ( defined( 'IFRAME_REQUEST' ) ) {
echo '<script type="text/javascript">
echo '<script>
if ( window.postMessage && JSON ) {
window.parent.postMessage(
JSON.stringify( {
Expand All @@ -258,7 +258,7 @@ protected function decrement_update_count( $type ) {
}
</script>';
} else {
echo '<script type="text/javascript">
echo '<script>
(function( wp ) {
if ( wp && wp.updates && wp.updates.decrementCount ) {
wp.updates.decrementCount( "' . $type . '" );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
Expand Down
10 changes: 5 additions & 5 deletions src/wp-admin/includes/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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(); ?>;
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/meta-boxes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/ms.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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"]'),
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) );
}

/*
Expand Down
8 changes: 4 additions & 4 deletions src/wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ); ?>',
Expand Down Expand Up @@ -2187,7 +2187,7 @@ function tb_close(){var win=window.dialogArguments||opener||parent||top;win.tb_r
$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');
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/includes/update-core.php
Original file line number Diff line number Diff line change
Expand Up @@ -1722,7 +1722,7 @@ function _redirect_to_about_wordpress( $new_version ) {
);
echo '</div>';
?>
<script type="text/javascript">
<script>
window.location = 'about.php?updated';
</script>
<?php
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,13 +470,13 @@ function display_setup_form( $error = null ) {

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' );
} );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/media-new.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@

<?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 ); ?>" />
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/site-users.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
require_once ABSPATH . 'wp-admin/admin-header.php';
?>

<script type="text/javascript">
<script>
var current_site_id = <?php echo absint( $id ); ?>;
</script>

Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/network/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
}
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&amp;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 ); ?>";
Expand Down
Loading
Loading