Changeset 3159
- Timestamp:
- 05/17/2016 07:52:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/public_html/wp-content/plugins/wcpt/wcpt-wordcamp/wordcamp-admin.php
r3126 r3159 764 764 $min_site_id = apply_filters( 'wcpt_require_complete_meta_min_site_id', '2416297' ); 765 765 766 $required_ pre_planning_fields = $this->get_required_fields( 'pre-planning' );766 $required_needs_site_fields = $this->get_required_fields( 'needs-site' ); 767 767 $required_scheduled_fields = $this->get_required_fields( 'scheduled' ); 768 // todo realign 768 769 769 770 // Check pending posts 770 if ( 'wcpt- approved-pre-pl' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) {771 foreach( $required_ pre_planning_fields as $field ) {771 if ( 'wcpt-needs-site' == $post_data['post_status'] && absint( $_POST['post_ID'] ) > $min_site_id ) { 772 foreach( $required_needs_site_fields as $field ) { 772 773 $value = $_POST[ wcpt_key_to_str( $field, 'wcpt_' ) ]; 773 774 774 775 if ( empty( $value ) || 'null' == $value ) { 775 $post_data['post_status'] = 'wcpt- interview-sched';776 $post_data['post_status'] = 'wcpt-needs-email'; 776 777 $this->active_admin_notices[] = 1; 777 778 break; … … 799 800 * Get a list of fields required to move to a certain post status 800 801 * 801 * @param string $status ' pre-planning' | 'scheduled' | 'any'802 * @param string $status 'needs-site' | 'scheduled' | 'any' 802 803 * 803 804 * @return array 804 805 */ 805 806 public static function get_required_fields( $status ) { 806 $ pre_planning= array( 'E-mail Address' );807 $needs_site = array( 'E-mail Address' ); 807 808 808 809 $scheduled = array( … … 828 829 829 830 switch ( $status ) { 830 case ' pre-planning':831 $required_fields = $ pre_planning;831 case 'needs-site': 832 $required_fields = $needs_site; 832 833 break; 833 834 … … 838 839 case 'any': 839 840 default: 840 $required_fields = array_merge( $ pre_planning, $scheduled );841 $required_fields = array_merge( $needs_site, $scheduled ); 841 842 break; 842 843 } … … 888 889 1 => array( 889 890 'type' => 'error', 890 'notice' => __( 'This WordCamp cannot be approved for pre-planninguntil all of its required metadata is filled in.', 'wordcamporg' ),891 'notice' => __( 'This WordCamp cannot be moved to Needs Site until all of its required metadata is filled in.', 'wordcamporg' ), 891 892 ), 892 893
Note: See TracChangeset
for help on using the changeset viewer.