|
@@ 488-498 (lines=11) @@
|
| 485 |
|
$this->maybe_sync_constants(); |
| 486 |
|
} |
| 487 |
|
|
| 488 |
|
private function maybe_sync_constants() { |
| 489 |
|
$constants = $this->get_all_constants(); |
| 490 |
|
if ( empty( $constants ) ) { |
| 491 |
|
return; |
| 492 |
|
} |
| 493 |
|
$constants_check_sum = $this->get_check_sum( $constants ); |
| 494 |
|
if ( $constants_check_sum !== (int) get_option( self::$constants_checksum_option_name ) ) { |
| 495 |
|
do_action( 'jetpack_sync_current_constants', $constants ); |
| 496 |
|
update_option( self::$constants_checksum_option_name, $constants_check_sum ); |
| 497 |
|
} |
| 498 |
|
} |
| 499 |
|
|
| 500 |
|
private function get_all_constants() { |
| 501 |
|
return array_combine( |
|
@@ 520-530 (lines=11) @@
|
| 517 |
|
$this->maybe_sync_callables(); |
| 518 |
|
} |
| 519 |
|
|
| 520 |
|
private function maybe_sync_callables() { |
| 521 |
|
$callables = $this->get_all_callables(); |
| 522 |
|
if ( empty( $callables ) ) { |
| 523 |
|
return; |
| 524 |
|
} |
| 525 |
|
$callables_check_sum = $this->get_check_sum( $callables ); |
| 526 |
|
if ( $callables_check_sum !== (int) get_option( self::$functions_checksum_option_name ) ) { |
| 527 |
|
do_action( 'jetpack_sync_current_callables', $callables ); |
| 528 |
|
update_option( self::$functions_checksum_option_name, $callables_check_sum ); |
| 529 |
|
} |
| 530 |
|
} |
| 531 |
|
|
| 532 |
|
private function get_all_callables() { |
| 533 |
|
return array_combine( |