Changeset 3257063
- Timestamp:
- 03/17/2025 10:50:44 AM (13 months ago)
- Location:
- track-global/trunk
- Files:
-
- 7 added
- 3 edited
-
assets/css (added)
-
assets/css/admin (added)
-
assets/css/admin/feedback-form.css (added)
-
assets/css/admin/feedback-form.min.css (added)
-
assets/js/admin/feedback-form.js (added)
-
assets/js/admin/feedback-form.min.js (added)
-
includes/class-track-global.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
-
track-global.php (modified) (2 diffs)
-
views/admin/feedback-form.php (added)
Legend:
- Unmodified
- Added
- Removed
-
track-global/trunk/includes/class-track-global.php
r3223426 r3257063 73 73 add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) ); 74 74 add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) ); 75 add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_styles' ) ); 76 add_action( 'admin_footer', array($this, 'prepare_deactivation_form') ); 75 77 } 76 78 … … 87 89 public function admin_enqueue_scripts( $hook = '' ) { 88 90 wp_register_script( 91 $this->plugin_id . '-admin-feedback-form', 92 esc_url( $this->assets_url ) . 'js/admin/feedback-form' . $this->script_suffix . '.js', 93 array( 'jquery' ), 94 $this->_version, 95 true 96 ); 97 98 wp_register_script( 89 99 $this->plugin_id . '-admin-shortcode-builder', 90 100 esc_url( $this->assets_url ) . 'js/admin/shortcode-builder' . $this->script_suffix . '.js', … … 94 104 ); 95 105 } 106 107 public function admin_enqueue_styles( $hook = '' ) { 108 wp_register_style( 109 $this->plugin_id . '-admin-feedback-form', 110 esc_url( $this->assets_url ) . 'css/admin/feedback-form.css', 111 array(), 112 $this->_version 113 ); 114 } 115 116 public function prepare_deactivation_form() { 117 $screen = get_current_screen(); 118 119 if ( $screen && ($screen->id === 'plugins') ) { 120 wp_enqueue_style( $this->plugin_id . '-admin-feedback-form' ); 121 wp_enqueue_script( $this->plugin_id . '-admin-feedback-form' ); 122 $plugin_id = $this->plugin_id; 123 $version = $this->_version; 124 $website = get_site_url(); 125 $date = gmdate('Y-m-d'); 126 $feedback_url = 'https://api.track.global/wp-statistic'; 127 $feedback_token = 'cf93c521595df2db2c9a2bea74662d5d354c88fd5b31c5fdc34beab99e170517'; 128 129 Track_Global::view('admin/feedback-form', compact('plugin_id', 'version', 'website', 'date', 'feedback_url', 'feedback_token')); 130 } 131 } 96 132 97 133 /** -
track-global/trunk/readme.txt
r3234058 r3257063 32 32 == Changelog == 33 33 34 = 1.0.3 = 35 * 2025-03-17 36 * Added feedback form on deactivation. 37 34 38 = 1.0.2 = 35 39 * 2025-02-03 -
track-global/trunk/track-global.php
r3234030 r3257063 5 5 * Plugin URI: https://track.global 6 6 * Description: Parcel tracking widget for your website. 7 * Version: 1.0. 27 * Version: 1.0.3 8 8 * Requires at least: 5.8 9 9 * Requires PHP: 7.4 … … 16 16 } 17 17 18 define( 'TRACK_GLOBAL_VERSION', '1.0. 1' );18 define( 'TRACK_GLOBAL_VERSION', '1.0.3' ); 19 19 define( 'TRACK_GLOBAL_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 20 20
Note: See TracChangeset
for help on using the changeset viewer.