@@ 404-414 (lines=11) @@ | ||
401 | $this->maybe_sync_constants(); |
|
402 | } |
|
403 | ||
404 | private function maybe_sync_constants() { |
|
405 | $constants = $this->get_all_constants(); |
|
406 | if ( empty( $constants ) ) { |
|
407 | return; |
|
408 | } |
|
409 | $constants_check_sum = $this->get_check_sum( $constants ); |
|
410 | if ( $constants_check_sum !== get_option( self::$constants_checksum_option_name ) ) { |
|
411 | do_action( 'jetpack_sync_current_constants', $constants ); |
|
412 | update_option( self::$constants_checksum_option_name, $constants_check_sum ); |
|
413 | } |
|
414 | } |
|
415 | ||
416 | private function get_all_constants() { |
|
417 | return array_combine( |
|
@@ 436-447 (lines=12) @@ | ||
433 | $this->maybe_sync_callables(); |
|
434 | } |
|
435 | ||
436 | private function maybe_sync_callables() { |
|
437 | $callables = $this->get_all_callables(); |
|
438 | if ( empty( $callables ) ) { |
|
439 | return; |
|
440 | } |
|
441 | $callables_check_sum = $this->get_check_sum( $callables ); |
|
442 | ||
443 | if ( $callables_check_sum !== get_option( self::$functions_checksum_option_name ) ) { |
|
444 | do_action( 'jetpack_sync_current_callables', $callables ); |
|
445 | update_option( self::$functions_checksum_option_name, $callables_check_sum ); |
|
446 | } |
|
447 | } |
|
448 | ||
449 | private function get_all_callables() { |
|
450 | return array_combine( |