Skip to content

Inline event handlers refactoring#551

Open
enricocarraro wants to merge 77 commits into
WordPress:masterfrom
enricocarraro:inline_event_handlers_refactoring
Open

Inline event handlers refactoring#551
enricocarraro wants to merge 77 commits into
WordPress:masterfrom
enricocarraro:inline_event_handlers_refactoring

Conversation

@enricocarraro
Copy link
Copy Markdown

@enricocarraro enricocarraro commented Sep 23, 2020

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.

Comment thread src/wp-includes/script-loader.php
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'
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Author

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.

Comment thread src/js/_enqueues/wp/theme-plugin-editor.js Outdated
Comment thread src/wp-admin/edit-form-advanced.php Outdated
Comment thread src/js/_enqueues/admin/themes-list.js Outdated
Comment thread src/wp-admin/setup-config.php
Comment thread Gruntfile.js Outdated
Comment thread src/wp-includes/script-loader.php Outdated
Comment thread src/wp-includes/blocks/archives.php Outdated
Comment thread src/wp-includes/functions.php Outdated
Comment thread src/js/_enqueues/admin/common.js Outdated
Comment thread src/wp-includes/functions.php Outdated
Comment thread src/wp-includes/functions.php Outdated
@enricocarraro enricocarraro force-pushed the inline_event_handlers_refactoring branch 2 times, most recently from f6bfa19 to ec4f41d Compare October 8, 2020 11:03
Comment thread src/js/_enqueues/vendor/thickbox/thickbox.js Outdated
@enricocarraro enricocarraro force-pushed the inline_event_handlers_refactoring branch 2 times, most recently from dbdef78 to 43b4fac Compare October 8, 2020 20:21
@enricocarraro enricocarraro deleted the inline_event_handlers_refactoring branch October 15, 2020 14:19
@enricocarraro enricocarraro reopened this Oct 15, 2020
@enricocarraro enricocarraro force-pushed the inline_event_handlers_refactoring branch 2 times, most recently from cfddf14 to f67e4ba Compare October 15, 2020 14:42
@enricocarraro enricocarraro force-pushed the inline_event_handlers_refactoring branch 5 times, most recently from 75d9ecd to c2550c2 Compare October 20, 2020 08:30
…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.
…` 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`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants