Code Duplication    Length = 16-16 lines in 2 locations

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;

class.jetpack.php 1 location

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