PluginProbe
Media Cloud Sync / 1.4.1
Media Cloud Sync v1.4.1
1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 35 releases
← All changes | includes/bulk/sync.php +2 -2 1.3.121.4.1 View file →
@@ -69,9 +69,9 @@
69 69 /**
70 70 * Starts the sync process.
71 71 *
72 72 */
73 - public function start( $action ) {
73 + public function start( $action, $options = [] ) {
74 74 $action_class = $this->get_class_by_action($action);
75 75
76 76 if($action_class) {
77 77 // BGRunner's lock is per-type — nothing else stops two different actions from running at once.
@@ -83,9 +83,9 @@
83 83 'message' => sprintf(__('Another sync (%s) is currently running. Stop or finish it before starting a new one.', 'media-cloud-sync'), $blocking_action),
84 84 ];
85 85 }
86 86
87 - $start_result = $action_class->start();
87 + $start_result = $action_class->start( $options );
88 88 // A job's start() can signal a precondition failure (e.g. no destination
89 89 // configured) by returning ['success' => false, ...] instead of the usual
90 90 // void/true — short-circuit and pass that straight through instead of masking
91 91 // it with a status object that always reads as started.