Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Replace Default OG:Image in Jetpack
- * @version 1.0
- */
- add_filter( 'jetpack_open_graph_tags', 'jetpack_replace_default_og_image_tag', 10, 2 );
- function jetpack_replace_default_og_image_tag( $tags, $args ) {
- if ( in_array( 'http://wordpress.com/i/blank.jpg', $tags['og:image'] ) )
- $tags['og:image'] = array( 'http://mycred.me/hello.png' );
- return $tags;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement