@@ 610-625 (lines=16) @@ | ||
607 | return crc32( serialize( $values ) ); |
|
608 | } |
|
609 | ||
610 | function jetpack_sync_core_icon() { |
|
611 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
612 | $url = get_site_icon_url(); |
|
613 | } else { |
|
614 | return; |
|
615 | } |
|
616 | ||
617 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
618 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
619 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
620 | // This is the option that is synced with dotcom |
|
621 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
622 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
623 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
624 | } |
|
625 | } |
|
626 | ||
627 | function get_sync_queue() { |
|
628 | return $this->sync_queue; |
@@ 520-535 (lines=16) @@ | ||
517 | * Make sure any site icon added to core can get |
|
518 | * synced back to dotcom, so we can display it there. |
|
519 | */ |
|
520 | function jetpack_sync_core_icon() { |
|
521 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
522 | $url = get_site_icon_url(); |
|
523 | } else { |
|
524 | return; |
|
525 | } |
|
526 | ||
527 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
528 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
529 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
530 | // This is the option that is synced with dotcom |
|
531 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
532 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
533 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
534 | } |
|
535 | } |
|
536 | ||
537 | function jetpack_admin_ajax_tracks_callback() { |
|
538 | // Check for nonce |