Changeset 11451 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/functions.php
- Timestamp:
- 01/17/2022 06:48:02 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-patterns/functions.php
r11215 r11451 284 284 */ 285 285 function add_social_meta_tags() { 286 global $wporg_global_header_options;286 $og_fields = []; 287 287 $default_image = get_stylesheet_directory_uri() . '/images/social-image.png'; 288 $ og_fields = [];288 $site_title = function_exists( '\WordPressdotorg\site_brand' ) ? \WordPressdotorg\site_brand() : 'WordPress.org'; 289 289 290 290 if ( is_front_page() || is_home() ) { … … 292 292 'og:title' => __( 'Block Pattern Directory', 'wporg-patterns' ), 293 293 'og:description' => __( 'Add a beautifully designed, ready to go layout to any WordPress site with a simple copy/paste.', 'wporg-patterns' ), 294 'og:site_name' => $ wporg_global_header_options['rosetta_title'] ?? 'WordPress.org',294 'og:site_name' => $site_title, 295 295 'og:type' => 'website', 296 296 'og:url' => home_url(), … … 301 301 'og:title' => sprintf( __( 'Block Patterns: %s', 'wporg-patterns' ), esc_attr( single_term_title( '', false ) ) ), 302 302 'og:description' => __( 'Add a beautifully designed, ready to go layout to any WordPress site with a simple copy/paste.', 'wporg-patterns' ), 303 'og:site_name' => esc_attr( $wporg_global_header_options['rosetta_title'] ?? 'WordPress.org' ),303 'og:site_name' => $site_title, 304 304 'og:type' => 'website', 305 305 'og:url' => esc_url( get_term_link( get_queried_object_id() ) ), … … 309 309 $og_fields = [ 310 310 'og:title' => the_title_attribute( array( 'echo' => false ) ), 311 'og:description' => esc_attr( strip_tags( get_post_meta( get_the_ID(), 'wpop_description', true )) ),312 'og:site_name' => esc_attr( $wporg_global_header_options['rosetta_title'] ?? 'WordPress.org' ),311 'og:description' => strip_tags( get_post_meta( get_the_ID(), 'wpop_description', true ) ), 312 'og:site_name' => $site_title, 313 313 'og:type' => 'website', 314 314 'og:url' => esc_url( get_permalink() ),
Note: See TracChangeset
for help on using the changeset viewer.