Code Duplication    Length = 16-16 lines in 2 locations

class.jetpack.php 1 location

@@ 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

sync/class.jetpack-sync-client.php 1 location

@@ 710-725 (lines=16) @@
707
		return crc32( json_encode( $values ) );
708
	}
709
710
	function jetpack_sync_core_icon() {
711
		if ( function_exists( 'get_site_icon_url' ) ) {
712
			$url = get_site_icon_url();
713
		} else {
714
			return;
715
		}
716
717
		require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' );
718
		// If there's a core icon, maybe update the option.  If not, fall back to Jetpack's.
719
		if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) {
720
			// This is the option that is synced with dotcom
721
			Jetpack_Options::update_option( 'site_icon_url', $url );
722
		} else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) {
723
			Jetpack_Options::delete_option( 'site_icon_url' );
724
		}
725
	}
726
727
	function get_sync_queue() {
728
		return $this->sync_queue;