| @@ -3,9 +3,9 @@ | ||
| 3 | 3 | /** |
| 4 | 4 | * Plugin Name: Tracking Script Manager |
| 5 | 5 | * Plugin URI: http://wordpress.org/plugins/tracking-script-manager/ |
| 6 | 6 | * Description: A plugin that allows you to add tracking scripts to your site. |
| 7 | - * Version: 2.0.14 | |
| 7 | + * Version: 2.0.15 | |
| 8 | 8 | * Author: Red8 Interactive |
| 9 | 9 | * Author URI: http://red8interactive.com |
| 10 | 10 | * License: GPLv2 or later |
| 11 | 11 | */ |
| @@ -43,8 +43,9 @@ | ||
| 43 | 43 | public function initialize() |
| 44 | 44 | { |
| 45 | 45 | |
| 46 | 46 | // Constants |
| 47 | + define('TRACKING_SCRIPT_VERSION', '2.0.15'); | |
| 47 | 48 | define('TRACKING_SCRIPT_PATH', plugins_url(' ', __FILE__)); |
| 48 | 49 | define('TRACKING_SCRIPT_BASENAME', plugin_basename(__FILE__)); |
| 49 | 50 | define('TRACKING_SCRIPT_DIR_PATH', plugin_dir_path(__FILE__)); |
| 50 | 51 | define('TRACKING_SCRIPT_TEXTDOMAIN', 'tracking-scripts-manager'); |
| @@ -701,11 +702,11 @@ | ||
| 701 | 702 | { |
| 702 | 703 | global $post; |
| 703 | 704 | if ($hook === 'post.php' || $hook === 'post-new.php') { |
| 704 | 705 | if (! empty($post->post_type) && ($post->post_type === 'r8_tracking_scripts')) { |
| 705 | - wp_enqueue_style('r8-tsm-edit-script', plugins_url('/css/tracking-script-edit.css', __FILE__), array(), md5_file(plugins_url('/css/tracking-script-edit.css', __FILE__))); | |
| 706 | - wp_enqueue_style('r8-tsm-select2-css', plugins_url('/css/select2.min.css', __FILE__), array(), md5_file(plugins_url('/css/select2.min.css', __FILE__))); | |
| 707 | - wp_enqueue_script('r8-tsm-select2-js', plugins_url('/js/select2.min.js', __FILE__), array(), md5_file(plugins_url('/js/select2.min.js', __FILE__)), true); | |
| 706 | + wp_enqueue_style('r8-tsm-edit-script', plugins_url('/css/tracking-script-edit.css', __FILE__), array(), TRACKING_SCRIPT_VERSION); | |
| 707 | + wp_enqueue_style('r8-tsm-select2-css', plugins_url('/css/select2.min.css', __FILE__), array(), TRACKING_SCRIPT_VERSION); | |
| 708 | + wp_enqueue_script('r8-tsm-select2-js', plugins_url('/js/select2.min.js', __FILE__), array(), TRACKING_SCRIPT_VERSION, true); | |
| 708 | 709 | wp_enqueue_script( |
| 709 | 710 | 'r8-tsm-post-edit-js', |
| 710 | 711 | plugins_url('/js/post-edit.js', __FILE__), |
| 711 | 712 | array( |
| @@ -711,9 +712,9 @@ | ||
| 711 | 712 | array( |
| 712 | 713 | 'jquery', |
| 713 | 714 | 'r8-tsm-select2-js', |
| 714 | 715 | ), |
| 715 | - md5_file(plugins_url('/js/post-edit.js', __FILE__)), | |
| 716 | + TRACKING_SCRIPT_VERSION, | |
| 716 | 717 | true |
| 717 | 718 | ); |
| 718 | 719 | wp_enqueue_style('jquery-ui-css', 'https://code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css'); |
| 719 | 720 | wp_enqueue_script('jquery-ui-datepicker'); |
| @@ -720,10 +721,10 @@ | ||
| 720 | 721 | } |
| 721 | 722 | } |
| 722 | 723 | if ($hook === 'post.php' || $hook === 'edit.php') { |
| 723 | 724 | if (! empty($post->post_type) && ($post->post_type === 'r8_tracking_scripts')) { |
| 724 | - wp_enqueue_style('r8-tsm-post-list', plugins_url('/css/post-list.css', __FILE__), array(), md5_file(plugins_url('/css/post-list.css', __FILE__))); | |
| 725 | - wp_enqueue_script('r8-tsm-post-list-js', plugins_url('/js/post-list.js', __FILE__), array('jquery'), md5_file(plugins_url('/js/post-list.js', __FILE__)), true); | |
| 725 | + wp_enqueue_style('r8-tsm-post-list', plugins_url('/css/post-list.css', __FILE__), array(), TRACKING_SCRIPT_VERSION); | |
| 726 | + wp_enqueue_script('r8-tsm-post-list-js', plugins_url('/js/post-list.js', __FILE__), array('jquery'), TRACKING_SCRIPT_VERSION, true); | |
| 726 | 727 | } |
| 727 | 728 | } |
| 728 | 729 | if (! empty($post->post_type) && ($post->post_type === 'r8_tracking_scripts')) { |
| 729 | 730 | // code editor support |