Changeset 1997526
- Timestamp:
- 12/18/2018 09:21:16 PM (7 years ago)
- Location:
- amilia-store/trunk
- Files:
-
- 7 edited
-
amilia-store.php (modified) (7 diffs)
-
shortcodes/amilia-store-calendar.js (modified) (2 diffs)
-
shortcodes/amilia-store-calendar.php (modified) (2 diffs)
-
shortcodes/amilia-store-iframe.js (modified) (1 diff)
-
shortcodes/amilia-store-standings.js (modified) (2 diffs)
-
shortcodes/amilia-store-standings.php (modified) (2 diffs)
-
shortcodes/amilia-store-table.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
amilia-store/trunk/amilia-store.php
r1997512 r1997526 6 6 Author: Martin Drapeau <martin.drapeau@amilia.com> 7 7 Copyright: 2014-2018 Amilia 8 Version: 2.9. 48 Version: 2.9.5 9 9 Author URI: http://www.amilia.com/ 10 10 License: Apache License 2.0 … … 12 12 Text Domain: amilia-store 13 13 */ 14 15 define('AMILIA_STORE_PLUGIN_VERSION', '2.9.5'); 14 16 15 17 // Localization and JS bootstrap … … 127 129 window.Amilia = { 128 130 PLUGIN_NAME: 'amilia_store', 131 pluginVersion: '<?php echo AMILIA_STORE_PLUGIN_VERSION; ?>', 129 132 pluginUrl: '<?php echo plugin_dir_url( __FILE__ ); ?>', 130 133 objectL10n: <?php echo json_encode($dict); ?>, … … 133 136 </script> 134 137 <?php 135 wp_enqueue_style('amilia_store_css', plugins_url('amilia-store.css', __FILE__) );136 wp_enqueue_script('amilia_store_js', plugins_url('amilia-store.js', __FILE__) );138 wp_enqueue_style('amilia_store_css', plugins_url('amilia-store.css', __FILE__), array(), AMILIA_STORE_PLUGIN_VERSION); 139 wp_enqueue_script('amilia_store_js', plugins_url('amilia-store.js', __FILE__), array(), AMILIA_STORE_PLUGIN_VERSION); 137 140 } 138 141 } … … 142 145 // Settings 143 146 function register_amilia_store_settings() { 144 register_setting( 'amilia-store-settings-group', 'amilia_store_url' ); 147 register_setting('amilia-store-settings-group', 'amilia_store_url'); 148 register_setting('amilia-store-settings-group', 'amilia_store_version', array('type' => 'string', 'default' => AMILIA_STORE_PLUGIN_VERSION)); 145 149 } 146 150 function amilia_store_create_menu() { … … 150 154 add_action('admin_menu', 'amilia_store_create_menu'); 151 155 function amilia_store_settings_page() { 152 wp_enqueue_script('amilia_store_settings_js', plugins_url('amilia-store-settings.js', __FILE__) );156 wp_enqueue_script('amilia_store_settings_js', plugins_url('amilia-store-settings.js', __FILE__), array(), AMILIA_STORE_PLUGIN_VERSION); 153 157 ?> 154 158 <div class="wrap"> … … 178 182 // Editor buttons 179 183 function amilia_store_add_tinymce_plugins($plugin_array) { 180 $plugin_array['amilia_store_iframe'] = plugins_url('shortcodes/amilia-store-iframe.js', __FILE__) ;181 $plugin_array['amilia_store_table'] = plugins_url('shortcodes/amilia-store-table.js', __FILE__) ;182 $plugin_array['amilia_store_button'] = plugins_url('shortcodes/amilia-store-button.js', __FILE__) ;183 $plugin_array['amilia_store_calendar'] = plugins_url('shortcodes/amilia-store-calendar.js', __FILE__) ;184 $plugin_array['amilia_store_standings'] = plugins_url('shortcodes/amilia-store-standings.js', __FILE__) ;184 $plugin_array['amilia_store_iframe'] = plugins_url('shortcodes/amilia-store-iframe.js', __FILE__).'?v='.AMILIA_STORE_PLUGIN_VERSION; 185 $plugin_array['amilia_store_table'] = plugins_url('shortcodes/amilia-store-table.js', __FILE__).'?v='.AMILIA_STORE_PLUGIN_VERSION; 186 $plugin_array['amilia_store_button'] = plugins_url('shortcodes/amilia-store-button.js', __FILE__).'?v='.AMILIA_STORE_PLUGIN_VERSION; 187 $plugin_array['amilia_store_calendar'] = plugins_url('shortcodes/amilia-store-calendar.js', __FILE__).'?v='.AMILIA_STORE_PLUGIN_VERSION; 188 $plugin_array['amilia_store_standings'] = plugins_url('shortcodes/amilia-store-standings.js', __FILE__).'?v='.AMILIA_STORE_PLUGIN_VERSION; 185 189 return $plugin_array; 186 190 } -
amilia-store/trunk/shortcodes/amilia-store-calendar.js
r1997512 r1997526 241 241 var tags = getSelectedTags(); 242 242 var facilities = getSelectedFacilities(); 243 return '[' + SHORTCODE + " url='{url}' view='{view}' date='{date}' time='{time}' tags='{tags}' tagsfilter='{show-tags-filter}' facilities='{facilities}' facilitiesfilter='{show-facilities-filter}' showstaff='{show-staff}' showhidden='{show-hidden}' api='{api}' ]"243 return '[' + SHORTCODE + " url='{url}' view='{view}' date='{date}' time='{time}' tags='{tags}' tagsfilter='{show-tags-filter}' facilities='{facilities}' facilitiesfilter='{show-facilities-filter}' showstaff='{show-staff}' showhidden='{show-hidden}' api='{api}' version='{version}']" 244 244 .replace('{url}', storeUrl.value) 245 245 .replace('{view}', startView.value) … … 252 252 .replace('{show-staff}', showStaff.checked ? 1 : 0) 253 253 .replace('{show-hidden}', showHidden.checked ? 1 : 0) 254 .replace('{api}', urlComponents ? urlComponents.apiUrl : ''); 254 .replace('{api}', urlComponents ? urlComponents.apiUrl : '') 255 .replace('{version}', Amilia.pluginVersion); 255 256 } 256 257 -
amilia-store/trunk/shortcodes/amilia-store-calendar.php
r1997512 r1997526 9 9 'view' => 'month', 10 10 'date' => '', 11 'time' => ' 06:00:00',11 'time' => '', 12 12 'showstaff' => 0, 13 13 'showhidden' => 0, 14 14 'url' => 'https://www.amilia.com/store/en/usa-amilia-group/shop/products', 15 'api' => 'https://www.amilia.com/PublicApi/usa-amilia-group/en/' 15 'api' => 'https://www.amilia.com/PublicApi/usa-amilia-group/en/', 16 'version' => '0' 16 17 ), $atts); 17 18 … … 38 39 $label_ShowOfficials = __("Show officials", 'amilia-store'); 39 40 $label_HideOfficials = __("Hide officials", 'amilia-store'); 40 $clientJSFile = plugins_url('amilia-store-calendar-client.js', __FILE__) ;41 $clientJSFile = plugins_url('amilia-store-calendar-client.js', __FILE__).'?v='.$a['version']; 41 42 42 43 $html = <<<EOD -
amilia-store/trunk/shortcodes/amilia-store-iframe.js
r1968084 r1997526 85 85 86 86 function generateShortCode() { 87 return '[' + SHORTCODE + " url='{url}' color='{color}' ]"87 return '[' + SHORTCODE + " url='{url}' color='{color}' version='{version}']" 88 88 .replace('{url}', storeUrl.value) 89 .replace('{color}', Amilia.COLORS[color.value]); 89 .replace('{color}', Amilia.COLORS[color.value]) 90 .replace('{version}', Amilia.pluginVersion); 90 91 } 91 92 -
amilia-store/trunk/shortcodes/amilia-store-standings.js
r1996509 r1997526 257 257 var subCategory = getSelectedSubCategory(); 258 258 var tags = getSelectedTags(); 259 return '[' + SHORTCODE + " url='{url}' sport='{sport}' program='{program}' subcategory='{sub-category}' tags='{tags}' showhidden='{show-hidden}' showstaff='{show-staff}' show='{show}' api='{api}' ]"259 return '[' + SHORTCODE + " url='{url}' sport='{sport}' program='{program}' subcategory='{sub-category}' tags='{tags}' showhidden='{show-hidden}' showstaff='{show-staff}' show='{show}' api='{api}' version='{version}']" 260 260 .replace('{url}', storeUrl.value) 261 261 .replace('{sport}', sportSelect.value) … … 266 266 .replace('{show-staff}', showStaff.checked ? 1 : 0) 267 267 .replace('{show}', showSelect.value) 268 .replace('{api}', urlComponents ? urlComponents.apiUrl : ''); 268 .replace('{api}', urlComponents ? urlComponents.apiUrl : '') 269 .replace('{version}', Amilia.pluginVersion); 269 270 } 270 271 -
amilia-store/trunk/shortcodes/amilia-store-standings.php
r1996509 r1997526 11 11 'show' => 'standings,schedule', 12 12 'url' => 'https://www.amilia.com/store/en/usa-amilia-group/shop/products', 13 'api' => 'https://www.amilia.com/PublicApi/usa-amilia-group/en/' 13 'api' => 'https://www.amilia.com/PublicApi/usa-amilia-group/en/', 14 'version' => '0' 14 15 ), $atts); 15 16 … … 25 26 $showStaff = $a['showstaff'] == 1 ? 1 : 0; 26 27 $show = $a['show']; 27 $clientJSFile = plugins_url('amilia-store-standings-client.js', __FILE__) ;28 $clientJSFile = plugins_url('amilia-store-standings-client.js', __FILE__).'?v='.$a['version']; 28 29 29 30 $lang = __("en", 'amilia-store'); -
amilia-store/trunk/shortcodes/amilia-store-table.js
r1968084 r1997526 162 162 columns = getCheckedColumns(), 163 163 urlComponents = Amilia.getUrlComponents(storeUrl.value); 164 return '[' + SHORTCODE + " url='{url}' tags='{tags}' columns='{columns}' api='{api}' ]"164 return '[' + SHORTCODE + " url='{url}' tags='{tags}' columns='{columns}' api='{api}' version='{version}']" 165 165 .replace('{url}', storeUrl.value) 166 166 .replace('{tags}', tags.join(',')) 167 167 .replace('{columns}', columns.join(',')) 168 .replace('{api}', urlComponents ? urlComponents.apiUrl : ''); 168 .replace('{api}', urlComponents ? urlComponents.apiUrl : '') 169 .replace('{version}', Amilia.pluginVersion); 169 170 } 170 171
Note: See TracChangeset
for help on using the changeset viewer.