| @@ 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 | |
| @@ 762-777 (lines=16) @@ | ||
| 759 | return crc32( json_encode( $values ) ); | |
| 760 | } | |
| 761 | ||
| 762 | 	function jetpack_sync_core_icon() { | |
| 763 | 		if ( function_exists( 'get_site_icon_url' ) ) { | |
| 764 | $url = get_site_icon_url(); | |
| 765 | 		} else { | |
| 766 | return; | |
| 767 | } | |
| 768 | ||
| 769 | require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' ); | |
| 770 | // If there's a core icon, maybe update the option. If not, fall back to Jetpack's. | |
| 771 | 		if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) { | |
| 772 | // This is the option that is synced with dotcom | |
| 773 | Jetpack_Options::update_option( 'site_icon_url', $url ); | |
| 774 | 		} else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) { | |
| 775 | Jetpack_Options::delete_option( 'site_icon_url' ); | |
| 776 | } | |
| 777 | } | |
| 778 | ||
| 779 | 	function get_sync_queue() { | |
| 780 | return $this->sync_queue; | |