|
@@ 461-471 (lines=11) @@
|
| 458 |
|
do_action( 'jetpack_full_sync_network_options', true ); |
| 459 |
|
} |
| 460 |
|
|
| 461 |
|
private function maybe_sync_constants() { |
| 462 |
|
$constants = $this->get_all_constants(); |
| 463 |
|
if ( empty( $constants ) ) { |
| 464 |
|
return; |
| 465 |
|
} |
| 466 |
|
$constants_check_sum = $this->get_check_sum( $constants ); |
| 467 |
|
if ( $constants_check_sum !== (int) get_option( self::$constants_checksum_option_name ) ) { |
| 468 |
|
do_action( 'jetpack_sync_current_constants', $constants ); |
| 469 |
|
update_option( self::$constants_checksum_option_name, $constants_check_sum ); |
| 470 |
|
} |
| 471 |
|
} |
| 472 |
|
|
| 473 |
|
private function get_all_constants() { |
| 474 |
|
return array_combine( |
|
@@ 493-503 (lines=11) @@
|
| 490 |
|
$this->maybe_sync_callables(); |
| 491 |
|
} |
| 492 |
|
|
| 493 |
|
private function maybe_sync_callables() { |
| 494 |
|
$callables = $this->get_all_callables(); |
| 495 |
|
if ( empty( $callables ) ) { |
| 496 |
|
return; |
| 497 |
|
} |
| 498 |
|
$callables_check_sum = $this->get_check_sum( $callables ); |
| 499 |
|
if ( $callables_check_sum !== (int) get_option( self::$functions_checksum_option_name ) ) { |
| 500 |
|
do_action( 'jetpack_sync_current_callables', $callables ); |
| 501 |
|
update_option( self::$functions_checksum_option_name, $callables_check_sum ); |
| 502 |
|
} |
| 503 |
|
} |
| 504 |
|
|
| 505 |
|
private function get_all_callables() { |
| 506 |
|
return array_combine( |