Skip to content
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

Don't load PHP classes in WP5+ #11019

Closed
wants to merge 1 commit into from
Closed

Don't load PHP classes in WP5+ #11019

wants to merge 1 commit into from

Conversation

mcsf
Copy link
Contributor

@mcsf mcsf commented Oct 24, 2018

Description

See report in Core: https://core.trac.wordpress.org/ticket/45157

Edit: Superseded by #11375.

See diff with no whitespace changes.

After a lot of back-and-forth, I suspect any failure we may see here is due to interactions caused by Gutenberg-dependent plugins. The class_exists guards should be more than enough to allow the plugin to run on both 4.9.8 and 5.0. In any case, we can try to shield the user even more by checking that we're running 4.9.x before loading classes in the plugin.

How has this been tested?

Plugin should work in 4.9 and 5.0. Test server-side interactions, like editing Latest Posts, viewing Latest Posts on the frontend. If you have a plugin using server-side knowledge of blocks, try that too.

Note: Latest Comments seems to be having problems in core regardless of the plugin.

Screenshots

Types of changes

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@mcsf mcsf added [Priority] High Used to indicate top priority items that need quick attention Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts Backwards Compatibility Issues or PRs that impact backwards compatability labels Oct 24, 2018
@mcsf
Copy link
Contributor Author

mcsf commented Oct 24, 2018

Perhaps we can reassess core's upgrade framework to see how it can avoid loading plugin classes that could conflict with an upgrade. As for this PR, it's not really useful. cc @pento

@mcsf mcsf closed this Oct 24, 2018
@mcsf mcsf deleted the add/4-9-compat branch October 24, 2018 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant