Ticket #1403: 1403.diff
File 1403.diff, 4.1 KB (added by , 7 years ago) |
---|
-
wp-content/plugins/wc-post-types/inc/back-compat.php
21 21 22 22 // Initialize only if theme requires. 23 23 if ( in_array( $this->stylesheet, $compat_themes ) || in_array( $this->template, $compat_themes ) ) { 24 $old_site_id = get_current_blog_id() <= apply_filters( 'wcb_back_compat_max_site_id', 528 );25 $old_site_exceptions = array(26 450, // switzerland.wordcamp.org/201527 465, // denver.wordcamp.org/201528 484, // la.wordcamp.org/201529 496, // seattle.wordcamp.org/2015-experienced30 514, // montreal.wordcamp.org/201531 518, // montreal.wordcamp.org/2015-fr32 504, // europe.wordcamp.org/201533 );34 $old_site_excepted = in_array( get_current_blog_id(), apply_filters( 'wcb_back_compat_site_id_exceptions', $old_site_exceptions ) );35 24 36 25 // Substitute back-compat shortcodes on older sites, but let new sites use the real ones 37 if ( $old_site_id && ! $old_site_excepted) {26 if ( wcorg_skip_feature( 'back_compat' ) && ! wcorg_skip_feature( 'back_compat_exceptions' ) ) { 38 27 add_action( 'wcpt_back_compat_init', array( $this, 'wcpt_back_compat_init' ) ); 39 28 } 40 29 } -
wp-content/plugins/wc-post-types/wc-post-types.php
1237 1237 return $content; 1238 1238 } 1239 1239 1240 $site_id = get_current_blog_id(); 1241 if ( $site_id <= apply_filters( 'wcpt_speaker_post_avatar_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) { 1240 if ( wcorg_skip_feature( 'speaker_post_avatar' ) && ! in_array( get_current_blog_id(), $enabled_site_ids ) ) { 1242 1241 return $content; 1243 1242 } 1244 1243 … … 1265 1264 return $content; 1266 1265 } 1267 1266 1268 $site_id = get_current_blog_id(); 1269 if ( $site_id <= apply_filters( 'wcpt_session_post_speaker_info_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) { 1267 if ( wcorg_skip_feature( 'session_post_speaker_info' ) && ! in_array( get_current_blog_id(), $enabled_site_ids ) ) { 1270 1268 return $content; 1271 1269 } 1272 1270 … … 1462 1460 return $content; 1463 1461 } 1464 1462 1465 $site_id = get_current_blog_id(); 1466 if ( $site_id <= apply_filters( 'wcpt_speaker_post_session_info_min_site_id', 463 ) && ! in_array( $site_id, $enabled_site_ids ) ) { 1463 if ( wcorg_skip_feature( 'speaker_post_session_info' ) && ! in_array( get_current_blog_id(), $enabled_site_ids ) ) { 1467 1464 return $content; 1468 1465 } 1469 1466 -
wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
873 873 return $post_data; 874 874 } 875 875 876 // The ID of the last site that was created before this rule went into effect, so that we don't apply the rule retroactively. 877 $min_site_id = apply_filters( 'wcpt_require_complete_meta_min_site_id', '2416297' ); 876 $require_complete_meta = ! wcorg_skip_feature( 'require_complete_meta' ); 878 877 879 878 $required_needs_site_fields = $this->get_required_fields( 'needs-site' ); 880 879 $required_scheduled_fields = $this->get_required_fields( 'scheduled' ); 881 880 882 881 // Check pending posts 883 if ( 'wcpt-needs-site' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id) {882 if ( 'wcpt-needs-site' == $post_data['post_status'] && $require_complete_meta ) { 884 883 foreach( $required_needs_site_fields as $field ) { 885 884 $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ]; 886 885 … … 893 892 } 894 893 895 894 // Check published posts 896 if ( 'wcpt-scheduled' == $post_data['post_status'] && isset( $_POST['post_ID'] ) && absint( $_POST['post_ID'] ) > $min_site_id) {895 if ( 'wcpt-scheduled' == $post_data['post_status'] && $require_complete_meta ) { 897 896 foreach( $required_scheduled_fields as $field ) { 898 897 $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ]; 899 898