WordPress.org

Making WordPress.org

Changeset 8569


Ignore:
Timestamp:
04/02/2019 10:49:16 PM (3 weeks ago)
Author:
SergeyBiryukov
Message:

WP.org: Don't output hreflang link attributes for non-existing subdomains.

Props jonoaldersonwp.
Fixes #4357.

File:
1 edited

Legend:

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

    r7898 r8569  
    256256            }
    257257
     258            // Skip non-existing subdomains, e.g. 'de_CH_informal'.
     259            if ( false !== strpos( $site->subdomain, '_' ) ) {
     260                continue;
     261            }
     262
    258263            if ( isset( $gp_locale->slug ) && ! in_array( $gp_locale->slug, $unsupported_languages ) ) {
    259264                $sites[ $site->locale ]->hreflang = $gp_locale->slug;
Note: See TracChangeset for help on using the changeset viewer.