-
Notifications
You must be signed in to change notification settings - Fork 798
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
Classic Theme Helper Plugin: Ensure Featured Content and imported / required files in the package are initialized #38156
Classic Theme Helper Plugin: Ensure Featured Content and imported / required files in the package are initialized #38156
Conversation
… added, are initialized
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Once your PR is ready for review, check one last time that all required checks appearing at the bottom of this PR are passing or skipped. Classic Theme helper plugin plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
…with a class exists check
…fecting the release process elsewhere, but is fine to add back
* @return void | ||
*/ | ||
function init_packages() { | ||
if ( class_exists( 'Automattic\Jetpack\Classic_Theme_Helper\Main' ) ) { |
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.
The class_exists check was added in here as it makes sense to have the check in case there are any package loading issues, but also because tests were failing (on deactivation and uninstallation of the plugin, as the class 'didn't exist').
@@ -57,6 +57,7 @@ | |||
"mirror-repo": "Automattic/classic-theme-plugin", | |||
"release-branch-prefix": "classic-theme-plugin", | |||
"beta-plugin-slug": "classic-theme-helper-plugin", | |||
"wp-plugin-slug": "classic-theme-helper-plugin", |
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.
This change is technically not related to this PR, but the PR provides a good opportunity to add this back in (it was removed in another PR but the removal wasn't necessary - more info here: #38175 (comment) )
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.
Tests as expected 👍
Fixes https://github.com/Automattic/vulcan/issues/384
Proposed changes:
This PR only considers the features that have been added to the Classic Theme Helper package and focuses on loading them when the plugin is active. More may be needed on the plugin generally, but that can be covered in later work: https://github.com/Automattic/vulcan/issues/388
This also assumes the current version of Jetpack in use on a site is the equivalent of trunk, as it isn't expected this plugin would be publicly used (with the current latest stable v of Jetpack or 13.7) until around Jetpack 13.8 or later. We may want to gate requiring / initializing files and classes to certain Jetpack versions to avoid issues, but that may need some discussion - mentioned here: https://github.com/Automattic/vulcan/issues/388
Other information:
Jetpack product discussion
https://github.com/Automattic/vulcan/issues/384
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Replicating the issue:
jetpack install plugins/classic-theme-helper-plugin
,jetpack build plugins/classic-theme-helper-plugin
, then activate the plugin."automattic/jetpack-classic-theme-helper": "@dev",
from the Jetpack plugincomposer.json
file. Then run runtools/fixup-project-versions.sh
, and thenjetpack install plugins/jetpack
andjetpack build plugins/jetpack
.theme-tools/responsive-videos.php'
andtheme-tools/featured-content.php
fromprojects/plugins/jetpack/modules/module-extras.php
(via SFTP if using a test site and the Beta tester plugin)jetpack-classic-theme-helper
package folder fromjetpack/jetpack-vendor/automattic
.To test the fix: