Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/likes
File: jetpack-likes-master-iframe.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Jetpack likes iframe.
[2] Fix | Delete
*
[3] Fix | Delete
* @package jetpack
[4] Fix | Delete
*/
[5] Fix | Delete
[6] Fix | Delete
/**
[7] Fix | Delete
* This function needs to get loaded after the like scripts get added to the page.
[8] Fix | Delete
*/
[9] Fix | Delete
function jetpack_likes_master_iframe() {
[10] Fix | Delete
$version = gmdate( 'Ymd' );
[11] Fix | Delete
[12] Fix | Delete
$_locale = get_locale();
[13] Fix | Delete
[14] Fix | Delete
if ( ! defined( 'JETPACK__GLOTPRESS_LOCALES_PATH' ) || ! file_exists( JETPACK__GLOTPRESS_LOCALES_PATH ) ) {
[15] Fix | Delete
return false;
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
require_once JETPACK__GLOTPRESS_LOCALES_PATH;
[19] Fix | Delete
[20] Fix | Delete
$gp_locale = GP_Locales::by_field( 'wp_locale', $_locale );
[21] Fix | Delete
if ( ! $gp_locale ) {
[22] Fix | Delete
$gp_locale = GP_Locales::by_slug( $_locale );
[23] Fix | Delete
}
[24] Fix | Delete
$_locale = isset( $gp_locale->slug ) ? $gp_locale->slug : '';
[25] Fix | Delete
[26] Fix | Delete
$likes_locale = ( '' === $_locale || 'en' === $_locale ) ? '' : '&amp;lang=' . strtolower( $_locale );
[27] Fix | Delete
[28] Fix | Delete
$src = sprintf( 'https://widgets.wp.com/likes/master.html?ver=%1$s#ver=%1$s%2$s', $version, $likes_locale );
[29] Fix | Delete
[30] Fix | Delete
/**
[31] Fix | Delete
* Filters the Likes iframe src, if any parameters need to be overridden or tracked.
[32] Fix | Delete
*
[33] Fix | Delete
* @module likes
[34] Fix | Delete
*
[35] Fix | Delete
* @since 14.1
[36] Fix | Delete
*
[37] Fix | Delete
* @param string URL to https://widgets.wp.com/ with various arguments appended to the get string and fragment.
[38] Fix | Delete
*/
[39] Fix | Delete
$src = apply_filters( 'jetpack_likes_iframe_src', $src );
[40] Fix | Delete
[41] Fix | Delete
// The span content is replaced by queuehandler when showOtherGravatars is called.
[42] Fix | Delete
$likers_text = wp_kses( '<span>%d</span>', array( 'span' => array() ) );
[43] Fix | Delete
?>
[44] Fix | Delete
<iframe src='<?php echo esc_url( $src ); ?>' scrolling='no' id='likes-master' name='likes-master' style='display:none;'></iframe>
[45] Fix | Delete
<div id='likes-other-gravatars' role="dialog" aria-hidden="true" tabindex="-1"><div class="likes-text"><?php echo $likers_text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div><ul class="wpl-avatars sd-like-gravatars"></ul></div>
[46] Fix | Delete
<?php
[47] Fix | Delete
}
[48] Fix | Delete
[49] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function