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