@@ 513-528 (lines=16) @@ | ||
510 | * Make sure any site icon added to core can get |
|
511 | * synced back to dotcom, so we can display it there. |
|
512 | */ |
|
513 | function jetpack_sync_core_icon() { |
|
514 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
515 | $url = get_site_icon_url(); |
|
516 | } else { |
|
517 | return; |
|
518 | } |
|
519 | ||
520 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
521 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
522 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
523 | // This is the option that is synced with dotcom |
|
524 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
525 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
526 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
527 | } |
|
528 | } |
|
529 | ||
530 | function jetpack_admin_ajax_tracks_callback() { |
|
531 | // Check for nonce |
@@ 737-752 (lines=16) @@ | ||
734 | return crc32( json_encode( $values ) ); |
|
735 | } |
|
736 | ||
737 | function jetpack_sync_core_icon() { |
|
738 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
739 | $url = get_site_icon_url(); |
|
740 | } else { |
|
741 | return; |
|
742 | } |
|
743 | ||
744 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
745 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
746 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
747 | // This is the option that is synced with dotcom |
|
748 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
749 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
750 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
751 | } |
|
752 | } |
|
753 | ||
754 | function get_sync_queue() { |
|
755 | return $this->sync_queue; |