X7ROOT File Manager
Current Path:
/home/hamdjcne/public_html/wp-content/plugins/hub-core/libs/core-importer
home
/
hamdjcne
/
public_html
/
wp-content
/
plugins
/
hub-core
/
libs
/
core-importer
/
ðŸ“
..
📄
LiquidCore.php
(1.45 KB)
📄
LiquidDownload.php
(4.85 KB)
📄
LiquidImporter.php
(16.34 KB)
📄
LiquidLog.php
(3.3 KB)
📄
LiquidNotices.php
(2.25 KB)
📄
LiquidRedirect.php
(934 B)
📄
LiquidReset.php
(1.17 KB)
📄
LiquidThemeDemoImporter.php
(9.13 KB)
📄
class-msp-importer.php
(28.38 KB)
📄
parsers.php
(22.17 KB)
📄
wordpress-importer.php
(56.36 KB)
Editing: LiquidReset.php
<?php /** * This object handle cleaning the database, It used before the import actions for better importing results. */ class LiquidReset { function __construct( $core ) { $this->core = $core; } public function run() { add_action( 'wp_ajax_liquid_reset_wp', array( $this, 'cleanup'), 10, 1 ); } public function multiple_queries( $db = null, $queries = array() ) { if( !isset( $db ) ) { global $wpdb; $db = $wpdb; } foreach ($queries as $query) { try { $db->query( $db->prepare( $query ) ); if( $db->last_error ) { echo $db->last_error; } } catch ( Exception $e ) { echo $e->getMessage(); } } } public function cleanup() { global $wpdb; $prefix = $wpdb->prefix; try { $wpdb->hide_errors(); $wpdb->query( $wpdb->prepare( "TRUNCATE TABLE {$prefix}posts" //Unfortunately TRUNCATE is not widely supported ) ); if( $wpdb->last_error ) { $queries = array( "DELETE FROM {$prefix}posts", "ALTER TABLE {$prefix}posts AUTO_INCREMENT = 1" ); $this->multiple_queries( $wpdb, $queries ); } } catch( Exception $e ) { echo $e->getMessage(); } wp_die(); //Close the ajax connection and keep going } } ?>
Upload File
Create Folder