-
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
Site Logo: 5.8 Compat #20047
Site Logo: 5.8 Compat #20047
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
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. 🔴 Action required: Please add missing changelog entries for the following projects: Use the Jetpack CLI tool to generate changelog entries by running the following command: Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped. Jetpack plugin:
|
Removal may not be the right approach, but may want to use it to set it to match the new Core style. See p1623174912090300-slack-CBTN58FTJ |
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 think we might need to keep some version of this code. If the theme changes to one that supports custom-logo
then the code in core will not grab the ID from this Jetpack option. Also the site_logo
option in core is expected to be an ID, so leaving the Jetpack one will mean that it's an array. We may want to check for an array being the option value and copy the ID to the custom_logo
theme mod and the site_logo
option.
Similarly we might need to handle conversion the other way.
This reverts commit 5045bb2.
if ( current_theme_supports( 'custom-logo' ) && ! get_theme_mod( 'custom_logo' ) && get_option( 'site_logo' ) ) { | ||
$jp_logo = get_option( 'site_logo' ); |
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.
Would it make sense to move the get_option
here?
if ( current_theme_supports( 'custom-logo' ) && ! get_theme_mod( 'custom_logo' ) && get_option( 'site_logo' ) ) { | |
$jp_logo = get_option( 'site_logo' ); | |
$jp_logo = get_option( 'site_logo' ); | |
if ( current_theme_supports( 'custom-logo' ) && ! get_theme_mod( 'custom_logo' ) && $jp_logo ) { | |
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 thought about that, but didn't because it would mean a db call that might not be needed if current_theme_support
was false.
Note, I modified and expanded some of the work here and created #20192. It looks like we have quite a few themes still using the legacy site-logo functionality on WordPress.com, so it'll be important to get this in the next Jetpack release, since it's the final planned Jetpack release before WP 5.8. |
Going to close this to defer to 20192. |
See #19654
Changes proposed in this Pull Request:
site_logo
option name.Jetpack product discussion
Does this pull request change what data or activity we track or use?
n/a
Testing instructions: