Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93
/home/sportsfe.../httpdocs/wp-conte.../plugins/sitepres.../inc
File: plugins-integration.php
<?php
[0] Fix | Delete
[1] Fix | Delete
$action_filter_loader = new WPML_Action_Filter_Loader();
[2] Fix | Delete
$action_filter_loader->load(
[3] Fix | Delete
array(
[4] Fix | Delete
'WPML_Compatibility_Factory',
[5] Fix | Delete
)
[6] Fix | Delete
);
[7] Fix | Delete
[8] Fix | Delete
/**
[9] Fix | Delete
* Determines if we should load compatibility classes for wordpress-seo.
[10] Fix | Delete
*/
[11] Fix | Delete
function wpml_should_load_wpseo_classes() {
[12] Fix | Delete
global $sitepress;
[13] Fix | Delete
[14] Fix | Delete
return $sitepress->get_wp_api()->defined( 'WPSEO_VERSION' )
[15] Fix | Delete
&& version_compare( $sitepress->get_wp_api()->constant( 'WPSEO_VERSION' ), '1.0.3', '>=' )
[16] Fix | Delete
&& ! $sitepress->get_wp_api()->defined( 'WPSEOML_VERSION' );
[17] Fix | Delete
}
[18] Fix | Delete
[19] Fix | Delete
// We have to do this early because wordpress-seo does it early too.
[20] Fix | Delete
if ( wpml_should_load_wpseo_classes() ) {
[21] Fix | Delete
$redirector = new WPML_WPSEO_Redirection_Old();
[22] Fix | Delete
if ( $redirector->is_redirection() ) {
[23] Fix | Delete
add_filter( 'wpml_skip_convert_url_string', '__return_true' );
[24] Fix | Delete
}
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
add_action( 'plugins_loaded', 'wpml_plugins_integration_setup', 10 );
[28] Fix | Delete
[29] Fix | Delete
/**
[30] Fix | Delete
* Loads compatibility classes for active plugins.
[31] Fix | Delete
*/
[32] Fix | Delete
function wpml_plugins_integration_setup() {
[33] Fix | Delete
/** @var WPML_URL_Converter $wpml_url_converter */
[34] Fix | Delete
global $sitepress, $wpml_url_converter, $wpdb, $pagenow;
[35] Fix | Delete
// WPSEO integration.
[36] Fix | Delete
if ( wpml_should_load_wpseo_classes() ) {
[37] Fix | Delete
$wpml_wpseo_xml_sitemap_filters = new WPML_WPSEO_XML_Sitemaps_Filter_Old( $sitepress, $wpml_url_converter );
[38] Fix | Delete
$wpml_wpseo_xml_sitemap_filters->init_hooks();
[39] Fix | Delete
$canonical = new WPML_Canonicals( $sitepress, new WPML_Translation_Element_Factory( $sitepress ) );
[40] Fix | Delete
$wpseo_filters = new WPML_WPSEO_Filters_Old( $canonical );
[41] Fix | Delete
$wpseo_filters->init_hooks();
[42] Fix | Delete
$metabox_hooks = new WPML_WPSEO_Metabox_Hooks_Old( new WPML_Debug_BackTrace(), $wpml_url_converter, $pagenow );
[43] Fix | Delete
$metabox_hooks->add_hooks();
[44] Fix | Delete
[45] Fix | Delete
$categories = new WPML_Compatibility_Wordpress_Seo_Categories_Old();
[46] Fix | Delete
$categories->add_hooks();
[47] Fix | Delete
}
[48] Fix | Delete
// bbPress integration.
[49] Fix | Delete
if ( class_exists( 'bbPress' ) ) {
[50] Fix | Delete
$wpml_bbpress_api = new WPML_BBPress_API();
[51] Fix | Delete
$wpml_bbpress_filters = new WPML_BBPress_Filters( $wpml_bbpress_api );
[52] Fix | Delete
$wpml_bbpress_filters->add_hooks();
[53] Fix | Delete
}
[54] Fix | Delete
[55] Fix | Delete
// NextGen Gallery.
[56] Fix | Delete
if ( defined( 'NEXTGEN_GALLERY_PLUGIN_VERSION' ) ) {
[57] Fix | Delete
// Todo: do not include files: move to autoloaded classes.
[58] Fix | Delete
require_once WPML_PLUGIN_PATH . '/inc/plugin-integration-nextgen.php';
[59] Fix | Delete
}
[60] Fix | Delete
[61] Fix | Delete
// WPBakery Page Builder (a.k.a. Visual Composer).
[62] Fix | Delete
if ( defined( 'WPB_VC_VERSION' ) ) {
[63] Fix | Delete
$wpml_visual_composer = new WPML_Compatibility_Plugin_Visual_Composer( new WPML_Debug_BackTrace( null, 12 ) );
[64] Fix | Delete
$wpml_visual_composer->add_hooks();
[65] Fix | Delete
[66] Fix | Delete
$wpml_visual_composer_grid = new WPML_Compatibility_Plugin_Visual_Composer_Grid_Hooks(
[67] Fix | Delete
$sitepress,
[68] Fix | Delete
new WPML_Translation_Element_Factory( $sitepress )
[69] Fix | Delete
);
[70] Fix | Delete
$wpml_visual_composer_grid->add_hooks();
[71] Fix | Delete
}
[72] Fix | Delete
[73] Fix | Delete
if ( class_exists( 'GoogleSitemapGeneratorLoader' ) ) {
[74] Fix | Delete
$wpml_google_sitemap_generator = new WPML_Google_Sitemap_Generator( $wpdb, $sitepress );
[75] Fix | Delete
$wpml_google_sitemap_generator->init_hooks();
[76] Fix | Delete
}
[77] Fix | Delete
[78] Fix | Delete
if ( defined( 'EP_VERSION' ) ) {
[79] Fix | Delete
$elastic_press_integration = new WPML_Compatibility_ElasticPress(
[80] Fix | Delete
new WPML_Compatibility_ElasticPress_Lang( new WPML_Translation_Element_Factory( $sitepress ), $sitepress )
[81] Fix | Delete
);
[82] Fix | Delete
$elastic_press_integration->register_feature();
[83] Fix | Delete
}
[84] Fix | Delete
[85] Fix | Delete
$factories_to_load = array();
[86] Fix | Delete
[87] Fix | Delete
if ( defined( 'FUSION_BUILDER_VERSION' ) ) {
[88] Fix | Delete
$factories_to_load[] = 'WPML_Compatibility_Plugin_Fusion_Hooks_Factory';
[89] Fix | Delete
}
[90] Fix | Delete
[91] Fix | Delete
if ( class_exists( 'Tiny_Plugin' ) ) {
[92] Fix | Delete
$factories_to_load[] = 'WPML_Compatibility_Tiny_Compress_Images_Factory';
[93] Fix | Delete
}
[94] Fix | Delete
[95] Fix | Delete
// phpcs:disable WordPress.NamingConventions.ValidVariableName
[96] Fix | Delete
global $DISQUSVERSION;
[97] Fix | Delete
if ( $DISQUSVERSION ) {
[98] Fix | Delete
$factories_to_load[] = 'WPML_Compatibility_Disqus_Factory';
[99] Fix | Delete
}
[100] Fix | Delete
// phpcs:enable
[101] Fix | Delete
[102] Fix | Delete
$action_filter_loader = new WPML_Action_Filter_Loader();
[103] Fix | Delete
$action_filter_loader->load( $factories_to_load );
[104] Fix | Delete
}
[105] Fix | Delete
[106] Fix | Delete
add_action( 'after_setup_theme', 'wpml_themes_integration_setup' );
[107] Fix | Delete
[108] Fix | Delete
/**
[109] Fix | Delete
* Loads compatibility classes for active themes.
[110] Fix | Delete
*/
[111] Fix | Delete
function wpml_themes_integration_setup() {
[112] Fix | Delete
[113] Fix | Delete
$actions = [];
[114] Fix | Delete
[115] Fix | Delete
if ( function_exists( 'twentyseventeen_panel_count' ) && ! function_exists( 'twentyseventeen_translate_panel_id' ) ) {
[116] Fix | Delete
$wpml_twentyseventeen = new WPML_Compatibility_2017();
[117] Fix | Delete
$wpml_twentyseventeen->init_hooks();
[118] Fix | Delete
}
[119] Fix | Delete
[120] Fix | Delete
if ( function_exists( 'avia_lang_setup' ) ) {
[121] Fix | Delete
// phpcs:disable WordPress.NamingConventions.ValidVariableName
[122] Fix | Delete
global $iclTranslationManagement;
[123] Fix | Delete
$enfold = new WPML_Compatibility_Theme_Enfold( $iclTranslationManagement );
[124] Fix | Delete
// phpcs:enable
[125] Fix | Delete
$enfold->init_hooks();
[126] Fix | Delete
}
[127] Fix | Delete
[128] Fix | Delete
if ( defined( 'ET_BUILDER_THEME' ) || defined( 'ET_BUILDER_PLUGIN_VERSION' ) ) {
[129] Fix | Delete
$actions[] = WPML_Compatibility_Divi::class;
[130] Fix | Delete
$actions[] = WPML\Compatibility\Divi\ThemeBuilder::class;
[131] Fix | Delete
$actions[] = WPML\Compatibility\Divi\DynamicContent::class;
[132] Fix | Delete
$actions[] = WPML\Compatibility\Divi\Search::class;
[133] Fix | Delete
}
[134] Fix | Delete
[135] Fix | Delete
$action_filter_loader = new WPML_Action_Filter_Loader();
[136] Fix | Delete
$action_filter_loader->load( $actions );
[137] Fix | Delete
}
[138] Fix | Delete
[139] Fix | Delete
[140] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function