Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack
File: functions.photon.php
<?php // phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase
[0] Fix | Delete
/**
[1] Fix | Delete
* Generic functions using the Photon service.
[2] Fix | Delete
*
[3] Fix | Delete
* Some are used outside of the Photon module being active, so intentionally not within the module.
[4] Fix | Delete
* As photon has been moved to the image-cdn package, the functions are now also replaced by their counterparts in Image_CDN_Core in the package.
[5] Fix | Delete
*
[6] Fix | Delete
* @package automattic/jetpack
[7] Fix | Delete
*/
[8] Fix | Delete
[9] Fix | Delete
use Automattic\Jetpack\Image_CDN\Image_CDN;
[10] Fix | Delete
use Automattic\Jetpack\Image_CDN\Image_CDN_Core;
[11] Fix | Delete
[12] Fix | Delete
/**
[13] Fix | Delete
* Generates a Photon URL.
[14] Fix | Delete
*
[15] Fix | Delete
* @see https://developer.wordpress.com/docs/photon/
[16] Fix | Delete
*
[17] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN_Core::cdn_url instead.
[18] Fix | Delete
* @param string $image_url URL to the publicly accessible image you want to manipulate.
[19] Fix | Delete
* @param array|string $args An array of arguments, i.e. array( 'w' => '300', 'resize' => array( 123, 456 ) ), or in string form (w=123&h=456).
[20] Fix | Delete
* @param string|null $scheme URL protocol.
[21] Fix | Delete
* @return string The raw final URL. You should run this through esc_url() before displaying it.
[22] Fix | Delete
*/
[23] Fix | Delete
function jetpack_photon_url( $image_url, $args = array(), $scheme = null ) {
[24] Fix | Delete
return Image_CDN_Core::cdn_url( $image_url, $args, $scheme );
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
/**
[28] Fix | Delete
* Parses WP.com-hosted image args to replicate the crop.
[29] Fix | Delete
*
[30] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN_Core::parse_wpcom_query_args instead.
[31] Fix | Delete
* @param mixed $args Args set during Photon's processing.
[32] Fix | Delete
* @param string $image_url URL of the image.
[33] Fix | Delete
* @return array|string Args for Photon to use for the URL.
[34] Fix | Delete
*/
[35] Fix | Delete
function jetpack_photon_parse_wpcom_query_args( $args, $image_url ) {
[36] Fix | Delete
return Image_CDN_Core::parse_wpcom_query_args( $args, $image_url );
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Sets the scheme for a URL
[41] Fix | Delete
*
[42] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN_Core::cdn_url_scheme instead.
[43] Fix | Delete
* @param string $url URL to set scheme.
[44] Fix | Delete
* @param string $scheme Scheme to use. Accepts http, https, network_path.
[45] Fix | Delete
*
[46] Fix | Delete
* @return string URL.
[47] Fix | Delete
*/
[48] Fix | Delete
function jetpack_photon_url_scheme( $url, $scheme ) {
[49] Fix | Delete
_deprecated_function( __FUNCTION__, 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN_Core::cdn_url_scheme' );
[50] Fix | Delete
return Image_CDN_Core::cdn_url_scheme( $url, $scheme );
[51] Fix | Delete
}
[52] Fix | Delete
[53] Fix | Delete
/**
[54] Fix | Delete
* Check to skip Photon for a known domain that shouldn't be Photonized.
[55] Fix | Delete
*
[56] Fix | Delete
* @deprecated 12.2 Use Automattic\Jetpack\Image_CDN\Image_CDN_Core::banned_domains instead.
[57] Fix | Delete
* @param bool $skip If the image should be skipped by Photon.
[58] Fix | Delete
* @param string $image_url URL of the image.
[59] Fix | Delete
*
[60] Fix | Delete
* @return bool Should the image be skipped by Photon.
[61] Fix | Delete
*/
[62] Fix | Delete
function jetpack_photon_banned_domains( $skip, $image_url ) {
[63] Fix | Delete
_deprecated_function( __FUNCTION__, 'jetpack-12.2', 'Automattic\Jetpack\Image_CDN\Image_CDN_Core::banned_domains' );
[64] Fix | Delete
return Image_CDN_Core::banned_domains( $skip, $image_url );
[65] Fix | Delete
}
[66] Fix | Delete
[67] Fix | Delete
/**
[68] Fix | Delete
* Jetpack Photon - Support Text Widgets.
[69] Fix | Delete
*
[70] Fix | Delete
* @deprecated 12.2
[71] Fix | Delete
* @access public
[72] Fix | Delete
* @param string $content Content from text widget.
[73] Fix | Delete
* @return string
[74] Fix | Delete
*/
[75] Fix | Delete
function jetpack_photon_support_text_widgets( $content ) {
[76] Fix | Delete
_deprecated_function( __FUNCTION__, 'jetpack-12.2' );
[77] Fix | Delete
return Image_CDN::filter_the_content( $content );
[78] Fix | Delete
}
[79] Fix | Delete
[80] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function