wordpress/wp-content/themes/basic/themify/themify-builder/classes/class-builder-data-manager.php
/**
	 * Check if site has existing builder data
	 * 
	 * @access public
	 * @return boolean
	 */
Check if site has existing builder data

@access public
@return boolean
Check if site has existing builder data @access public @return boolean
public static function has_existing_builder_data() {
		global $wpdb;
		$sql = "SELECT post_id FROM $wpdb->postmeta WHERE AND meta_key = '" . self::$meta_key . "' LIMIT 1";
		$id = $wpdb->get_var( $sql );
		if(!empty($id)){
		    $sql = "SELECT 1 FROM $wpdb->posts WHERE ID = '".$id."' AND post_status = 'publish' LIMIT 1";
		    $id = $wpdb->get_var( $sql );
		    $id=$id>0;
		}
		else{
		    $id=false;
		}
		return $id;
	}
public static function has_existing_builder_data ( ) { global $ wpdb ; $ sql = " SELECT post_id FROM  $ wpdb -> postmeta  WHERE AND meta_key = ' " . self :: $ meta_key . " ' LIMIT 1 " ; $ id = $ wpdb -> get_var ( $ sql ) ; if ( ! empty ( $ id ) ) { $ sql = " SELECT 1 FROM  $ wpdb -> posts  WHERE ID = ' " . $ id . " ' AND post_status = 'publish' LIMIT 1 " ; $ id = $ wpdb -> get_var ( $ sql ) ; $ id = $ id > 0 ; } else { $ id = false ; } return $ id ; }
Check if site has existing builder data
Check if site has existing builder data