Changeset 7911 for sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/sharing.php
- Timestamp:
- 11/28/2018 02:17:30 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/sharing.php
r7910 r7911 2 2 3 3 namespace WordCamp\Jetpack_Tweaks; 4 defined( 'WPINC' ) or die(); 4 5 defined( 'WPINC' ) || die(); 5 6 6 7 add_filter( 'jetpack_open_graph_image_default', __NAMESPACE__ . '\default_og_image' ); … … 9 10 add_filter( 'jetpack_twitter_cards_site_tag', __NAMESPACE__ . '\twitter_sitetag' ); 10 11 11 /* 12 /** 12 13 * Open Graph Default Image. 13 14 * … … 38 39 if ( has_site_icon() ) { 39 40 $image_url = get_site_icon_url(); 40 } else 41 } elseif ( has_header_image() ) { 41 42 $image_url = get_header_image(); 42 43 } else { … … 44 45 } 45 46 46 return array( array( 47 'type' => 'image', 48 'from' => 'custom_fallback', 49 'src' => esc_url( $image_url ), 50 'href' => get_permalink( $post_id ), 51 ) ); 47 return array( 48 array( 49 'type' => 'image', 50 'from' => 'custom_fallback', 51 'src' => esc_url( $image_url ), 52 'href' => get_permalink( $post_id ), 53 ), 54 ); 52 55 } 53 56 54 /* 57 /** 55 58 * Add Twitter Card type. 56 59 * … … 65 68 } 66 69 67 /* 70 /** 68 71 * User @WordCamp as the default Twitter account. 69 72 * … … 72 75 */ 73 76 function twitter_sitetag( $site_tag ) { 74 if ( 'jetpack' == $site_tag ) {77 if ( 'jetpack' === $site_tag ) { 75 78 $site_tag = 'WordCamp'; 76 79 add_filter( 'jetpack_sharing_twitter_via', '__return_empty_string' );
Note: See TracChangeset
for help on using the changeset viewer.