Making WordPress.org


Ignore:
Timestamp:
11/28/2018 02:17:30 AM (6 years ago)
Author:
iandunn
Message:

Jetpack Tweaks: Apply coding standards.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/mu-plugins/jetpack-tweaks/sharing.php

    r7910 r7911  
    22
    33namespace WordCamp\Jetpack_Tweaks;
    4 defined( 'WPINC' ) or die();
     4
     5defined( 'WPINC' ) || die();
    56
    67add_filter( 'jetpack_open_graph_image_default', __NAMESPACE__ . '\default_og_image'               );
     
    910add_filter( 'jetpack_twitter_cards_site_tag',   __NAMESPACE__ . '\twitter_sitetag'                );
    1011
    11 /*
     12/**
    1213 * Open Graph Default Image.
    1314 *
     
    3839    if ( has_site_icon() ) {
    3940        $image_url = get_site_icon_url();
    40     } else if ( has_header_image() ) {
     41    } elseif ( has_header_image() ) {
    4142        $image_url = get_header_image();
    4243    } else {
     
    4445    }
    4546
    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    );
    5255}
    5356
    54 /*
     57/**
    5558 * Add Twitter Card type.
    5659 *
     
    6568}
    6669
    67 /*
     70/**
    6871 * User @WordCamp as the default Twitter account.
    6972 *
     
    7275 */
    7376function twitter_sitetag( $site_tag ) {
    74     if ( 'jetpack' == $site_tag ) {
     77    if ( 'jetpack' === $site_tag ) {
    7578        $site_tag = 'WordCamp';
    7679        add_filter( 'jetpack_sharing_twitter_via', '__return_empty_string' );
Note: See TracChangeset for help on using the changeset viewer.