Site Icon: Start using core's Site Icon#2402
Conversation
class.jetpack-modules-list-table.php
Outdated
There was a problem hiding this comment.
Maybe instead of using an id, we could use a more generic class, like 'module-deprecated' so that we can use it for other deprecated modules.
There was a problem hiding this comment.
The only real purpose of the ID in this case is a target for the genericon, so making this reusable wouldn't really work for other modules.
There was a problem hiding this comment.
Ah. Thanks for the clarification.
d2427c6 to
4b401a7
Compare
|
It doesn't seem to be working as expected. I am expecting to not see the icon any more. The site icon module is still active, I think we should disable it and only expose. We should also depreciate the |
There was a problem hiding this comment.
I think this part doesn't make so much sense to me.
Since we should just not load the module anymore if the user is running 3.6 not just if the user has an site icon or not.
And this part needs to be tested from both ways. If the user is running jetpack WP 4.2 and then upgrade to WP 4.3 and the latest jetpack or if the user is on jetpack 3.5 and upgrades to jetpack 3.6 and is running WP 4.3.
There was a problem hiding this comment.
If you continue reading this function, the module should be disabled whether or not there is a core icon set. I did it here early bc if one is already set then the rest of the code is unnecessary overhead. This function runs on admin_init, so I'm curious how you're experiencing the module not deactivating in your comment above.
If upgrading from WP 4.2 -> 4.3, this function will run on admin_init, transfer the icon to core then deactivate the module. Or if no icon is set, it will just deactivate the module.
Same with upgrading from JP 3.5 -> 3.6.1
|
Read the code, tested the transition between 4.2.2 and trunk, everything works as expected. |
|
So it turned out that not all the code was update on the servers. This PR fixes the issue that I reported earlier about seeing 2 Site Icon forms. |
|
We need to make sure that when the user updates the site icon in 4.3 that we sync the data .com right away not just on the heartbeat. |
|
@enej doesn't that do the trick? https://github.com/Automattic/jetpack/pull/2402/files#diff-9ba9fa5bb52bd6cf36c6c0bdd5ed4830R594 |
|
@enejb the hook that Igor pointed out does the trick. It's using add_option instead of update_option because Core's process for uploading a site icon is to first delete the option entirely, then add a new one. |
|
@zinigor and @dereksmart I think we might also need do something like: |
|
Guess it wouldn't hurt to add though. |
12eb908 to
14e9ebd
Compare
class.jetpack.php
Outdated
There was a problem hiding this comment.
Is there a better hook than admin_init? Or a better place to call it, like in Jetpack_Site_icon itself?
Currently it would add that callback for every admin page load for(almost)ever.
f71dc45 to
7e52cc3
Compare
|
Alright I tided up some markup and made the deprecated setting look decent / functional on mobile devices. I moved the checkbox back in and just disabled it to maintain visual cohesion. Disable is pretty well supported all around. Also important to note. I made "Configure" capitalized to match the others, just made that change after the screenshots were taken. |
2031347 to
29a9b8a
Compare
New function will return true if core's site icon is available. It will also convert Jetpack's site icon to Core's version if one is set. It will disable Jetpack's site icon module no matter what.
Don't allow activation and point config link to core's site icon
We need to sync core's site icon to use in wpcom. This will allow the icon to be synced when it's uploaded to core. Also run a check on `jetpack_heartbeat` action in case core icon was set before Jetpack was installed
…on` (ID) to sync to dotcom as well.
Cleaned up a few things for the newly deprecated Site Icon. Also made it look decent / function on mobile devices.
29a9b8a to
f5b5525
Compare
No need to run this on every admin page.
Site Icon: Begin the deprecation of Jetpack's Site Icon in favor of Core
|
Keeping this branch open in case there's any more discussion. Will delete after 3.6.1 is released. |



This is meant to be a seamless under-the-hood transition to deprecating Jetpack's site icon in favor of core.
My thinking is that we'll leave it like this until 4.3 is the minimum supported WP version. Then we can remove the module completely.
This includes @kraftbj's commits from #2328 as well, so that PR can be discarded.
fixes #2326