PluginProbe
WANotifier for Forms and Actions / 2.6.3
WANotifier for Forms and Actions v2.6.3
3.1.1 3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 All 67 releases
← All changes | libraries/action-scheduler/classes/migration/Controller.php +9 -34 3.1.12.6.3 View file →
@@ -18,41 +18,20 @@
18 18 *
19 19 * @codeCoverageIgnore
20 20 */
21 21 class Controller {
22 - /**
23 - * Instance.
24 - *
25 - * @var self
26 - */
27 22 private static $instance;
28 23
29 - /**
30 - * Scheduler instance.
31 - *
32 - * @var Action_Scheduler\Migration\Scheduler
33 - */
24 + /** @var Action_Scheduler\Migration\Scheduler */
34 25 private $migration_scheduler;
35 26
36 - /**
37 - * Class name of the store object.
38 - *
39 - * @var string
40 - */
27 + /** @var string */
41 28 private $store_classname;
42 29
43 - /**
44 - * Class name of the logger object.
45 - *
46 - * @var string
47 - */
30 + /** @var string */
48 31 private $logger_classname;
49 32
50 - /**
51 - * Flag to indicate migrating custom store.
52 - *
53 - * @var bool
54 - */
33 + /** @var bool */
55 34 private $migrate_custom_store;
56 35
57 36 /**
58 37 * Controller constructor.
@@ -162,9 +141,9 @@
162 141 $config->set_progress_bar( new ProgressBar( '', 0 ) );
163 142 }
164 143 }
165 144
166 - return apply_filters( 'action_scheduler/migration_config', $config ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
145 + return apply_filters( 'action_scheduler/migration_config', $config );
167 146 }
168 147
169 148 /**
170 149 * Hook dashboard migration notice.
@@ -179,15 +158,9 @@
179 158 /**
180 159 * Show a dashboard notice that migration is in progress.
181 160 */
182 161 public function display_migration_notice() {
183 - wp_admin_notice(
184 - __( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ),
185 - array(
186 - 'type' => 'warning',
187 - 'paragraph_wrap' => true,
188 - )
189 - );
162 + printf( '<div class="notice notice-warning"><p>%s</p></div>', esc_html__( 'Action Scheduler migration in progress. The list of scheduled actions may be incomplete.', 'action-scheduler' ) );
190 163 }
191 164
192 165 /**
193 166 * Add store classes. Hook migration.
@@ -197,9 +170,9 @@
197 170 add_filter( 'action_scheduler_logger_class', array( $this, 'get_logger_class' ), 100, 1 );
198 171 add_action( 'init', array( $this, 'maybe_hook_migration' ) );
199 172 add_action( 'wp_loaded', array( $this, 'schedule_migration' ) );
200 173
201 - // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen.
174 + // Action Scheduler may be displayed as a Tools screen or WooCommerce > Status administration screen
202 175 add_action( 'load-tools_page_action-scheduler', array( $this, 'hook_admin_notices' ), 10, 0 );
203 176 add_action( 'load-woocommerce_page_wc-status', array( $this, 'hook_admin_notices' ), 10, 0 );
204 177 }
205 178
@@ -204,8 +177,10 @@
204 177 }
205 178
206 179 /**
207 180 * Possibly hook the migration scheduler action.
181 + *
182 + * @author Jeremy Pry
208 183 */
209 184 public function maybe_hook_migration() {
210 185 if ( ! $this->allow_migration() || \ActionScheduler_DataController::is_migration_complete() ) {
211 186 return;