Changeset 1588 for sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
- Timestamp:
- 05/15/2015 11:36:41 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r1587 r1588 567 567 */ 568 568 public function require_complete_meta_to_publish_wordcamp( $post_data, $post_data_raw ) { 569 if ( WCPT_POST_TYPE_ID != $post_data['post_type'] ) { 570 return $post_data; 571 } 572 569 573 // The ID of the last site that was created before this rule went into effect, so that we don't apply the rule retroactively. 570 574 $min_site_id = apply_filters( 'wcpt_require_complete_meta_min_site_id', '2416297' ); … … 594 598 595 599 // Check pending posts 596 // todo return early if not wordcamp post type instead of checking in both of these conditions 597 if ( WCPT_POST_TYPE_ID == $post_data['post_type'] && 'pending' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) { 600 if ( 'pending' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) { 598 601 foreach( $required_pending_fields as $field ) { 599 602 $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ]; … … 608 611 609 612 // Check published posts 610 if ( WCPT_POST_TYPE_ID == $post_data['post_type'] &&'publish' == $post_data['post_status'] && isset( $_POST['post_ID'] ) && absint( $_POST['post_ID'] ) > $min_site_id ) {613 if ( 'publish' == $post_data['post_status'] && isset( $_POST['post_ID'] ) && absint( $_POST['post_ID'] ) > $min_site_id ) { 611 614 foreach( $required_publish_fields as $field ) { 612 615 $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ];
Note: See TracChangeset
for help on using the changeset viewer.