Skip to content

Commit

Permalink
Merge pull request #21901 from Yoast/351-change-notifications-link-in…
Browse files Browse the repository at this point in the history
…-menu-bar

Change admin bar notifications URL
  • Loading branch information
thijsoo authored Dec 5, 2024
2 parents 1c710e1 + 7c28bdf commit 829c0ce
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inc/class-wpseo-admin-bar-menu.php
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ protected function add_root_menu( WP_Admin_Bar $wp_admin_bar ) {
'parent' => self::MENU_IDENTIFIER,
'id' => 'wpseo-notifications',
'title' => __( 'Notifications', 'wordpress-seo' ) . $counter,
'href' => $settings_url,
'href' => empty( $settings_url ) ? '' : $settings_url . '#/alert-center',
'meta' => [ 'tabindex' => ! empty( $settings_url ) ? false : '0' ],
];
$wp_admin_bar->add_menu( $admin_bar_menu_args );
Expand Down
4 changes: 2 additions & 2 deletions packages/js/src/dashboard/components/page-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ export const PageTitle = ( { userName, features, links } ) => (
: createInterpolateElement(
sprintf(
/* translators: %1$s and %2$s expand to an opening and closing anchor tag. */
__( "Welcome to your dashboard! Check your content's SEO performance, readability, and overall strengths and opportunities. %1$sLearn more on how to improve your content with our content analysis tool%2$s.", "wordpress-seo" ),
__( "Welcome to your dashboard! Check your content's SEO performance, readability, and overall strengths and opportunities. %1$sLearn more about the dashboard%2$s.", "wordpress-seo" ),
"<link>",
"</link>"
),
{
// Added dummy space as content to prevent children prop warnings in the console.
link: <OutboundLink href={ links.contentAnalysis }> </OutboundLink>,
link: <OutboundLink href={ links.dashboardLearnMore }> </OutboundLink>,
}
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/js/src/dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ export { Dashboard } from "./components/dashboard";

/**
* @typedef {Object} Links The links.
* @property {string} contentAnalysis The content analysis information link.
* @property {string} dashboardLearnMore The dashboard information link.
*/
4 changes: 2 additions & 2 deletions packages/js/src/general/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ domReady( () => {
"X-Wp-Nonce": get( window, "wpseoScriptData.dashboard.nonce", "" ),
};

/** @type {{contentAnalysis: string}} */
/** @type {{dashboardLearnMore: string}} */
const links = {
contentAnalysis: select( STORE_NAME ).selectLink( "https://yoa.st/content-analysis-tool" ),
dashboardLearnMore: select( STORE_NAME ).selectLink( "https://yoa.st/dashboard-learn-more" ),
};

const router = createHashRouter(
Expand Down

0 comments on commit 829c0ce

Please sign in to comment.