Making WordPress.org


Ignore:
Timestamp:
01/17/2022 06:48:02 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.

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

    r11427 r11451  
    1818 */
    1919function custom_open_graph_tags( $tags = [] ) {
    20     global $wporg_global_header_options;
    21 
    2220    // Use `name=""` for description.
    2321    // See Jetpacks Twitter Card for where it happens for the twitter:* fields.
     
    2826    // Override the Front-page tags.
    2927    if ( is_front_page() ) {
    30         $site_title = ! empty( $wporg_global_header_options['rosetta_title'] ) ? $wporg_global_header_options['rosetta_title'] : 'WordPress';
    3128        return array(
    3229            'og:type'         => 'website',
     
    3532            'description'     => __( 'Open source software which you can use to easily create a beautiful website, blog, or app.', 'wporg' ),
    3633            'og:url'          => home_url( '/' ),
    37             'og:site_name'    => $site_title,
     34            'og:site_name'    => 'WordPress.org', // Rosetta title will automatically be inserted.
    3835            'og:image'        => 'https://s.w.org/images/home/screen-themes.png?3',
    3936            'og:locale'       => get_locale(),
Note: See TracChangeset for help on using the changeset viewer.