Changeset 1749358
- Timestamp:
- 10/19/2017 04:42:06 PM (8 years ago)
- File:
-
- 1 edited
-
am-events/trunk/am-events.php (modified) (12 diffs)
Legend:
- Unmodified
- Added
- Removed
-
am-events/trunk/am-events.php
r1749320 r1749358 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.1 2.06 Version: 1.13.0 7 7 Author: Atte Moisio 8 8 Author URI: http://attemoisio.fi 9 Text Domain: am-events 9 10 License: GPL2 10 11 */ … … 299 300 // Custom script for assigning jquery to inputs 300 301 wp_register_script('am_custom_script', plugins_url('/script/admin-post.js', __FILE__)); 301 302 302 303 303 304 // datetimepicker localization 304 305 $localization = array( … … 313 314 'pmNamesShort' => _x('P', 'time picker', 'am-events') 314 315 ); 315 316 316 317 $startDate = mysql_to_rfc3339(get_post_meta($post->ID, 'am_startdate', true)); 317 318 $endDate = mysql_to_rfc3339(get_post_meta($post->ID, 'am_enddate', true)); … … 325 326 //pass values to javascript 326 327 wp_localize_script('am_custom_script', 'localization', $localization); 327 wp_localize_script('am_custom_script', 'event_data', $eventData); 328 wp_localize_script('am_custom_script', 'event_data', $eventData); 328 329 wp_enqueue_script('am_custom_script', plugins_url('/script/admin-post.js', __FILE__, null, true)); 329 330 … … 398 399 wp_nonce_field(plugin_basename(__FILE__), 'am_nonce'); 399 400 400 401 401 402 402 403 // Echo content of the meta box … … 468 469 */ 469 470 if ($_POST && get_post_type($post) === 'am_event') { 470 471 471 472 // Has the field been used? 472 473 $temp1 = trim($_POST['am_startdate']); … … 494 495 else 495 496 return; 496 497 497 498 do_action( 'am_save_event', $post_id ); 498 499 … … 999 1000 $_POST += array("am_quickedit_nonce" => ''); 1000 1001 if ( wp_verify_nonce( $_POST["am_quickedit_nonce"], plugin_basename( __FILE__ ) ) ) { 1001 1002 1002 1003 // 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 1003 1004 if ( $_POST['post_type'] !== 'am_event' ) { … … 1010 1011 am_update_post_meta_date($post_id, 'am_startdate'); 1011 1012 am_update_post_meta_date($post_id, 'am_enddate'); 1012 1013 } 1014 1013 1014 } 1015 1015 1016 // Normal edit 1016 1017 else { … … 1088 1089 am_copy_replace_terms($post_id, $new_post_id, 'am_event_categories'); 1089 1090 am_copy_replace_terms($post_id, $new_post_id, 'am_venues'); 1090 1091 1091 1092 do_action( 'am_copy_event', $post_id, $new_post_id ); 1092 1093 … … 1143 1144 wp_update_post( $recurrent_post ); 1144 1145 add_action('save_post', 'am_save_custom_meta'); 1145 1146 1146 1147 am_copy_replace_tags($post_id, $id); 1147 1148 set_post_thumbnail($id, get_post_thumbnail_id($post_id)); … … 1151 1152 1152 1153 do_action( 'am_copy_event', $post_id, $id ); 1153 1154 1154 1155 } 1155 1156
Note: See TracChangeset
for help on using the changeset viewer.