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/clone/wp-conte.../themes/Divi/includes/builder/plugin-c...
File: wpml-sticky-links.php
<?php
[0] Fix | Delete
[1] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[2] Fix | Delete
exit; // Exit if accessed directly
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Plugin compatibility for WPML Sticky Links. This plugin needs WPML Multilingual
[7] Fix | Delete
* CMS plugin to work.
[8] Fix | Delete
*
[9] Fix | Delete
* @since 4.4.5
[10] Fix | Delete
*
[11] Fix | Delete
* @link https://wpml.org
[12] Fix | Delete
*/
[13] Fix | Delete
class ET_Builder_Plugin_Compat_WPML_Sticky_Links extends ET_Builder_Plugin_Compat_Base {
[14] Fix | Delete
/**
[15] Fix | Delete
* Constructor
[16] Fix | Delete
*/
[17] Fix | Delete
function __construct() {
[18] Fix | Delete
$this->plugin_id = 'wpml-sticky-links/plugin.php';
[19] Fix | Delete
$this->init_hooks();
[20] Fix | Delete
}
[21] Fix | Delete
[22] Fix | Delete
/**
[23] Fix | Delete
* Hook methods to WordPress
[24] Fix | Delete
*
[25] Fix | Delete
* Latest plugin version: 1.5.1
[26] Fix | Delete
*
[27] Fix | Delete
* @return void
[28] Fix | Delete
*/
[29] Fix | Delete
function init_hooks() {
[30] Fix | Delete
// Bail if there's no version found or no WPML Multilingual CMS plugin active.
[31] Fix | Delete
if ( ! $this->get_plugin_version() || ! defined( 'ICL_PLUGIN_PATH' ) ) {
[32] Fix | Delete
return;
[33] Fix | Delete
}
[34] Fix | Delete
[35] Fix | Delete
add_filter( 'et_pb_module_content', array( $this, 'maybe_show_permalinks' ), 10, 3 );
[36] Fix | Delete
}
[37] Fix | Delete
[38] Fix | Delete
/**
[39] Fix | Delete
* Convert sticky links into permalinks on Global items.
[40] Fix | Delete
*
[41] Fix | Delete
* @since 4.4.5
[42] Fix | Delete
*
[43] Fix | Delete
* @param string $content
[44] Fix | Delete
* @param array $props
[45] Fix | Delete
* @param array $attrs
[46] Fix | Delete
* @return string
[47] Fix | Delete
*/
[48] Fix | Delete
public function maybe_show_permalinks( $content, $props, $attrs ) {
[49] Fix | Delete
$global_module_id = et_()->array_get( $attrs, 'global_module' );
[50] Fix | Delete
if ( empty( $global_module_id ) || ! class_exists( 'WPML_Sticky_Links' ) ) {
[51] Fix | Delete
return $content;
[52] Fix | Delete
}
[53] Fix | Delete
[54] Fix | Delete
$sticky_links = new WPML_Sticky_Links();
[55] Fix | Delete
return $sticky_links->show_permalinks( $content );
[56] Fix | Delete
}
[57] Fix | Delete
}
[58] Fix | Delete
[59] Fix | Delete
new ET_Builder_Plugin_Compat_WPML_Sticky_Links();
[60] Fix | Delete
[61] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function