@@ 121-124 (lines=4) @@ | ||
118 | add_action( 'jetpack_sync_callable', $callable, 10, 2 ); |
|
119 | add_action( 'current_screen', array( $this, 'set_plugin_action_links' ), 9999 ); // Should happen very late. |
|
120 | ||
121 | foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS as $option ) { |
|
122 | add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable' ) ); |
|
123 | add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable' ) ); |
|
124 | } |
|
125 | ||
126 | foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS_NEXT_TICK as $option ) { |
|
127 | add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) ); |
|
@@ 126-130 (lines=5) @@ | ||
123 | add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable' ) ); |
|
124 | } |
|
125 | ||
126 | foreach ( self::ALWAYS_SEND_UPDATES_TO_THESE_OPTIONS_NEXT_TICK as $option ) { |
|
127 | add_action( "update_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) ); |
|
128 | add_action( "delete_option_{$option}", array( $this, 'unlock_sync_callable_next_tick' ) ); |
|
129 | } |
|
130 | ||
131 | // Provide a hook so that hosts can send changes to certain callables right away. |
|
132 | // Especially useful when a host uses constants to change home and siteurl. |
|
133 | add_action( 'jetpack_sync_unlock_sync_callable', array( $this, 'unlock_sync_callable' ) ); |