summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2020-02-17 11:55:41 -0500
committerAnthony G. Basile <blueness@gentoo.org>2020-02-17 11:55:41 -0500
commitdd791649a46b33fd7d5ea388fa42f1cf99c82884 (patch)
treeddc745e49425b01732343da42a19018b7dd737c4 /plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php
parentRemove extraneous .zip (diff)
downloadblogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.tar.gz
blogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.tar.bz2
blogs-gentoo-dd791649a46b33fd7d5ea388fa42f1cf99c82884.zip
update jetpack 8.2.1
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php')
-rw-r--r--plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php
index c30ae8c7..60c458c8 100644
--- a/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php
+++ b/plugins/jetpack/vendor/automattic/jetpack-sync/src/modules/class-network-options.php
@@ -126,6 +126,29 @@ class Network_Options extends Module {
}
/**
+ * Send the network options actions for full sync.
+ *
+ * @access public
+ *
+ * @param array $config Full sync configuration for this sync module.
+ * @param int $send_until The timestamp until the current request can send.
+ * @param array $state This module Full Sync status.
+ *
+ * @return array This module Full Sync status.
+ */
+ public function send_full_sync_actions( $config, $send_until, $state ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
+ if ( ! is_multisite() ) {
+ return array( null, true );
+ }
+
+ // we call this instead of do_action when sending immediately.
+ $this->send_action( 'jetpack_full_sync_network_options', array( true ) );
+
+ // The number of actions enqueued, and next module state (true == done).
+ return array( 'finished' => true );
+ }
+
+ /**
* Retrieve an estimated number of actions that will be enqueued.
*
* @access public
@@ -233,4 +256,16 @@ class Network_Options extends Module {
return $args;
}
+
+ /**
+ * Return Total number of objects.
+ *
+ * @param array $config Full Sync config.
+ *
+ * @return int total
+ */
+ public function total( $config ) {
+ return count( $this->network_options_whitelist );
+ }
+
}