Changeset 1249089
- Timestamp:
- 09/19/2015 08:15:13 AM (11 years ago)
- Location:
- am-events/trunk
- Files:
-
- 2 edited
-
am-events.php (modified) (9 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
am-events/trunk/am-events.php
r1237993 r1249089 4 4 Plugin URI: http://wordpress.org/extend/plugins/am-events/ 5 5 Description: Adds a post type for events and a customizable widget for displaying upcoming events. 6 Version: 1. 9.86 Version: 1.10.0 7 7 Author: Atte Moisio 8 8 Author URI: http://attemoisio.fi … … 521 521 */ 522 522 if ($_POST && get_post_type($post) === 'am_event') { 523 523 524 524 // Has the field been used? 525 525 $temp1 = trim($_POST['am_startdate']); … … 547 547 else 548 548 return; 549 550 do_action( 'am_save_event', $event_post_id ); 549 551 550 552 } … … 1052 1054 $_POST += array("am_quickedit_nonce" => ''); 1053 1055 if ( wp_verify_nonce( $_POST["am_quickedit_nonce"], plugin_basename( __FILE__ ) ) ) { 1054 // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want1055 // to do anything1056 1057 // verify if this is an auto save routine. If it is, our form has not been submitted, so we don't want to do anything 1056 1058 if ( $_POST['post_type'] !== 'am_event' ) { 1057 1059 return; … … 1061 1063 } 1062 1064 1063 if ( isset( $_REQUEST['am_startdate'] ) ) { 1064 $startdate = strtotime($_REQUEST['am_startdate'] ); 1065 if ($startdate) 1066 update_post_meta( $post_id, 'am_startdate', date( am_get_default_date_format(), $startdate) ); 1067 } 1068 if ( isset( $_REQUEST['am_enddate'] ) ) { 1069 $enddate = strtotime($_REQUEST['am_enddate'] ); 1070 if ($enddate) 1071 update_post_meta( $post_id, 'am_enddate', date( am_get_default_date_format(), $enddate)); 1072 } 1065 am_update_post_meta_date($post_id, 'am_startdate'); 1066 am_update_post_meta_date($post_id, 'am_enddate'); 1067 1073 1068 } 1074 1069 // Normal edit … … 1147 1142 am_copy_replace_terms($post_id, $new_post_id, 'am_event_categories'); 1148 1143 am_copy_replace_terms($post_id, $new_post_id, 'am_venues'); 1144 1145 do_action( 'am_copy_event', $post_id, $new_post_id ); 1149 1146 1150 1147 } … … 1200 1197 wp_update_post( $recurrent_post ); 1201 1198 add_action('save_post', 'am_save_custom_meta'); 1202 1199 1203 1200 am_copy_replace_tags($post_id, $id); 1204 1201 set_post_thumbnail($id, get_post_thumbnail_id($post_id)); … … 1207 1204 am_copy_replace_terms($post_id, $id, 'am_venues'); 1208 1205 1206 do_action( 'am_copy_event', $post_id, $id ); 1207 1209 1208 } 1210 1209 … … 1218 1217 } 1219 1218 1220 1219 } 1220 1221 function am_update_post_meta_date($post_id, $meta_key) { 1222 if ( isset( $_REQUEST[$meta_key] ) ) { 1223 $enddate = strtotime($_REQUEST[$meta_key] ); 1224 if ($enddate) 1225 update_post_meta( $post_id, $meta_key, date( am_get_default_date_format(), $enddate)); 1226 } 1221 1227 } 1222 1228 -
am-events/trunk/readme.txt
r1237993 r1249089 4 4 Requires at least: 3.3.1 5 5 Tested up to: 4.3 6 Stable tag: 1. 9.86 Stable tag: 1.10.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 55 55 56 56 == Changelog == 57 58 = 1.10.0 = 59 * Added hooks for including extra fields to event posts 57 60 58 61 = 1.9.8 = … … 137 140 138 141 == Upgrade Notice == 142 143 = 1.10.0 = 144 * Adds hooks for including extra fields to event posts 139 145 140 146 = 1.9.8 =
Note: See TracChangeset
for help on using the changeset viewer.