Skip to content
Open
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
10 changes: 9 additions & 1 deletion src/wp-admin/admin-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,14 @@
?>

<div class="clear"></div></div><!-- wpwrap -->
<script>if(typeof wpOnload==='function')wpOnload();</script>
<?php
wp_print_inline_script_tag(
<<<'JS'
if ( typeof wpOnload === 'function' ) {
wpOnload();
}
JS
);
?>
</body>
</html>
10 changes: 9 additions & 1 deletion src/wp-admin/async-upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,15 @@
$_FILES['async-upload']['name']
);

echo '<script>_.delay(function() {wp.a11y.speak(' . wp_json_encode( $speak_message, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ) . ");}, 1500);jQuery( 'button#{$button_unique_id}' ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );jQuery( '#plupload-browse-button' ).trigger( 'focus' );})});</script>\n";
wp_print_inline_script_tag(
sprintf(
<<<'JS'
_.delay(function() {wp.a11y.speak(%s);}, 1500);jQuery( %s ).on( 'click', function() {jQuery(this).parents('div.media-item').slideUp(200, function(){jQuery(this).remove();wp.a11y.speak( wp.i18n.__( 'Error dismissed.' ) );jQuery( '#plupload-browse-button' ).trigger( 'focus' );})});
JS,
wp_json_encode( $speak_message, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
wp_json_encode( 'button#' . $button_unique_id )
)
);
exit;
}

Expand Down
24 changes: 16 additions & 8 deletions src/wp-admin/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -470,17 +470,25 @@ function display_setup_form( $error = null ) {
}

if ( ! wp_is_mobile() ) {
?>
<script>var t = document.getElementById('weblog_title'); if (t){ t.focus(); }</script>
<?php
wp_print_inline_script_tag(
<<<'JS'
var t = document.getElementById( 'weblog_title' );
if ( t ) {
t.focus();
}
JS
);
}

wp_print_scripts( $scripts_to_print );

wp_print_inline_script_tag(
<<<'JS'
jQuery( function( $ ) {
$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
} );
JS
);
?>
<script>
jQuery( function( $ ) {
$( '.hide-if-no-js' ).removeClass( 'hide-if-no-js' );
} );
</script>
</body>
</html>
Loading