-
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
Mobile theme: remove unused option that prevented it from loading #4866
Conversation
Introduced in ad38724 via #4281 by autoloading the option, which was previously not set. If we ever trying to sync up minileven between Jetpack and WP.com (ignored in the build script since r97888-wpcom / 2014), we'll run into problems since on WP.com, you can disable the mobile theme (since this runs as a mu-plugin there). That said, since we haven't been syncing it and my guess that we'll care less and less about the mobile theme given responsive theming, probably safe. cc: @gravityrail |
@@ -34,8 +34,6 @@ function jetpack_check_mobile() { | |||
return false; | |||
if ( jetpack_mobile_exclude() ) | |||
return false; | |||
if ( 1 == Jetpack_Options::get_option_and_ensure_autoload( 'wp_mobile_disable', '0' ) ) |
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.
In addition to straight removing this, should we clean up after ourselves and delete wp_mobile_disable
since it'll be set on all 4.2 sites?
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 wouldn't. In sites < 4.2 this option wouldn't even be set. In sites >= 4.2, it's neglectable. The thing is that we would have to add some checking to see if the option was created or not and delete it, and don't want to add more processing time to clean up something so small.
Also reported here: |
865d02c
to
4d00127
Compare
@kraftbj thanks for the feedback. I've changed this PR and decided to add the filter only in wpcom so in this way the feature continues to work normally in the plugin version and we're covered if we ever sync this file back to wpcom. I think we're good to go after this but can you please review it? |
…pcom) that prevented it from loading.
Looking at the build script, the files within /modules/minileven are commented out, but modules/minileven.php isn't mentioned at all. I think we're safe to remove it from that file completely, but no harm in the conditional either. |
mentioned in 2783445-t, 2783483-t, 2783582-t , 2782687-t |
Mentioned in 2782854-t. |
Fixes p1HpG7-3s1-p2
Changes proposed in this Pull Request:
wp_mobile_disable
and an associated filteroption_wp_mobile_disable
that prevented it from loading.Testing instructions: