wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-themify-builder-stylesheet.php
/**
	* Generate css file on the fly, if builder doesn't have style created an empty file,
	* which will help to detect there is no need to create css file.
	* @return void
	*/
Generate css file on the fly, if builder doesn't have style created an empty file,
which will help to detect there is no need to create css file.
@return void
Generate css file on the fly if builder doesn ' t have style created an empty file which will help to detect there is no need to create css file . @return void
public static function save_builder_css($echo=false){
		check_ajax_referer('tb_load_nonce', 'tb_load_nonce');
		if(!empty($_POST['id'])){
			$id = (int)$_POST['id'];
			$data = !empty($_POST['css'])?json_decode(stripslashes_deep($_POST['css']), true):array();
			$custom_css = !empty( $_POST['custom_css']) ? stripcslashes( $_POST['custom_css'] ) : '';
			if(!is_array($data)){
				$data = array();
			}
			$res = self::write_stylesheet($id, $data,$custom_css);
			if (empty($res['css_file'])) {
				$stylesheet_path = self::get_stylesheet( 'bydir',$id);
				if(!Themify_Filesystem::is_file($stylesheet_path['url']) ){
					Themify_Filesystem::put_contents(self::getTmpPath($stylesheet_path['url']), 'done');
				}
			}
			if($echo===true){
				echo json_encode($res);
			}
		}
	    die;
	}
public static function save_builder_css ( $ echo = false ) { check_ajax_referer ( 'tb_load_nonce' , 'tb_load_nonce' ) ; if ( ! empty ( $ _POST [ 'id' ] ) ) { $ id = ( int ) $ _POST [ 'id' ] ; $ data = ! empty ( $ _POST [ 'css' ] ) ? json_decode ( stripslashes_deep ( $ _POST [ 'css' ] ) , true ) : array ( ) ; $ custom_css = ! empty ( $ _POST [ 'custom_css' ] ) ? stripcslashes ( $ _POST [ 'custom_css' ] ) : '' ; if ( ! is_array ( $ data ) ) { $ data = array ( ) ; } $ res = self :: write_stylesheet ( $ id , $ data , $ custom_css ) ; if ( empty ( $ res [ 'css_file' ] ) ) { $ stylesheet_path = self :: get_stylesheet ( 'bydir' , $ id ) ; if ( ! Themify_Filesystem :: is_file ( $ stylesheet_path [ 'url' ] ) ) { Themify_Filesystem :: put_contents ( self :: getTmpPath ( $ stylesheet_path [ 'url' ] ) , 'done' ) ; } } if ( $ echo === true ) { echo json_encode ( $ res ) ; } } die ; }
Generate css file on the fly, if builder doesn't have style created an empty file,
 which will help to detect there is no need to create css file.
Generate css file on the fly if builder doesn ' t have style created an empty file which will help to detect there is no need to create css file .