|
@@ 537-547 (lines=11) @@
|
| 534 |
|
$this->maybe_sync_constants(); |
| 535 |
|
} |
| 536 |
|
|
| 537 |
|
private function maybe_sync_constants() { |
| 538 |
|
$constants = $this->get_all_constants(); |
| 539 |
|
if ( empty( $constants ) ) { |
| 540 |
|
return; |
| 541 |
|
} |
| 542 |
|
$constants_check_sum = $this->get_check_sum( $constants ); |
| 543 |
|
if ( $constants_check_sum !== (int) get_option( self::$constants_checksum_option_name ) ) { |
| 544 |
|
do_action( 'jetpack_sync_current_constants', $constants ); |
| 545 |
|
update_option( self::$constants_checksum_option_name, $constants_check_sum ); |
| 546 |
|
} |
| 547 |
|
} |
| 548 |
|
|
| 549 |
|
private function get_all_constants() { |
| 550 |
|
return array_combine( |
|
@@ 569-579 (lines=11) @@
|
| 566 |
|
$this->maybe_sync_callables(); |
| 567 |
|
} |
| 568 |
|
|
| 569 |
|
private function maybe_sync_callables() { |
| 570 |
|
$callables = $this->get_all_callables(); |
| 571 |
|
if ( empty( $callables ) ) { |
| 572 |
|
return; |
| 573 |
|
} |
| 574 |
|
$callables_check_sum = $this->get_check_sum( $callables ); |
| 575 |
|
if ( $callables_check_sum !== (int) get_option( self::$functions_checksum_option_name ) ) { |
| 576 |
|
do_action( 'jetpack_sync_current_callables', $callables ); |
| 577 |
|
update_option( self::$functions_checksum_option_name, $callables_check_sum ); |
| 578 |
|
} |
| 579 |
|
} |
| 580 |
|
|
| 581 |
|
private function get_all_callables() { |
| 582 |
|
return array_combine( |