diff --git a/src/js/components/common/Toolbar.tsx b/src/js/components/common/Toolbar.tsx index 79be31346..8e4c8fddf 100644 --- a/src/js/components/common/Toolbar.tsx +++ b/src/js/components/common/Toolbar.tsx @@ -1,4 +1,4 @@ -import { __ } from '@wordpress/i18n' +import { __, _x } from '@wordpress/i18n' import classnames from 'classnames' import React, { useState } from 'react' import { isLicensed, shouldShowUpsell } from '../../utils/screen' @@ -39,6 +39,12 @@ const UPPER_NAV_LINKS: readonly NavLink[] = [ url: window.CODE_SNIPPETS?.urls.welcome, label: __("What's New", 'code-snippets'), pageSlug: 'code-snippets-welcome' + }, + { + name: 'import-snippets', + url: window.CODE_SNIPPETS?.urls.import, + label: _x('Import', 'snippets', 'code-snippets'), + pageSlug: 'import-code-snippets' } ] diff --git a/src/js/types/Window.ts b/src/js/types/Window.ts index 2c0eb5986..2d8b084a4 100644 --- a/src/js/types/Window.ts +++ b/src/js/types/Window.ts @@ -45,6 +45,7 @@ declare global { addNew: string edit: string welcome: string + import: string settings: string cloud: string } diff --git a/src/php/Plugin.php b/src/php/Plugin.php index 923dc28fb..870d968ba 100644 --- a/src/php/Plugin.php +++ b/src/php/Plugin.php @@ -368,6 +368,7 @@ public function localize_script( string $handle ) { 'edit' => esc_url_raw( $this->get_menu_url( 'edit' ) ), 'addNew' => esc_url_raw( $this->get_menu_url( 'add' ) ), 'welcome' => esc_url_raw( $this->get_menu_url( 'welcome' ) ), + 'import' => esc_url_raw( $this->get_menu_url( 'import' ) ), 'settings' => esc_url_raw( $this->get_menu_url( 'settings' ) ), 'cloud' => esc_url_raw( $this->cloud_connection->get_base_url() ), ],