wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-builder.php
/**
	 * Load module partial when update live content
	 */
Load module partial when update live content
Load module partial when update live content
public function load_module_partial_ajaxify() {
	    check_ajax_referer('tb_load_nonce', 'tb_load_nonce');
		themify_disable_other_lazy();
	    $cid = $_POST['tb_cid'];
	    $identifier = array($cid);
		$bid=$cid;
	    self::$frontedit_active = true;
	    if (!empty($_POST['tb_post_id'])) {
		    $bid=Themify_Builder_Component_Base::$post_id =self::$builder_active_id= $_POST['tb_post_id'];
	    }
	    $new_modules = array(
			'mod_name' => $_POST['tb_module_slug'],
			'mod_settings' => json_decode(stripslashes($_POST['tb_module_data']), true)
	    );
	     if(isset($_POST['element_id'])){
			$new_modules['element_id'] = $_POST['element_id'];
	    }
		do_action('themify_builder_load_module_partial',$new_modules);
	    Themify_Builder_Component_Module::template($new_modules, $bid, true, $identifier);
	    $css=Themify_Enqueue_Assets::get_css();
	    if(!empty($css)){
		echo '<script type="text/template" id="tb_module_styles">'.json_encode($css).'</script>';
	    }
	    wp_die();
	}
public function load_module_partial_ajaxify ( ) { check_ajax_referer ( 'tb_load_nonce' , 'tb_load_nonce' ) ; themify_disable_other_lazy ( ) ; $ cid = $ _POST [ 'tb_cid' ] ; $ identifier = array ( $ cid ) ; $ bid = $ cid ; self :: $ frontedit_active = true ; if ( ! empty ( $ _POST [ 'tb_post_id' ] ) ) { $ bid = Themify_Builder_Component_Base :: $ post_id = self :: $ builder_active_id = $ _POST [ 'tb_post_id' ] ; } $ new_modules = array ( 'mod_name' => $ _POST [ 'tb_module_slug' ] , 'mod_settings' => json_decode ( stripslashes ( $ _POST [ 'tb_module_data' ] ) , true ) ) ; if ( isset ( $ _POST [ 'element_id' ] ) ) { $ new_modules [ 'element_id' ] = $ _POST [ 'element_id' ] ; } do_action ( 'themify_builder_load_module_partial' , $ new_modules ) ; Themify_Builder_Component_Module :: template ( $ new_modules , $ bid , true , $ identifier ) ; $ css = Themify_Enqueue_Assets :: get_css ( ) ; if ( ! empty ( $ css ) ) { echo '<script type="text/template" id="tb_module_styles">' . json_encode ( $ css ) . '</script>' ; } wp_die ( ) ; }
Load module partial when update live content
Load module partial when update live content