PK œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
| Dir : /home2/medicu/.trash/cartflows.14/compatibilities/plugins/ |
| Server: Linux tista.bd.svlogins.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 IP: 103.159.37.114 |
| Dir : /home2/medicu/.trash/cartflows.14/compatibilities/plugins/class-cartflows-thrive-compatibility.php |
<?php
/**
* Thrive Visual Editor Compatibility
*
* @package CartFlows
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class for Thrive Visual Editor Compatibility
*/
class Cartflows_Thrive_Compatibility {
/**
* Member Variable
*
* @var instance
*/
private static $instance;
/**
* Initiator
*/
public static function get_instance() {
if ( ! isset( self::$instance ) ) {
self::$instance = new self();
}
return self::$instance;
}
/**
* Constructor
*/
public function __construct() {
// Add CartFlows post type in the thrive page editor.
// tve_landing_page_post_types.
add_filter( 'tve_post_type_can_use_landing_page', array( $this, 'send_post_type_to_thrive' ) );
add_filter( 'tcb_can_use_landing_pages', array( $this, 'display_change_template_option' ) );
add_filter( 'tcb_has_templates_tab', array( $this, 'display_change_template_option' ) );
}
/**
* Return step post type for Thrive Architect.
*
* @since 1.0.0
* @param array $post_type_pt the current step post type.
* @return array $post_type_pt current step post type.
*/
public function send_post_type_to_thrive( $post_type_pt ) {
$post_type_pt[] = CARTFLOWS_STEP_POST_TYPE;
return $post_type_pt;
}
/**
* Return true/false to show change template option.
*
* @since 1.0.0
* @param array $bool true/false.
* @return array $bool true/false.
*/
public function display_change_template_option( $bool ) {
if ( wcf()->utils->is_step_post_type() ) {
$bool = true;
}
return $bool;
}
}
/**
* Kicking this off by calling 'get_instance()' method
*/
Cartflows_Thrive_Compatibility::get_instance();