Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/3rd-part...
File: bitly.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Fixes issues with the Official Bitly for WordPress
[2] Fix | Delete
* https://wordpress.org/plugins/bitly/
[3] Fix | Delete
*
[4] Fix | Delete
* @package automattic/jetpack
[5] Fix | Delete
*/
[6] Fix | Delete
[7] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[8] Fix | Delete
exit( 0 );
[9] Fix | Delete
}
[10] Fix | Delete
[11] Fix | Delete
if ( isset( $GLOBALS['bitly'] ) ) {
[12] Fix | Delete
if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) {
[13] Fix | Delete
remove_action( 'wp_head', array( $GLOBALS['bitly'], 'og_tags' ) );
[14] Fix | Delete
}
[15] Fix | Delete
add_action( 'wp_head', 'jetpack_bitly_og_tag', 100 );
[16] Fix | Delete
}
[17] Fix | Delete
[18] Fix | Delete
/**
[19] Fix | Delete
* Adds bitly OG tags.
[20] Fix | Delete
*/
[21] Fix | Delete
function jetpack_bitly_og_tag() {
[22] Fix | Delete
if ( has_filter( 'wp_head', 'jetpack_og_tags' ) === false ) {
[23] Fix | Delete
// Add the bitly part again back if we don't have any jetpack_og_tags added.
[24] Fix | Delete
if ( method_exists( $GLOBALS['bitly'], 'og_tags' ) ) {
[25] Fix | Delete
$GLOBALS['bitly']->og_tags();
[26] Fix | Delete
}
[27] Fix | Delete
} elseif (
[28] Fix | Delete
isset( $GLOBALS['posts'] )
[29] Fix | Delete
&& $GLOBALS['posts'][0]->ID > 0
[30] Fix | Delete
&& method_exists( $GLOBALS['bitly'], 'get_bitly_link_for_post_id' )
[31] Fix | Delete
) {
[32] Fix | Delete
printf(
[33] Fix | Delete
"<meta property=\"bitly:url\" content=\"%s\" /> \n",
[34] Fix | Delete
esc_attr( $GLOBALS['bitly']->get_bitly_link_for_post_id( $GLOBALS['posts'][0]->ID ) )
[35] Fix | Delete
);
[36] Fix | Delete
}
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function