Making WordPress.org


Ignore:
Timestamp:
01/17/2022 07:48:03 AM (3 years ago)
Author:
dd32
Message:

Themes: Use a new method to fetch the localised site name.

This is to remove the reliance upon $wporg_global_header_options.

Follow up to [11451].
See https://github.com/WordPress/wporg-mu-plugins/issues/42

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-main/inc/page-meta-descriptions.php

    r11451 r11453  
    1818 */
    1919function custom_open_graph_tags( $tags = [] ) {
     20    $site_title = function_exists( '\WordPressdotorg\site_brand' ) ? \WordPressdotorg\site_brand() : 'WordPress.org';
     21
    2022    // Use `name=""` for description.
    2123    // See Jetpacks Twitter Card for where it happens for the twitter:* fields.
     
    3234            'description'     => __( 'Open source software which you can use to easily create a beautiful website, blog, or app.', 'wporg' ),
    3335            'og:url'          => home_url( '/' ),
    34             'og:site_name'    => 'WordPress.org', // Rosetta title will automatically be inserted.
     36            'og:site_name'    => $site_title,
    3537            'og:image'        => 'https://s.w.org/images/home/screen-themes.png?3',
    3638            'og:locale'       => get_locale(),
Note: See TracChangeset for help on using the changeset viewer.