Code Duplication    Length = 16-16 lines in 2 locations

class.jetpack.php 1 location

@@ 520-535 (lines=16) @@
517
	 * Make sure any site icon added to core can get
518
	 * synced back to dotcom, so we can display it there.
519
	 */
520
	function jetpack_sync_core_icon() {
521
		if ( function_exists( 'get_site_icon_url' ) ) {
522
			$url = get_site_icon_url();
523
		} else {
524
			return;
525
		}
526
527
		require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' );
528
		// If there's a core icon, maybe update the option.  If not, fall back to Jetpack's.
529
		if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) {
530
			// This is the option that is synced with dotcom
531
			Jetpack_Options::update_option( 'site_icon_url', $url );
532
		} else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) {
533
			Jetpack_Options::delete_option( 'site_icon_url' );
534
		}
535
	}
536
537
	function jetpack_admin_ajax_tracks_callback() {
538
		// Check for nonce

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

@@ 602-617 (lines=16) @@
599
		return crc32( serialize( $values ) );
600
	}
601
602
	function jetpack_sync_core_icon() {
603
		if ( function_exists( 'get_site_icon_url' ) ) {
604
			$url = get_site_icon_url();
605
		} else {
606
			return;
607
		}
608
609
		require_once( JETPACK__PLUGIN_DIR . 'modules/site-icon/site-icon-functions.php' );
610
		// If there's a core icon, maybe update the option.  If not, fall back to Jetpack's.
611
		if ( ! empty( $url ) && $url !== jetpack_site_icon_url() ) {
612
			// This is the option that is synced with dotcom
613
			Jetpack_Options::update_option( 'site_icon_url', $url );
614
		} else if ( empty( $url ) && did_action( 'delete_option_site_icon' ) ) {
615
			Jetpack_Options::delete_option( 'site_icon_url' );
616
		}
617
	}
618
619
	function get_sync_queue() {
620
		return $this->sync_queue;