diff --git wordpress.org/public_html/wp-content/themes/pub/wporg/functions.php wordpress.org/public_html/wp-content/themes/pub/wporg/functions.php
index 65eb05ce6..9154dd09d 100644
|
|
add_action( 'customize_preview_init', __NAMESPACE__ . '\customize_preview_js' ) |
159 | 159 | function hreflang_link_attributes() { |
160 | 160 | wp_cache_add_global_groups( array( 'locale-associations' ) ); |
161 | 161 | |
| 162 | // Google doesn't have support for a whole lot of languages and throws errors about it, so we exclude them, as we're |
| 163 | // otherwise outputting data that isn't used at all. |
| 164 | $unsupported_languages = array( |
| 165 | 'arq', |
| 166 | 'art', |
| 167 | 'art-xemoji', |
| 168 | 'ary', |
| 169 | 'ast', |
| 170 | 'az-ir', |
| 171 | 'azb', |
| 172 | 'bcc', |
| 173 | 'ff-sn', |
| 174 | 'frp', |
| 175 | 'fuc', |
| 176 | 'fur', |
| 177 | 'haz', |
| 178 | 'ido', |
| 179 | 'io', |
| 180 | 'kab', |
| 181 | 'li', |
| 182 | 'li-nl', |
| 183 | 'lmo', |
| 184 | 'me', |
| 185 | 'me-me', |
| 186 | 'rhg', |
| 187 | 'rup', |
| 188 | 'sah', |
| 189 | 'sc-it', |
| 190 | 'scn', |
| 191 | 'skr', |
| 192 | 'srd', |
| 193 | 'szl', |
| 194 | 'tah', |
| 195 | 'twd', |
| 196 | 'ty-tj', |
| 197 | 'tzm', |
| 198 | ); |
| 199 | |
162 | 200 | if ( false === ( $sites = wp_cache_get( 'local-sites', 'locale-associations' ) ) ) { |
163 | 201 | global $wpdb; |
164 | 202 | |
… |
… |
function hreflang_link_attributes() { |
176 | 214 | continue; |
177 | 215 | } |
178 | 216 | |
179 | | if ( isset( $gp_locale->slug ) ) { |
| 217 | if ( isset( $gp_locale->slug ) && ! in_array( $gp_locale->slug, $unsupported_languages ) ) { |
180 | 218 | $sites[ $site->locale ]->hreflang = $gp_locale->slug; |
181 | 219 | } else { |
182 | 220 | unset( $sites[ $site->locale ] ); |