-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline event handlers refactoring #551
base: master
Are you sure you want to change the base?
Inline event handlers refactoring #551
Conversation
wp_die( $api->get_error_message() . '</p> <p><a href="#" onclick="document.location.reload(); return false;">' . __( 'Try Again' ) . '</a>' ); | ||
wp_die( $api->get_error_message() . '</p> <p><a href="#" id="theme-try-again">' . __( 'Try Again' ) . '</a>' ); | ||
|
||
$js = <<<'JS' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this can't be in an external file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find instances of this method being used, so I moved the handler to an inline script for simplicity.
f6bfa19
to
ec4f41d
Compare
dbdef78
to
43b4fac
Compare
cfddf14
to
f67e4ba
Compare
75d9ecd
to
c2550c2
Compare
…dit-form-advanced.php`.
…dmin-header.php`.
…dmin-footer.php`.
…s/functions.php`.
…mage-header.php` with event handler in `js/_enqueues/admin/custom-header.js`.
…h event handler in `js/_enqueues/admin/edit-comments.js`.
…t-table.php` with event handler in `js/_enqueues/admin/link-manager.js`.
…es/meta-boxes.php` with event handler in `src/js/_enqueues/admin/link.js`.
…t-table.php` with event handler in `js/_enqueues/admin/media.js`.
…h event handler in `js/_enqueues/admin/post.js`.
…t handler in `js/_enqueues/admin/setup-config.js`.
…st-table.php` with event handler in `js/_enqueues/admin/themes-list.js`.
…` and `src/wp-admin/includes/post.php` with event handler in `wp-includes/js/metabox-events.js`.
…enus.php` with event handler in `js/_enqueues/wp/customize/nav-menus.js`.
…u-widget.php` with event handler in `js/_enqueues/wp/customize/widgets.js`.
…tall-list-table.php` with event handler in inline script.
… event handler in inline script.
…th event handler in inline script.
…handler in inline script.
…t handler in inline script.
…` with event handler in `js/_enqueues/lib/image-edit.js`.
…ent handler in `js/_enqueues/admin/media-events.js`.
…includes/ms.php` with event handler in `js/_enqueues/admin/common.js`.
…dmin/plugin-editor.php` with event handler in `js/_enqueues/wp/theme-plugin-editor.js`.
c2550c2
to
311cf6a
Compare
Trac ticket: https://core.trac.wordpress.org/ticket/51407
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.