Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules/shortcod...
File: googleplus.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Google+ embeds
[2] Fix | Delete
* Google+ has shut down. Output the link for history's sake.
[3] Fix | Delete
* Other than that, there's not much we can do.
[4] Fix | Delete
*
[5] Fix | Delete
* @package automattic/jetpack
[6] Fix | Delete
*/
[7] Fix | Delete
[8] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[9] Fix | Delete
exit( 0 );
[10] Fix | Delete
}
[11] Fix | Delete
[12] Fix | Delete
define( 'JETPACK_GOOGLEPLUS_EMBED_REGEX', '#^https?://plus\.(sandbox\.)?google\.com/(u/\d+/)?([^/]+)/posts/([^/]+)$#' );
[13] Fix | Delete
[14] Fix | Delete
/*
[15] Fix | Delete
* Example URL: https://plus.google.com/114986219448604314131/posts/LgHkesWCmJo
[16] Fix | Delete
* Alternate example: https://plus.google.com/u/0/100004581596612508203/posts/2UKwN67MBQs (note the /u/0/)
[17] Fix | Delete
*/
[18] Fix | Delete
wp_embed_register_handler( 'googleplus', JETPACK_GOOGLEPLUS_EMBED_REGEX, 'jetpack_deprecated_embed_handler' );
[19] Fix | Delete
[20] Fix | Delete
add_shortcode( 'googleplus', 'jetpack_googleplus_shortcode_handler' );
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Display the Google+ shortcode.
[24] Fix | Delete
*
[25] Fix | Delete
* @param array $atts Shortcode attributes.
[26] Fix | Delete
*/
[27] Fix | Delete
function jetpack_googleplus_shortcode_handler( $atts ) {
[28] Fix | Delete
global $wp_embed;
[29] Fix | Delete
[30] Fix | Delete
if ( empty( $atts['url'] ) ) {
[31] Fix | Delete
return;
[32] Fix | Delete
}
[33] Fix | Delete
[34] Fix | Delete
if ( ! preg_match( JETPACK_GOOGLEPLUS_EMBED_REGEX, $atts['url'] ) ) {
[35] Fix | Delete
return;
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
return sprintf( '<p>%s</p>', $wp_embed->shortcode( $atts, $atts['url'] ) );
[39] Fix | Delete
}
[40] Fix | Delete
[41] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function