|
@@ 470-480 (lines=11) @@
|
| 467 |
|
do_action( 'jetpack_full_sync_network_options', true ); |
| 468 |
|
} |
| 469 |
|
|
| 470 |
|
private function maybe_sync_constants() { |
| 471 |
|
$constants = $this->get_all_constants(); |
| 472 |
|
if ( empty( $constants ) ) { |
| 473 |
|
return; |
| 474 |
|
} |
| 475 |
|
$constants_check_sum = $this->get_check_sum( $constants ); |
| 476 |
|
if ( $constants_check_sum !== (int) get_option( self::$constants_checksum_option_name ) ) { |
| 477 |
|
do_action( 'jetpack_sync_current_constants', $constants ); |
| 478 |
|
update_option( self::$constants_checksum_option_name, $constants_check_sum ); |
| 479 |
|
} |
| 480 |
|
} |
| 481 |
|
|
| 482 |
|
private function get_all_constants() { |
| 483 |
|
return array_combine( |
|
@@ 502-512 (lines=11) @@
|
| 499 |
|
$this->maybe_sync_callables(); |
| 500 |
|
} |
| 501 |
|
|
| 502 |
|
private function maybe_sync_callables() { |
| 503 |
|
$callables = $this->get_all_callables(); |
| 504 |
|
if ( empty( $callables ) ) { |
| 505 |
|
return; |
| 506 |
|
} |
| 507 |
|
$callables_check_sum = $this->get_check_sum( $callables ); |
| 508 |
|
if ( $callables_check_sum !== (int) get_option( self::$functions_checksum_option_name ) ) { |
| 509 |
|
do_action( 'jetpack_sync_current_callables', $callables ); |
| 510 |
|
update_option( self::$functions_checksum_option_name, $callables_check_sum ); |
| 511 |
|
} |
| 512 |
|
} |
| 513 |
|
|
| 514 |
|
private function get_all_callables() { |
| 515 |
|
return array_combine( |