@@ 71-84 (lines=14) @@ | ||
68 | return call_user_func( $callable ); |
|
69 | } |
|
70 | ||
71 | public function enqueue_full_sync_actions() { |
|
72 | /** |
|
73 | * Tells the client to sync all callables to the server |
|
74 | * |
|
75 | * @since 4.2.0 |
|
76 | * |
|
77 | * @param boolean Whether to expand callables (should always be true) |
|
78 | */ |
|
79 | do_action( 'jetpack_full_sync_callables', true ); |
|
80 | set_transient( self::CALLABLES_AWAIT_TRANSIENT_NAME, microtime( true ), Jetpack_Sync_Defaults::$default_sync_callables_wait_time ); |
|
81 | remove_action( 'jetpack_sync_before_send', array( $this, 'maybe_sync_callables' ) ); |
|
82 | ||
83 | return 1; // The number of actions enqueued |
|
84 | } |
|
85 | ||
86 | public function get_full_sync_actions() { |
|
87 | return array( 'jetpack_full_sync_callables' ); |
@@ 50-62 (lines=13) @@ | ||
47 | $this->maybe_sync_constants(); |
|
48 | } |
|
49 | ||
50 | function enqueue_full_sync_actions() { |
|
51 | /** |
|
52 | * Tells the client to sync all constants to the server |
|
53 | * |
|
54 | * @since 4.2.0 |
|
55 | * |
|
56 | * @param boolean Whether to expand constants (should always be true) |
|
57 | */ |
|
58 | do_action( 'jetpack_full_sync_constants', true ); |
|
59 | remove_action( 'jetpack_sync_before_send', array( $this, 'maybe_sync_constants' ) ); |
|
60 | set_transient( self::CONSTANTS_AWAIT_TRANSIENT_NAME, microtime( true ), Jetpack_Sync_Defaults::$default_sync_constants_wait_time ); |
|
61 | return 1; |
|
62 | } |
|
63 | ||
64 | function get_full_sync_actions() { |
|
65 | return array( 'jetpack_full_sync_constants' ); |