Making WordPress.org

Changeset 8008


Ignore:
Timestamp:
12/21/2018 03:17:37 AM (6 years ago)
Author:
dd32
Message:

WordPress.org: Add a <meta name="description" tag to mirror the OpenGraph tags.

Fixes #3983.

File:
1 edited

Legend:

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

    r7961 r8008  
    2020    // Override the Front-page tags on Rosetta sites.
    2121    if ( is_front_page() && isset( $GLOBALS['rosetta'] ) ) {
     22
     23        // Use `name=""` for description.
     24        // See Jetpacks Twitter Card for where it happens for the twitter:* fields.
     25        add_filter( 'jetpack_open_graph_output', function( $html ) {
     26            return str_replace( '<meta property="description"', '<meta name="description"', $html );
     27        } );
    2228
    2329        $locale_native_name = $GLOBALS['rosetta']->rosetta->glotpress_locale->native_name;
     
    2632            'og:title'        => __( 'Blog Tool, Publishing Platform, and CMS - WordPress', 'wporg' ),
    2733            'og:description'  => __( 'Open source software which you can use to easily create a beautiful website, blog, or app.', 'wporg' ),
     34            'description'     => __( 'Open source software which you can use to easily create a beautiful website, blog, or app.', 'wporg' ),
    2835            'og:url'          => home_url( '/' ),
    2936            /* translators: %s - The Locale native name. */
Note: See TracChangeset for help on using the changeset viewer.