-
Notifications
You must be signed in to change notification settings - Fork 799
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
Admin Bar: Replace the wp-admin url with the calypso ones for the default interface #38377
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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. Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Mu Wpcom plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
d0f37ea
to
c8794ec
Compare
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.
We also need the following:
wp-admin/post-new.php?post_type=jetpack-testimonial
=>https://wordpress.com/types/jetpack-testimonial/%home_url%
wp-admin/post-new.php?post_type=jetpack-portfolio
=>https://wordpress.com/types/jetpack-portfolio/%home_url%
Where are these 2 items? |
c8794ec
to
c645802
Compare
return; | ||
} | ||
|
||
$host = new Host(); | ||
|
||
if ( ! $host->is_wpcom_simple() ) { | ||
if ( ! $host->is_wpcom_simple() && ! ( defined( 'WPCOM_ADMIN_BAR_UNIFICATION' ) && WPCOM_ADMIN_BAR_UNIFICATION ) ) { |
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'm unsure but it seems to be okay to just disable Masterbar if WPCOM_ADMIN_BAR_UNIFICATION
is enabled
if ( class_exists( '\Automattic\Jetpack\Status\Host' ) && ( new \Automattic\Jetpack\Status\Host() )->is_woa_site() ) { | ||
\Automattic\Jetpack\Calypsoify\Jetpack_Calypsoify::get_instance(); | ||
// This is temporary. After we cleanup Masterbar on WPCOM we should load Masterbar for Simple sites too. | ||
\Automattic\Jetpack\Masterbar\Main::init(); |
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 assume these 2 are wpcom user features, right 🤔
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.
Yes, but I didn't want to make too many changes in the last PR (#38364)
Are this changes really necessary here?
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.
At least it should be called after the flag defined.
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.
Ohhhhhh.... I seee....
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.
Tested and I believe it works.
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 causes fatal error in WPCOM 🥲
Fatal error: Cannot redeclare wpcom_custom_admin_bar_class() (previously declared in <redacted>/admin-bar.php:109)
f377e61
to
dcd0472
Compare
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.
Retested and it looks good on Atomic/Simple, Default/Classic, admin/frontend.
@lupus2k The W menu is not working on:
I think I'm gonna revert all changes not related to |
fdf9000
to
fe4cc44
Compare
@lupus2k , @arthur791004 : I've ported the masterbar unification fix to a new PR: #38419. |
It looks like this added file threw fatals when jetpack released today. Wpcomsh is pinned at 4.0.0 now (which includes the jetpack-mu version it loads) until resolved - p1721840686641099-slack-C06DN6QQVAQ and p1721843060452409-slack-C06DN6QQVAQ |
Fixes https://github.com/Automattic/dotcom-forge/issues/8333
Proposed changes:
WP_Admin_Bar
and override theadd_node
function, so we can check whether the URL needs to point to Calypso or notJust found the loading order changed, so fix the admin bar on default atomic sites by 2c82017Fixes the Menu toggle (mobile) on default atomic sitesOther information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
default
admin interface