Making WordPress.org

Ticket #502: meta502.diff

File meta502.diff, 2.0 KB (added by kraftbj, 10 years ago)
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-jetpack/img/wp-200x200-og.png

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-jetpack/wordcamp-jetpack.php

    Property changes on: sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-jetpack/img/wp-200x200-og.png
    ___________________________________________________________________
    Added: svn:mime-type
    ## -0,0 +1 ##
    +application/octet-stream
    \ No newline at end of property
     
     1<?php
     2
     3/*
     4 * Plugin Name: WordCamp Jetpack Overrides
     5 * Description: Adjustments to Jetpack functionality for WordCamp.org
     6 * Version:     0.1
     7 * Author:      Brandon Kraft
     8 */
     9
     10
     11/*
     12 * Facebook Open Graph Default Image
     13 * Provides a default image for sharing WordCamp home/pages to Facebook other than the Jetpack "blank" image.
     14 */
     15
     16function wc_fb_home_image( $tags ) {
     17    if ( is_home() || is_front_page() ) {
     18        // Remove the default blank image added by Jetpack
     19        unset( $tags['og:image'] );
     20
     21        $fb_home_img = plugins_url( 'img/wp-200x200-og.png', __FILE__ );
     22        $tags['og:image'] = esc_url( $fb_home_img );
     23    }
     24    return $tags;
     25}
     26add_filter( 'jetpack_open_graph_tags', 'wc_fb_home_image' );