Changeset 9239
- Timestamp:
- 10/25/2019 04:29:16 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/functions.php
r9020 r9239 309 309 */ 310 310 function social_meta_data() { 311 global $wporg_global_header_options; 311 312 if ( is_front_page() ) { 312 foreach ([313 $og_fields = [ 313 314 'og:title' => __( 'WordPress Plugins', 'wporg-plugins' ), 314 315 'og:description' => __( 'Choose from thousands of free plugins to build, customize, and enhance your WordPress website.', 'wporg-plugins' ), 315 'og:site_name' => 'WordPress.org',316 'og:site_name' => $wporg_global_header_options['rosetta_title'] ?? 'WordPress.org', 316 317 'og:type' => 'website', 317 318 'og:url' => home_url(), 318 ] as $property => $content ) { 319 printf( '<meta property="%1$s" content="%2$s" />' . "\n", esc_attr( $property ), esc_attr( $content ) ); 320 } 319 ]; 320 foreach ( $og_fields as $property => $content ) { 321 printf( 322 '<meta property="%1$s" content="%2$s" />' . "\n", 323 esc_attr( $property ), 324 esc_attr( $content ) 325 ); 326 } 327 printf( 328 '<meta name="description" content="%1$s" />' . "\n", 329 esc_attr( $og_fields['og:description'] ) 330 ); 321 331 return; 322 332 } … … 334 344 printf( '<meta property="og:title" content="%s" />' . "\n", the_title_attribute( array( 'echo' => false ) ) ); 335 345 printf( '<meta property="og:description" content="%s" />' . "\n", esc_attr( strip_tags( get_the_excerpt() ) ) ); 336 printf( '<meta property="og:site_name" content="WordPress.org" />' . "\n" ); 346 printf( '<meta name="description" content="%s" />' . "\n", esc_attr( strip_tags( get_the_excerpt() ) ) ); 347 printf( '<meta property="og:site_name" content="%s" />' . "\n", esc_attr( $wporg_global_header_options['rosetta_title'] ?? 'WordPress.org' ) ); 337 348 printf( '<meta property="og:type" content="website" />' . "\n" ); 338 349 printf( '<meta property="og:url" content="%s" />' . "\n", esc_url( get_permalink() ) );
Note: See TracChangeset
for help on using the changeset viewer.