protected function _get_favicon( $content ) {
		preg_match( '/<link +?rel=["\']shortcut icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si', $content, $reg );
		if ( empty( $reg[1] ) ) {
			preg_match( '/<link +?rel=["\']icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si', $content, $reg );
		}

		if ( empty( $reg[1] ) ) {
			return;
		}

		$favicon = $reg[1];
		$favicon = $this->_relative_path_to_url( $favicon, $content );

		if ( is_ssl() ) {
			$favicon = preg_replace( '|^http:|', 'https:', $favicon );
		}

		$requester = new Requester( $favicon );
		$response  = $requester->request( $favicon );
		if ( is_wp_error( $response ) ) {
			return;
		}

		$status_code = $requester->get_status_code();
		if ( 200 != $status_code && 304 != $status_code ) {
			return;
		}

		return $favicon;
	}
protected function _get_favicon( $content ) {
		preg_match( '/<link +?rel=["\']shortcut icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si', $content, $reg );
		if ( empty( $reg[1] ) ) {
			preg_match( '/<link +?rel=["\']icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si', $content, $reg );
		}

		if ( empty( $reg[1] ) ) {
			return;
		}

		$favicon = $reg[1];
		$favicon = $this->_relative_path_to_url( $favicon, $content );

		if ( is_ssl() ) {
			$favicon = preg_replace( '|^http:|', 'https:', $favicon );
		}

		$requester = new Requester( $favicon );
		$response  = $requester->request( $favicon );
		if ( is_wp_error( $response ) ) {
			return;
		}

		$status_code = $requester->get_status_code();
		if ( 200 != $status_code && 304 != $status_code ) {
			return;
		}

		return $favicon;
	}
protected function _get_favicon ( $ content ) { preg_match ( '/<link +?rel=["\']shortcut icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si' , $ content , $ reg ) ; if ( empty ( $ reg [ 1 ] ) ) { preg_match ( '/<link +?rel=["\']icon["\'][^\/>]*? href=["\']([^"\']+?)["\'][^\/>]*?\/?>/si' , $ content , $ reg ) ; } if ( empty ( $ reg [ 1 ] ) ) { return ; } $ favicon = $ reg [ 1 ] ; $ favicon = $ this -> _relative_path_to_url ( $ favicon , $ content ) ; if ( is_ssl ( ) ) { $ favicon = preg_replace ( '|^http:|' , 'https:' , $ favicon ) ; } $ requester = new Requester ( $ favicon ) ; $ response = $ requester -> request ( $ favicon ) ; if ( is_wp_error ( $ response ) ) { return ; } $ status_code = $ requester -> get_status_code ( ) ; if ( 200 != $ status_code && 304 != $ status_code ) { return ; } return $ favicon ; }
Return favicon of the page you want to blog card

@param string $content
@return string
Return favicon of the page you want to blog card