| @@ 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 | |
| @@ 730-745 (lines=16) @@ | ||
| 727 | return crc32( json_encode( $values ) ); | |
| 728 | } | |
| 729 | ||
| 730 | 	function jetpack_sync_core_icon() { | |
| 731 | 		if ( function_exists( 'get_site_icon_url' ) ) { | |
| 732 | $url = get_site_icon_url(); | |
| 733 | 		} else { | |
| 734 | return; | |
| 735 | } | |
| 736 | ||
| 737 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); | |
| 738 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. | |
| 739 | 		if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { | |
| 740 | // This is the option that is synced with dotcom | |
| 741 | Jetpack_Options::update_option( 'site_icon_url', $url ); | |
| 742 | 		} else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { | |
| 743 | Jetpack_Options::delete_option( 'site_icon_url' ); | |
| 744 | } | |
| 745 | } | |
| 746 | ||
| 747 | 	function get_sync_queue() { | |
| 748 | return $this->sync_queue; | |