Making WordPress.org


Ignore:
Timestamp:
11/13/2024 02:53:50 AM (3 months ago)
Author:
adamwood
Message:

Support 2024: i18n for homepage 'Get started' links

Enables the slug for the welcome page to be translated, so that the 'Get started' links on the archive and homepage can be customized per locale.

Fixes https://meta.trac.wordpress.org/ticket/7821

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support-2024/functions.php

    r14104 r14172  
    13441344}
    13451345add_filter( 'bbp_is_single_user_profile', 'wporg_is_single_user_profile' );
     1346
     1347/**
     1348 * Get the URL for the forums welcome page.
     1349 * Slug is translated, so the URL will be correct for the current locale.
     1350 *
     1351 * @return string
     1352 */
     1353function wporg_support_get_welcome_url() {
     1354    return site_url(
     1355        /* Translators: slug for the welcome page, e.g. 'welcome' will produce https://wordpress.org/support/welcome/ */
     1356        esc_html__( 'welcome', 'wporg-forums' )
     1357    );
     1358}
    13461359
    13471360
Note: See TracChangeset for help on using the changeset viewer.