Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/jetpack/modules
File: module-extras.php
<?php
[0] Fix | Delete
/**
[1] Fix | Delete
* Load module code that is needed even when a module isn't active.
[2] Fix | Delete
* For example, if a module shouldn't be activatable unless certain conditions are met,
[3] Fix | Delete
* the code belongs in this file.
[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
/**
[13] Fix | Delete
* Features available all the time:
[14] Fix | Delete
* - When in offline mode.
[15] Fix | Delete
* - When connected to WordPress.com.
[16] Fix | Delete
*/
[17] Fix | Delete
$tools = array(
[18] Fix | Delete
// Those oEmbed providers are always available.
[19] Fix | Delete
'shortcodes/facebook.php',
[20] Fix | Delete
'shortcodes/others.php',
[21] Fix | Delete
// Theme Tools.
[22] Fix | Delete
'theme-tools.php',
[23] Fix | Delete
'theme-tools/social-links.php',
[24] Fix | Delete
'theme-tools/featured-content.php',
[25] Fix | Delete
'theme-tools/responsive-videos.php',
[26] Fix | Delete
'theme-tools/site-logo.php',
[27] Fix | Delete
'theme-tools/site-breadcrumbs.php',
[28] Fix | Delete
'theme-tools/social-menu.php',
[29] Fix | Delete
'theme-tools/content-options.php',
[30] Fix | Delete
// Needed for VideoPress, so videos keep working in existing posts/pages when the module is deactivated.
[31] Fix | Delete
'videopress/class.videopress-gutenberg.php',
[32] Fix | Delete
);
[33] Fix | Delete
[34] Fix | Delete
// Some features are only available when connected to WordPress.com.
[35] Fix | Delete
$connected_tools = array(
[36] Fix | Delete
'external-media/external-media.php',
[37] Fix | Delete
'plugin-search.php',
[38] Fix | Delete
'scan/scan.php', // Shows Jetpack Scan alerts in the admin bar if threats found.
[39] Fix | Delete
'simple-payments.php',
[40] Fix | Delete
'wpcom-tos/wpcom-tos.php',
[41] Fix | Delete
// These oEmbed providers are available when connected to WordPress.com.
[42] Fix | Delete
// Starting from 2020-10-24, they need an authentication token, and that token is stored on WordPress.com.
[43] Fix | Delete
// More information: https://developers.facebook.com/docs/instagram/oembed/.
[44] Fix | Delete
'shortcodes/instagram.php',
[45] Fix | Delete
// This Twitter oEmbed provider relies on a connection to WordPress.com to proxy the request.
[46] Fix | Delete
'shortcodes/twitter.php',
[47] Fix | Delete
);
[48] Fix | Delete
[49] Fix | Delete
// Add connected features to our existing list if the site is currently connected.
[50] Fix | Delete
if ( Jetpack::is_connection_ready() ) {
[51] Fix | Delete
$tools = array_merge( $tools, $connected_tools );
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
/**
[55] Fix | Delete
* Filter extra tools (not modules) to include.
[56] Fix | Delete
*
[57] Fix | Delete
* @since 2.4.0
[58] Fix | Delete
* @since 5.4.0 can be used in multisite when Jetpack is not connected to WordPress.com and not in offline mode.
[59] Fix | Delete
*
[60] Fix | Delete
* @param array $tools Array of extra tools to include.
[61] Fix | Delete
*/
[62] Fix | Delete
$jetpack_tools_to_include = apply_filters( 'jetpack_tools_to_include', $tools );
[63] Fix | Delete
[64] Fix | Delete
if ( ! empty( $jetpack_tools_to_include ) ) {
[65] Fix | Delete
foreach ( $jetpack_tools_to_include as $tool ) {
[66] Fix | Delete
if ( file_exists( JETPACK__PLUGIN_DIR . '/modules/' . $tool ) ) {
[67] Fix | Delete
require_once JETPACK__PLUGIN_DIR . '/modules/' . $tool;
[68] Fix | Delete
}
[69] Fix | Delete
}
[70] Fix | Delete
}
[71] Fix | Delete
[72] Fix | Delete
/**
[73] Fix | Delete
* Add the "(Jetpack)" suffix to the widget names
[74] Fix | Delete
*
[75] Fix | Delete
* @param string $widget_name Widget name.
[76] Fix | Delete
*/
[77] Fix | Delete
function jetpack_widgets_add_suffix( $widget_name ) {
[78] Fix | Delete
return sprintf(
[79] Fix | Delete
/* Translators: Placeholder is the name of a widget. */
[80] Fix | Delete
__( '%s (Jetpack)', 'jetpack' ),
[81] Fix | Delete
$widget_name
[82] Fix | Delete
);
[83] Fix | Delete
}
[84] Fix | Delete
add_filter( 'jetpack_widget_name', 'jetpack_widgets_add_suffix' );
[85] Fix | Delete
[86] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function