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

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