Changeset 2016092
- Timestamp:
- 01/21/2019 08:50:58 AM (7 years ago)
- Location:
- sermon-manager-for-wordpress/trunk
- Files:
-
- 2 edited
-
includes/sm-core-functions.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sermon-manager-for-wordpress/trunk/includes/sm-core-functions.php
r1986699 r2016092 843 843 * @param int $post_ID The sermon ID. 844 844 */ 845 function s et_service_type( $post_ID ) {845 function sm_set_service_type( $post_ID ) { 846 846 if ( isset( $_POST['wpfc_service_type'] ) ) { 847 847 $term = get_term_by( 'id', $_POST['wpfc_service_type'], 'wpfc_service_type' ); … … 852 852 853 853 wp_set_object_terms( $post_ID, empty( $service_type ) ? null : $service_type, 'wpfc_service_type' ); 854 } 855 } 856 857 add_action( 'save_post', 'set_service_type', 99 ); 854 855 return; 856 } 857 858 if ( isset( $_POST['tax_input'] ) && isset( $_POST['tax_input']['wpfc_service_type'] ) && $_POST['tax_input']['wpfc_service_type'] ) { 859 $terms = explode( ',', $_POST['tax_input']['wpfc_service_type'] ); 860 861 if ( $terms ) { 862 $term = get_term_by( 'name', $terms[0], 'wpfc_service_type' ); 863 864 if ( $term ) { 865 update_post_meta( $post_ID, 'wpfc_service_type', $term->term_id ); 866 } 867 } 868 } 869 } 870 871 add_action( 'save_post', 'sm_set_service_type' ); 858 872 859 873 /** -
sermon-manager-for-wordpress/trunk/readme.txt
r2013333 r2016092 128 128 * New: Add support for TwentyNineteen 129 129 * Change: Add WordPress author metabox 130 * Fix: Service Type not saving in quick edit 130 131 131 132 ### 2.15.12 ###
Note: See TracChangeset
for help on using the changeset viewer.