Changeset 795516
- Timestamp:
- 10/29/2013 11:19:18 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
jetpack/trunk/functions.opengraph.php
r719878 r795516 63 63 $tags['og:url'] = get_permalink( $data->ID ); 64 64 if ( !post_password_required() ) 65 $tags['og:description'] = ! empty( $data->post_excerpt ) ? strip_shortcodes( wp_kses( $data->post_excerpt, array() ) ) : wp_trim_words( strip_shortcodes( wp_kses( $data->post_content, array() ) ) );65 $tags['og:description'] = ! empty( $data->post_excerpt ) ? ) ) ) ); 66 66 $tags['og:description'] = empty( $tags['og:description'] ) ? ' ' : $tags['og:description']; 67 67 } … … 86 86 // Add any additional tags here, or modify what we've come up with 87 87 $tags = apply_filters( 'jetpack_open_graph_tags', $tags, compact( 'image_width', 'image_height' ) ); 88 89 90 91 92 88 93 89 94 foreach ( (array) $tags as $tag_property => $tag_content ) { … … 98 103 $og_output .= apply_filters( 'jetpack_open_graph_output', $og_tag ); 99 104 $og_output .= "\n"; 105 106 107 108 109 110 111 112 113 114 115 116 117 100 118 } 101 119 } … … 150 168 } 151 169 152 // Fallback to Blavatar if available 153 if ( function_exists( 'blavatar_domain' ) ) { 154 $blavatar_domain = blavatar_domain( site_url() ); 155 if ( empty( $image ) && blavatar_exists( $blavatar_domain ) ) 156 $image = blavatar_url( $blavatar_domain, 'img', $width ); 170 // Fallback to Mshot 171 if ( empty( $image ) ) { 172 $image = 'http://s.wordpress.com/mshots/v1/' . urlencode( get_permalink( $post->ID ) ); 157 173 } 158 174
Note: See TracChangeset
for help on using the changeset viewer.