Changeset 2907328
- Timestamp:
- 05/03/2023 07:47:20 AM (3 years ago)
- Location:
- thrivedesk
- Files:
-
- 6 edited
- 1 copied
-
tags/1.0.14 (copied) (copied from thrivedesk/trunk)
-
tags/1.0.14/database/Scripts/MigrationScript.php (modified) (3 diffs)
-
tags/1.0.14/readme.txt (modified) (2 diffs)
-
tags/1.0.14/thrivedesk.php (modified) (2 diffs)
-
trunk/database/Scripts/MigrationScript.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/thrivedesk.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thrivedesk/tags/1.0.14/database/Scripts/MigrationScript.php
r2907319 r2907328 8 8 9 9 public function __construct() { 10 register_activation_hook( THRIVEDESK_FILE, [ $this, 'run' ] ); 11 add_action( 'upgrader_process_complete', 'wp_td_update_completed', 10, 2 ); 10 add_action( 'plugins_loaded', [ $this, 'run' ], 10, 2 ); 12 11 } 13 12 … … 18 17 19 18 return self::$instance; 20 }21 22 public function wp_td_update_completed( $upgrader_object, $options ) {23 if ( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {24 foreach ( $options['plugins'] as $plugin ) {25 if ( $plugin == plugin_basename( THRIVEDESK_FILE ) ) {26 $this->run();27 break;28 }29 }30 }31 19 } 32 20 … … 40 28 41 29 private function migratePostSyncOption() { 30 if ( ! current_user_can( 'manage_options' ) ) { 31 return; 32 } 33 42 34 $old_post_sync_option = get_option( 'thrivedesk_post_type_sync_option' ); 43 35 -
thrivedesk/tags/1.0.14/readme.txt
r2907319 r2907328 4 4 Requires at least: 4.9 5 5 Tested up to: 6.2 6 Stable Tag: 1.0.1 36 Stable Tag: 1.0.14 7 7 Requires PHP: 5.5 8 8 License: GNU General Public License v2.0 or later … … 224 224 225 225 == Changelog == 226 = 1.0.14 = 227 - Add: Permission check to run migration script 228 226 229 = 1.0.13 = 227 230 - Update: Migration Script -
thrivedesk/tags/1.0.14/thrivedesk.php
r2907319 r2907328 6 6 * Plugin URI: https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 7 7 * Tags: live chat, helpdesk, free live chat, knowledge base, thrivedesk 8 * Version: 1.0.1 38 * Version: 1.0.14 9 9 * Author: ThriveDesk 10 10 * Author URI: https://profiles.wordpress.org/thrivedesk/ … … 50 50 * @var string 51 51 */ 52 public $version = '1.0.1 3';52 public $version = '1.0.14'; 53 53 54 54 /** -
thrivedesk/trunk/database/Scripts/MigrationScript.php
r2907319 r2907328 8 8 9 9 public function __construct() { 10 register_activation_hook( THRIVEDESK_FILE, [ $this, 'run' ] ); 11 add_action( 'upgrader_process_complete', 'wp_td_update_completed', 10, 2 ); 10 add_action( 'plugins_loaded', [ $this, 'run' ], 10, 2 ); 12 11 } 13 12 … … 18 17 19 18 return self::$instance; 20 }21 22 public function wp_td_update_completed( $upgrader_object, $options ) {23 if ( $options['action'] == 'update' && $options['type'] == 'plugin' && isset( $options['plugins'] ) ) {24 foreach ( $options['plugins'] as $plugin ) {25 if ( $plugin == plugin_basename( THRIVEDESK_FILE ) ) {26 $this->run();27 break;28 }29 }30 }31 19 } 32 20 … … 40 28 41 29 private function migratePostSyncOption() { 30 if ( ! current_user_can( 'manage_options' ) ) { 31 return; 32 } 33 42 34 $old_post_sync_option = get_option( 'thrivedesk_post_type_sync_option' ); 43 35 -
thrivedesk/trunk/readme.txt
r2907319 r2907328 4 4 Requires at least: 4.9 5 5 Tested up to: 6.2 6 Stable Tag: 1.0.1 36 Stable Tag: 1.0.14 7 7 Requires PHP: 5.5 8 8 License: GNU General Public License v2.0 or later … … 224 224 225 225 == Changelog == 226 = 1.0.14 = 227 - Add: Permission check to run migration script 228 226 229 = 1.0.13 = 227 230 - Update: Migration Script -
thrivedesk/trunk/thrivedesk.php
r2907319 r2907328 6 6 * Plugin URI: https://www.thrivedesk.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash 7 7 * Tags: live chat, helpdesk, free live chat, knowledge base, thrivedesk 8 * Version: 1.0.1 38 * Version: 1.0.14 9 9 * Author: ThriveDesk 10 10 * Author URI: https://profiles.wordpress.org/thrivedesk/ … … 50 50 * @var string 51 51 */ 52 public $version = '1.0.1 3';52 public $version = '1.0.14'; 53 53 54 54 /**
Note: See TracChangeset
for help on using the changeset viewer.