File size: 12,568 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
import { PLAN_PREMIUM, getPlan } from '@automattic/calypso-products';
import { __, sprintf } from '@wordpress/i18n';
export function generateAdminSections(
siteSlug: string,
customizerUrls: {
root: string;
homepage: string;
menus: string;
identity: string;
},
siteEditorUrls: {
root: string;
wp_global_styles: string;
},
googleMailService: string,
onboardingUrl: string,
isJetpack?: boolean
) {
return [
{
title: __( 'Add a new domain', __i18n_text_domain__ ),
description: __(
'Set up your domain whether it’s registered with WordPress.com or elsewhere.'
),
link: `/domains/add/${ siteSlug }`,
synonyms: [ 'domains' ],
icon: 'domains',
},
{
title: __( 'Manage my domain settings', __i18n_text_domain__ ),
description: __( 'Manage all domains linked to your account.', __i18n_text_domain__ ),
link: `/domains/manage/${ siteSlug }`,
synonyms: [ 'domains' ],
icon: 'domains',
},
{
title: __( 'Change my site address', __i18n_text_domain__ ),
link: `/domains/manage/${ siteSlug }/edit/${ siteSlug }`,
synonyms: [ 'domains', 'domain' ],
icon: 'domains',
},
{
title: __( 'Add a site redirect', __i18n_text_domain__ ),
description: __( 'Redirect your site to another domain.', __i18n_text_domain__ ),
link: `/domains/add/site-redirect/${ siteSlug }`,
synonyms: [ 'domains', 'domain', 'forward' ],
icon: 'domains',
},
{
title: __( 'Change my password', __i18n_text_domain__ ),
link: '/me/security',
synonyms: [ 'update' ],
icon: 'cog',
},
{
title: __( "Change my site's theme" ),
link: `/themes/${ siteSlug }`,
synonyms: [ 'switch', 'design' ],
icon: 'customize',
},
{
title: __( "Customize my site's theme" ),
link: ! isJetpack ? siteEditorUrls.wp_global_styles : customizerUrls.root,
synonyms: [ 'color', 'font', 'design', 'css', 'widgets' ],
icon: 'customize',
},
{
title: __( 'Change my homepage', __i18n_text_domain__ ),
link: customizerUrls.homepage,
synonyms: [ 'home', 'homepage' ],
icon: 'customize',
},
{
title: __( 'Edit my menu', __i18n_text_domain__ ),
link: customizerUrls.menus,
synonyms: [ 'menu' ],
icon: 'customize',
},
{
title: __( 'Set a site logo', __i18n_text_domain__ ),
link: customizerUrls.identity,
synonyms: [ 'logo', 'identity' ],
icon: 'customize',
},
{
title: __( 'Find a plan to suit my site', __i18n_text_domain__ ),
link: `/plans/${ siteSlug }`,
synonyms: [ 'upgrade', 'business', 'professional', 'personal' ],
icon: 'plans',
},
{
title: __( 'Cancel my plan', __i18n_text_domain__ ),
link: '/me/purchases',
synonyms: [ 'upgrade', 'business', 'professional', 'personal' ],
icon: 'plans',
},
{
title: __( 'Upgrade my plan', __i18n_text_domain__ ),
link: `/plans/${ siteSlug }`,
synonyms: [ 'upgrade', 'business', 'professional', 'personal' ],
icon: 'plans',
},
{
/* translators: %(googleMailService)s can be either "G Suite" or "Google Workspace */
title: sprintf( __( 'Cancel %s', __i18n_text_domain__ ), googleMailService ),
link: '/me/purchases',
synonyms: [ 'upgrade', 'business', 'professional', 'personal', 'google' ],
icon: 'plans',
},
{
title: __( 'Renew my plan', __i18n_text_domain__ ),
link: `/plans/${ siteSlug }`,
synonyms: [ 'upgrade', 'business', 'professional', 'personal', 'plan' ],
icon: 'plans',
},
{
title: __( 'Renew my domain', __i18n_text_domain__ ),
link: `/plans/${ siteSlug }`,
synonyms: [ 'domain', 'business', 'professional', 'personal', 'plan' ],
icon: 'plans',
},
{
title: __( 'View my site activity', __i18n_text_domain__ ),
link: `/activity-log/${ siteSlug }`,
icon: 'history',
},
{
title: __( "View my site's latest stats" ),
link: `https://${ siteSlug }/wp-admin/admin.php?page=stats`,
synonyms: [ 'analytics' ],
icon: 'stats-alt',
},
{
title: __( 'Upload an image, video, audio or document', __i18n_text_domain__ ),
link: `/media/${ siteSlug }`,
synonyms: [ 'media', 'photo' ],
icon: 'image',
},
{
title: __( 'Import content from another site', __i18n_text_domain__ ),
link: `/settings/import/${ siteSlug }`,
synonyms: [ 'medium', 'blogger', 'wix', 'squarespace' ],
icon: 'cloud-upload',
},
{
title: __( 'Earn money from my site', __i18n_text_domain__ ),
description: sprintf(
// translators: %s is the name of the Explorer/Premium plan.
__(
"By upgrading to the %s plan, you'll be able to monetize your site through the WordAds program."
),
getPlan( PLAN_PREMIUM )?.getTitle()
),
link: `/earn/${ siteSlug }`,
synonyms: [ 'monetize', 'wordads', 'premium', 'explorer' ],
icon: 'money',
},
{
title: __( 'Learn how to market my site', __i18n_text_domain__ ),
link: `/marketing/tools/${ siteSlug }`,
synonyms: [ 'marketing', 'brand', 'logo', 'seo', 'tools', 'traffic' ],
icon: 'speaker',
},
{
title: __( "Manage my site's users" ),
description: __( 'Invite new users and edit existing ones.', __i18n_text_domain__ ),
link: `/people/team/${ siteSlug }`,
synonyms: [ 'administrator', 'editor', 'contributor', 'viewer', 'follower' ],
icon: 'user',
},
{
title: __( 'Invite new users to my site', __i18n_text_domain__ ),
link: `/people/new/${ siteSlug }`,
synonyms: [ 'administrator', 'editor', 'contributor', 'viewer', 'follower' ],
icon: 'user',
},
{
title: __( "Change my site's timezone" ),
link: `/settings/general/${ siteSlug }#site-settings__blogtimezone`,
synonyms: [ 'time', 'date' ],
icon: 'cog',
},
{
title: __( 'Launch my site', __i18n_text_domain__ ),
description: __( 'Switch your site from private to public.', __i18n_text_domain__ ),
link: `/settings/general/${ siteSlug }#site-privacy-settings`,
synonyms: [ 'private', 'public' ],
icon: 'cog',
},
{
title: __( "Delete a site or a site's content" ),
description: __(
'Remove all posts, pages, and media, or delete a site completely.',
__i18n_text_domain__
),
link: `/settings/general/${ siteSlug }#site-tools__header`,
icon: 'cog',
},
{
title: __( 'Set a site icon', __i18n_text_domain__ ),
link: `/settings/general/${ siteSlug }`,
icon: 'cog',
synonyms: [ 'logo' ],
},
{
title: __( "Change my site's footer text" ),
description: __(
'You can customize your website by changing the footer credit in customizer.'
),
link: `/settings/general/${ siteSlug }#site-settings__footer-credit-header`,
synonyms: [ 'remove footer', 'update footer' ],
icon: 'cog',
},
{
title: __( "Export my site's content and media library" ),
description: __( 'Export posts, pages and more from your site.', __i18n_text_domain__ ),
link: `/settings/export/${ siteSlug }`,
synonyms: [ 'xml', 'images', 'migration', 'import', 'download' ],
icon: 'cog',
},
{
title: __( 'Manage sharing and social media connections', __i18n_text_domain__ ),
link: `/sharing/${ siteSlug }`,
synonyms: [ 'facebook', 'twitter', 'twitter', 'tumblr', 'eventbrite' ],
icon: 'share',
},
{
title: __( 'Add sharing buttons to my site', __i18n_text_domain__ ),
description: __(
'Allow readers to easily share your posts with others by adding sharing buttons throughout your site.'
),
link: `/sharing/buttons/${ siteSlug }`,
synonyms: [ 'like', 'reblog' ],
icon: 'share',
},
{
title: __( 'Install, manage, and search for site Plugins', __i18n_text_domain__ ),
link: `/plugins/${ siteSlug }`,
synonyms: [ 'upload' ],
icon: 'plugins',
},
{
title: __( 'Approve or delete comments', __i18n_text_domain__ ),
link: `/comments/all/${ siteSlug }`,
synonyms: [ 'spam', 'discussion', 'moderation', 'moderate' ],
icon: 'chat',
},
{
title: __( 'Manage how users can comment on my site', __i18n_text_domain__ ),
link: `/settings/discussion/${ siteSlug }`,
synonyms: [ 'discussion', 'moderation', 'blocklist' ],
icon: 'cog',
},
{
title: __( 'Manage post categories', __i18n_text_domain__ ),
link: `/settings/taxonomies/category/${ siteSlug }`,
synonyms: [ 'post', 'category' ],
icon: 'cog',
},
{
title: __( 'Edit my site title, tagline, or logo', __i18n_text_domain__ ),
link: `/settings/general/${ siteSlug }`,
synonyms: [ 'title', 'logo' ],
icon: 'cog',
},
{
title: __( 'Set up a podcast', __i18n_text_domain__ ),
link: `/settings/podcasting/${ siteSlug }`,
synonyms: [ 'podcast', 'radio', 'audio' ],
icon: 'cog',
},
{
title: __( "Change my site's privacy settings" ),
link: `/settings/general/${ siteSlug }#site-privacy-settings`,
synonyms: [ 'privacy' ],
icon: 'cog',
},
{
title: __( 'Manage SEO and traffic settings', __i18n_text_domain__ ),
link: `/settings/traffic/${ siteSlug }`,
synonyms: [ 'analytics', 'related', 'sitemap' ],
icon: 'cog',
},
{
title: __( 'Update my profile', __i18n_text_domain__ ),
description: __( 'Update your name, profile image, and about text.', __i18n_text_domain__ ),
link: '/me',
synonyms: [ 'avatar' ],
icon: 'user',
},
{
title: __( 'Update my username or email address', __i18n_text_domain__ ),
link: '/me/account',
synonyms: [ 'user', 'account' ],
icon: 'cog',
},
{
title: __( 'Change the dashboard color scheme', __i18n_text_domain__ ),
link: '/me/account#account__color_scheme',
synonyms: [ 'theme' ],
icon: 'cog',
},
{
title: __( 'Switch the interface language', __i18n_text_domain__ ),
description: __(
'Update the language of the interface you see across WordPress.com as a whole.'
),
link: '/me/account#account__language',
synonyms: [ 'dashboard', 'change', 'language' ],
icon: 'cog',
},
{
title: __( 'Close my account permanently', __i18n_text_domain__ ),
description: __(
'Delete all of your sites, and close your account completely.',
__i18n_text_domain__
),
link: '/me/account/close',
synonyms: [ 'delete' ],
icon: 'cog',
},
{
title: __( 'Change my account privacy settings', __i18n_text_domain__ ),
link: '/me/privacy',
synonyms: [ 'security', 'tracking' ],
icon: 'visible',
},
{
title: __( 'View my purchase and billing history', __i18n_text_domain__ ),
link: '/me/purchases',
synonyms: [ 'purchases', 'invoices', 'pending', 'payment', 'credit card' ],
icon: 'credit-card',
},
{
title: __( 'Download the WordPress.com app for my device', __i18n_text_domain__ ),
description: __( 'Get WordPress apps for all your screens.', __i18n_text_domain__ ),
link: '/me/get-apps',
synonyms: [ 'android', 'iphone', 'mobile', 'desktop', 'phone' ],
icon: 'my-sites',
},
{
title: __( 'View my drafted posts', __i18n_text_domain__ ),
link: `/posts/drafts/${ siteSlug }`,
synonyms: [ 'posts', 'draft' ],
icon: 'my-sites',
},
{
title: __( 'Manage my blog posts', __i18n_text_domain__ ),
link: `/posts/${ siteSlug }`,
synonyms: [ 'lists', 'posts' ],
icon: 'my-sites',
},
{
title: __( 'New post', __i18n_text_domain__ ),
description: __( 'Create a new blog post on your site.' ),
link: `/post/${ siteSlug }`,
synonyms: [ 'lists', 'posts' ],
icon: 'my-sites',
},
{
title: __( 'View my drafted pages', __i18n_text_domain__ ),
link: `/pages/drafts/${ siteSlug }`,
synonyms: [ 'pages', 'draft' ],
icon: 'my-sites',
},
{
title: __( 'Manage my pages', __i18n_text_domain__ ),
link: `/pages/${ siteSlug }`,
synonyms: [ 'lists', 'pages' ],
icon: 'my-sites',
},
{
title: __( 'I cannot find my site on Google', __i18n_text_domain__ ),
link: `/marketing/traffic/${ siteSlug }`,
synonyms: [ 'google', 'traffic', 'seo' ],
icon: 'speaker',
},
{
title: __( 'Verify my site with Google', __i18n_text_domain__ ),
link: `/marketing/traffic/${ siteSlug }`,
synonyms: [ 'google', 'traffic', 'seo' ],
icon: 'cog',
},
{
title: __( 'Create a new site', __i18n_text_domain__ ),
link: `${ onboardingUrl }?ref=calypso-inline-help`,
synonyms: [ 'site' ],
icon: 'cog',
},
{
title: __( 'View contact form messages', __i18n_text_domain__ ),
link: `https://${ siteSlug }/wp-admin/admin.php?page=jetpack-forms-admin`,
synonyms: [ 'contact', 'form' ],
icon: 'cog',
},
{
title: __( 'Portfolio projects (for those who have them active)', __i18n_text_domain__ ),
link: `/types/jetpack-portfolio/${ siteSlug }`,
synonyms: [ 'portfolio' ],
icon: 'cog',
},
];
}
|