@@ 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 |
@@ 616-631 (lines=16) @@ | ||
613 | return crc32( json_encode( $values ) ); |
|
614 | } |
|
615 | ||
616 | function jetpack_sync_core_icon() { |
|
617 | if ( function_exists( 'get_site_icon_url' ) ) { |
|
618 | $url = get_site_icon_url(); |
|
619 | } else { |
|
620 | return; |
|
621 | } |
|
622 | ||
623 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); |
|
624 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. |
|
625 | if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { |
|
626 | // This is the option that is synced with dotcom |
|
627 | Jetpack_Options::update_option( 'site_icon_url', $url ); |
|
628 | } else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { |
|
629 | Jetpack_Options::delete_option( 'site_icon_url' ); |
|
630 | } |
|
631 | } |
|
632 | ||
633 | function get_sync_queue() { |
|
634 | return $this->sync_queue; |