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: cartflows.php
<?php
[0] Fix | Delete
if ( ! defined( 'ABSPATH' ) ) {
[1] Fix | Delete
// Exit if accessed directly.
[2] Fix | Delete
exit;
[3] Fix | Delete
}
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Compatibility for the Cartflows plugin.
[7] Fix | Delete
*
[8] Fix | Delete
* @since 4.0.7
[9] Fix | Delete
*
[10] Fix | Delete
* @link https://wordpress.org/plugins/cartflows/
[11] Fix | Delete
*/
[12] Fix | Delete
class ET_Builder_Plugin_Compat_Cartflows extends ET_Builder_Plugin_Compat_Base {
[13] Fix | Delete
/**
[14] Fix | Delete
* Constructor.
[15] Fix | Delete
*
[16] Fix | Delete
* @since 4.0.7
[17] Fix | Delete
*/
[18] Fix | Delete
public function __construct() {
[19] Fix | Delete
$this->plugin_id = 'cartflows/cartflows.php';
[20] Fix | Delete
$this->init_hooks();
[21] Fix | Delete
}
[22] Fix | Delete
[23] Fix | Delete
/**
[24] Fix | Delete
* Hook methods to WordPress.
[25] Fix | Delete
*
[26] Fix | Delete
* @since 4.0.7
[27] Fix | Delete
*
[28] Fix | Delete
* @return void
[29] Fix | Delete
*/
[30] Fix | Delete
public function init_hooks() {
[31] Fix | Delete
// Bail if there's no version found.
[32] Fix | Delete
if ( ! $this->get_plugin_version() ) {
[33] Fix | Delete
return;
[34] Fix | Delete
}
[35] Fix | Delete
[36] Fix | Delete
add_action( 'wp', array( $this, 'maybe_disable_theme_builder' ), 9 );
[37] Fix | Delete
}
[38] Fix | Delete
[39] Fix | Delete
/**
[40] Fix | Delete
* Disable theme builder for specific Cartflow templates that don't use
[41] Fix | Delete
* the normal WordPress partials (get_header(), get_footer()).
[42] Fix | Delete
*
[43] Fix | Delete
* @since 4.0.7
[44] Fix | Delete
*/
[45] Fix | Delete
public function maybe_disable_theme_builder() {
[46] Fix | Delete
$step_post_type = defined( 'CARTFLOWS_STEP_POST_TYPE' ) ? CARTFLOWS_STEP_POST_TYPE : 'cartflows_step';
[47] Fix | Delete
[48] Fix | Delete
if ( is_singular( $step_post_type ) ) {
[49] Fix | Delete
/**
[50] Fix | Delete
* Filters page templates that should have the Theme Builder disabled.
[51] Fix | Delete
*
[52] Fix | Delete
* @since 4.0.7
[53] Fix | Delete
*
[54] Fix | Delete
* @param string[] $templates
[55] Fix | Delete
*/
[56] Fix | Delete
$disable_for = apply_filters( 'et_builder_compatibility_cartflows_templates_without_theme_builder', array( 'cartflows-default', 'cartflows-canvas' ) );
[57] Fix | Delete
$template = get_post_meta( get_the_ID(), '_wp_page_template', true );
[58] Fix | Delete
[59] Fix | Delete
if ( in_array( $template, $disable_for, true ) ) {
[60] Fix | Delete
add_filter( 'et_theme_builder_template_layouts', array( $this, 'disable_theme_builder' ) );
[61] Fix | Delete
}
[62] Fix | Delete
}
[63] Fix | Delete
}
[64] Fix | Delete
[65] Fix | Delete
/**
[66] Fix | Delete
* Disable theme builder for the current request by returning no layouts for it.
[67] Fix | Delete
*
[68] Fix | Delete
* @since 4.0.7
[69] Fix | Delete
*
[70] Fix | Delete
* @param array $layouts
[71] Fix | Delete
*
[72] Fix | Delete
* @return array
[73] Fix | Delete
*/
[74] Fix | Delete
public function disable_theme_builder( $layouts ) {
[75] Fix | Delete
return array();
[76] Fix | Delete
}
[77] Fix | Delete
}
[78] Fix | Delete
[79] Fix | Delete
new ET_Builder_Plugin_Compat_Cartflows;
[80] Fix | Delete
[81] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function