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