@@ 607-622 (lines=16) @@ | ||
604 | * Make sure any site icon added to core can get |
|
605 | * synced back to dotcom, so we can display it there. |
|
606 | */ |
|
607 | function jetpack_sync_core_icon() { |
|
608 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
609 | $url = get_site_icon_url(); |
|
610 | } else { |
|
611 | return; |
|
612 | } |
|
613 | ||
614 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
615 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
616 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
617 | // This is the option that is synced with dotcom |
|
618 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
619 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
620 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
621 | } |
|
622 | } |
|
623 | ||
624 | function jetpack_admin_ajax_tracks_callback() { |
|
625 | // Check for nonce |
@@ 557-572 (lines=16) @@ | ||
554 | return crc32( serialize( $values ) ); |
|
555 | } |
|
556 | ||
557 | function jetpack_sync_core_icon() { |
|
558 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
559 | $url = get_site_icon_url(); |
|
560 | } else { |
|
561 | return; |
|
562 | } |
|
563 | ||
564 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
565 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
566 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
567 | // This is the option that is synced with dotcom |
|
568 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
569 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
570 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
571 | } |
|
572 | } |
|
573 | ||
574 | function get_sync_queue() { |
|
575 | return $this->sync_queue; |