Making WordPress.org

Changeset 1292


Ignore:
Timestamp:
02/21/2015 01:25:16 AM (9 years ago)
Author:
iandunn
Message:

WordCamp Post Types: Add filters for local development environments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wc-post-types/wc-post-types.php

    r1229 r1292  
    10701070    public function add_avatar_to_speaker_posts( $content ) {
    10711071        global $post;
    1072         $enabled_site_ids = array( 364 );    // 2014.sf
     1072        $enabled_site_ids = apply_filters( 'wcpt_speaker_post_avatar_enabled_site_ids', array( 364 ) );    // 2014.sf
    10731073
    10741074        if ( 'wcb_speaker' !== $post->post_type ) {
     
    10771077
    10781078        $site_id = get_current_blog_id();
    1079         if ( $site_id <= 463 && ! in_array( $site_id, $enabled_site_ids ) ) {
     1079        if ( $site_id <= apply_filters( 'wcpt_speaker_post_avatar_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) {
    10801080            return $content;
    10811081        }
     
    10981098    function add_speaker_info_to_session_posts( $content ) {
    10991099        global $post;
    1100         $enabled_site_ids = array( 364 );    // 2014.sf
     1100        $enabled_site_ids = apply_filters( 'wcpt_session_post_speaker_info_enabled_site_ids', array( 364 ) );    // 2014.sf
    11011101
    11021102        if ( 'wcb_session' !== $post->post_type ) {
     
    11051105
    11061106        $site_id = get_current_blog_id();
    1107         if ( $site_id <= 463 && ! in_array( $site_id, $enabled_site_ids ) ) {
     1107        if ( $site_id <= apply_filters( 'wcpt_session_post_speaker_info_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) {
    11081108            return $content;
    11091109        }
     
    11631163    function add_session_info_to_speaker_posts( $content ) {
    11641164        global $post;
    1165         $enabled_site_ids = array( 364 );    // 2014.sf
     1165        $enabled_site_ids = apply_filters( 'wcpt_speaker_post_session_info_enabled_site_ids', array( 364 ) );    // 2014.sf
    11661166
    11671167        if ( 'wcb_speaker' !== $post->post_type ) {
     
    11701170
    11711171        $site_id = get_current_blog_id();
    1172         if ( $site_id <= 463 && ! in_array( $site_id, $enabled_site_ids ) ) {
     1172        if ( $site_id <= apply_filters( 'wcpt_speaker_post_session_info_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) {
    11731173            return $content;
    11741174        }
Note: See TracChangeset for help on using the changeset viewer.