Code Duplication    Length = 16-16 lines in 2 locations

class.jetpack.php 1 location

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

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

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