Plugin Directory

Changeset 2698910


Ignore:
Timestamp:
03/24/2022 12:08:26 PM (3 years ago)
Author:
soflyy
Message:

1.3.4 Release

Location:
wp-all-export
Files:
10 added
16 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-all-export/tags/1.3.4/libraries/XmlCsvExport.php

    r2654009 r2698910  
    803803            if (!empty($section['content']) and !empty($available_data[$section['content']])) {
    804804                foreach ($available_data[$section['content']] as $field) {
     805                    if(is_string($post['cpt'])) {
     806                        $post['cpt'] = [$post['cpt']];
     807                    }
    805808                    if (is_array($field) and (isset($field['auto']) or (!in_array('product', $post['cpt']) || !\class_exists('WooCommerce')))) {
    806809                        $auto_generate['ids'][] = 1;
  • wp-all-export/tags/1.3.4/readme.txt

    r2681463 r2698910  
    22Contributors: soflyy, wpallimport
    33Requires at least: 5.0
    4 Tested up to: 5.9
    5 Stable tag: 1.3.3
     4Tested up to: 5.9.2
     5Stable tag: 1.3.4
    66Tags: export, wordpress csv export, wordpress xml export, export woocommerce, migrate, export csv from wordpress, export xml from wordpress, advanced xml export, advanced csv export, export data, bulk csv export, export custom post type, export woocommerce products, export woocommerce orders, migrate woocommerce, csv export, export csv, xml export, export xml, csv exporter, datafeed
    77
     
    6060= Automatic Scheduling =
    6161
    62 A new service from Soflyy, Automatic Scheduling provides a simple interface for setting exports to run on a schedule. The service will make sure that your exports start on time and that they successfully complete without the need to set up individual cron jobs. 
     62A new service from Soflyy, Automatic Scheduling provides a simple interface for setting exports to run on a schedule. The service will make sure that your exports start on time and that they successfully complete without the need to set up individual cron jobs.
    6363
    6464It costs $9/mo and can be used with WP All Export and WP All Import. You can set up as many exports and imports on as many sites as you like.
     
    9191
    9292== Changelog ==
     93
     94
     95= 1.3.4 =
     96* improvement: UI updates
     97* bug fix: PHP 8 compatibility
    9398
    9499= 1.3.3 =
  • wp-all-export/tags/1.3.4/src/App/Service/Addons/AddonService.php

    r2615815 r2698910  
    99        return defined('PMUE_EDITION');
    1010    }
    11 
    1211
    1312    public function isWooCommerceAddonActive() {
  • wp-all-export/tags/1.3.4/static/css/admin.css

    r2654009 r2698910  
    44934493.wpallexport-plugin .download-import-templates h2 {
    44944494    margin-bottom: 10px;
    4495 }
     4495}
     4496
     4497
  • wp-all-export/tags/1.3.4/static/js/jquery/jquery.mjs.pmxe_nestedSortable.js

    r1957754 r2698910  
    8787            }
    8888
     89            this.dragDirection = {
     90                vertical: this._getDragVerticalDirection(),
     91                horizontal: this._getDragHorizontalDirection()
     92            };
     93
    8994            //Regenerate the absolute position used for position checks
    9095            this.positionAbs = this._convertPositionTo("absolute");
     
    333338                }
    334339
    335                 id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/));
     340                id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
    336341
    337342                if (depth === sDepth + 1) {
  • wp-all-export/tags/1.3.4/views/admin/export/options/settings.php

    r2654009 r2698910  
    6565                            <p style="text-align:right;">
    6666                                <div class="input">
    67                                     <label for="save_import_as" style="width: 103px;"><?php esc_html_e('Friendly Name:','wp_all_export_plugin');?></label>
    68                                     <input type="text" name="friendly_name" title="<?php esc_html_e('Save friendly name...', 'pmxi_plugin') ?>" style="vertical-align:middle; background:#fff !important;" value="<?php echo wp_all_export_clear_xss(esc_attr($post['friendly_name'])); ?>" />
     67                                    <label for="save_import_as" style="width: 103px;"><?php esc_html_e('Export Name:','wp_all_export_plugin');?></label>
     68                                    <input type="text" name="friendly_name" title="<?php esc_html_e('Save Export Name...', 'pmxi_plugin') ?>" style="vertical-align:middle; background:#fff !important; width: 350px;" value="<?php echo wp_all_export_clear_xss(esc_attr($post['friendly_name'])); ?>" />
    6969                                </div>
    7070                            </p>
  • wp-all-export/tags/1.3.4/views/admin/manage/index.php

    r2654009 r2698910  
    298298                                            }
    299299
    300                                             // if ($is_re_import_allowed and wp_all_export_is_compatible() and ! empty($item['options']['import_id'])){                                             
    301                                             //  $import = new PMXI_Import_Record();
    302                                             //  $import->getById($item['options']['import_id']);
    303                                             //  if ($import->isEmpty() or $import->parent_import_id == 0){
    304                                             //      $item['options']['import_id'] = 0;
    305                                             //  }                                               
    306                                             // }                                           
    307300                                        }       
    308301
  • wp-all-export/tags/1.3.4/wp-all-export.php

    r2654009 r2698910  
    44Plugin URI: http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=export-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
    55Description: Export any post type to a CSV or XML file. Edit the exported data, and then re-import it later using WP All Import.
    6 Version: 1.3.3
     6Version: 1.3.4
    77Author: Soflyy
    88*/
     
    3434
    3535    function pmxe_notice(){
    36        
     36
    3737        ?>
    3838        <div class="error">
     
    4141            </p>
    4242        </div>
    43         <?php               
     43        <?php
    4444
    4545        deactivate_plugins( str_replace('\\', '/', dirname(__FILE__)) . '/wp-all-export.php');
     
    4747    }
    4848
    49     add_action('admin_notices', 'pmxe_notice'); 
     49    add_action('admin_notices', 'pmxe_notice');
    5050
    5151}
     
    6060    define('PMXE_PREFIX', 'pmxe_');
    6161
    62     define('PMXE_VERSION', '1.3.3');
     62    define('PMXE_VERSION', '1.3.4');
    6363
    6464    define('PMXE_ASSETS_VERSION', '-1.0.2');
     
    7070     * @var string
    7171     */
    72     define('WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY', 'wpallexport'); 
     72    define('WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY', 'wpallexport');
    7373    /**
    7474     * Plugin uploads folder name
     
    8181     * @var string
    8282     */
    83     define('WP_ALL_EXPORT_TEMP_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'temp');   
     83    define('WP_ALL_EXPORT_TEMP_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'temp');
    8484
    8585    /**
     
    8787     * @var string
    8888     */
    89     define('WP_ALL_EXPORT_CRON_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'exports'); 
     89    define('WP_ALL_EXPORT_CRON_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'exports');
    9090
    9191    /**
     
    132132         * @var int
    133133         */
    134         const LARGE_SIZE = 0; // all files will importing in large import mode 
     134        const LARGE_SIZE = 0; // all files will importing in large import mode
    135135
    136136        /**
     
    191191
    192192            $this->addons = new \Wpae\App\Service\Addons\AddonService();
    193            
     193
    194194            // init plugin options
    195195            $option_name = get_class($this) . '_Options';
     
    241241            add_action('admin_init', array($this, 'fix_db_schema'), 10);
    242242            add_action('init', array($this, 'init'), 10);
    243 
    244243        }
    245244
     
    324323        public function getTablePrefix() {
    325324            global $wpdb;
    326            
     325
    327326            //return ($this->isNetwork() ? $wpdb->base_prefix : $wpdb->prefix) . self::PREFIX;
    328327            return $wpdb->prefix . self::PREFIX;
     
    368367            $addons_not_included = get_option('wp_all_export_free_addons_not_included',false);
    369368
    370 
    371369            if ( !get_option('wp_all_export_free_addons_not_included',false) && current_user_can( 'manage_options' ) && (!XmlExportEngine::get_addons_service()->isAcfAddonActive() || !XmlExportEngine::get_addons_service()->isWooCommerceAddonActive())){
    372370
     
    387385            $uploads = wp_upload_dir();
    388386
    389             $wpallimportDirs = array( WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY, self::TEMP_DIRECTORY, self::UPLOADS_DIRECTORY, self::CRON_DIRECTORY);           
     387            $wpallimportDirs = array( WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY, self::TEMP_DIRECTORY, self::UPLOADS_DIRECTORY, self::CRON_DIRECTORY);
    390388
    391389            foreach ($wpallimportDirs as $destination) {
    392390
    393391                $dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . $destination;
    394                
    395                 if ( !is_dir($dir)) wp_mkdir_p($dir);           
    396 
    397                 if ( ! @file_exists($dir . DIRECTORY_SEPARATOR . 'index.php') ) @touch( $dir . DIRECTORY_SEPARATOR . 'index.php' );                     
    398                
     392
     393                if ( !is_dir($dir)) wp_mkdir_p($dir);
     394
     395                if ( ! @file_exists($dir . DIRECTORY_SEPARATOR . 'index.php') ) @touch( $dir . DIRECTORY_SEPARATOR . 'index.php' );
     396
    399397            }
    400398
     
    421419            }
    422420
    423             self::$session = new PMXE_Handler();                       
     421            self::$session = new PMXE_Handler();
    424422
    425423            $input = new PMXE_Input();
    426             $page = strtolower($input->getpost('page', ''));                       
     424            $page = strtolower($input->getpost('page', ''));
    427425
    428426            if (preg_match('%^' . preg_quote(str_replace('_', '-', self::PREFIX), '%') . '([\w-]+)$%', $page)) {
    429                 //$this->adminDispatcher($page, strtolower($input->getpost('action', 'index')));
    430427
    431428                $action = strtolower($input->getpost('action', 'index'));
    432429
    433                 // capitalize prefix and first letters of class name parts 
     430                // capitalize prefix and first letters of class name parts
    434431                $controllerName = preg_replace_callback('%(^' . preg_quote(self::PREFIX, '%') . '|_).%', array($this, "replace_callback"),str_replace('-', '_', $page));
    435432                $actionName = str_replace('-', '_', $action);
     
    438435                    if ( ! get_current_user_id() or ! current_user_can(self::$capabilities)) {
    439436                        // This nonce is not valid.
    440                         die( 'Security check' ); 
     437                        die( 'Security check' );
    441438
    442439                    } else {
    443                        
     440
    444441                        $this->_admin_current_screen = (object)array(
    445442                            'id' => $controllerName,
     
    462459                        }
    463460
     461                        $reviewsUI = new \Wpae\Reviews\ReviewsUI();
     462
     463                        add_action('admin_notices', [$reviewsUI, 'render']);
     464
    464465                            if($controller instanceof PMXE_Admin_Manage && ($action == 'update' || $action == 'template' || $action == 'options') && isset($_GET['id'])) {
    465466                                $addons = new \Wpae\App\Service\Addons\AddonService();
     
    499500                                            ( in_array( 'product', $cpt ) && \class_exists('WooCommerce') && ! XmlExportEngine::get_addons_service()->isWooCommerceProductAddonActive() ) ||
    500501                                            ( in_array( 'shop_order', $cpt ) && ! XmlExportEngine::get_addons_service()->isWooCommerceOrderAddonActive() ) ||
    501                                             in_array( 'shop_review', $cpt ) || 
    502                                             in_array( 'shop_coupon', $cpt ) 
    503                                         ) && ! $addons->isWooCommerceAddonActive() 
     502                                            in_array( 'shop_review', $cpt ) ||
     503                                            in_array( 'shop_coupon', $cpt )
     504                                        ) && ! $addons->isWooCommerceAddonActive()
    504505                                    ) ||
    505506                                    ( $export->options['export_type'] == 'advanced' && $export->options['wp_query_selector'] == 'wp_user_query' && ! $addons->isUserAddonActive() )
     
    514515
    515516
    516                         if ($this->_admin_current_screen->is_ajax) { // ajax request                       
     517                        if ($this->_admin_current_screen->is_ajax) { // ajax request
    517518                            $controller->$action();
    518519                            do_action('wpallexport_action_after');
    519520                            die(); // stop processing since we want to output only what controller is randered, nothing in addition
    520                         } elseif ( ! $controller->isInline) {                                                                                                                                       
     521                        } elseif ( ! $controller->isInline) {
    521522                            @ob_start();
    522523                            $controller->$action();
    523                             self::$buffer = @ob_get_clean();                                                   
     524                            self::$buffer = @ob_get_clean();
    524525                        } else {
    525526                            self::$buffer_callback = array($controller, $action);
     
    567568         */
    568569        public function adminDispatcher($page = '', $action = 'index') {
    569             if ('' === $page) {             
     570            if ('' === $page) {
    570571                if ( ! is_null(self::$buffer)) {
    571572                    echo '<div class="wrap">';
     
    582583                    throw new Exception('There is no previousely buffered content to display.');
    583584                }
    584             } 
     585            }
    585586        }
    586587
     
    674675         */
    675676        public function getOption($option = NULL) {
    676             $options = apply_filters('wp_all_export_config_options', $this->options);           
     677            $options = apply_filters('wp_all_export_config_options', $this->options);
    677678            if (is_null($option)) {
    678679                return $options;
     
    722723
    723724            if (function_exists('is_multisite') && is_multisite()) {
    724                 // check if it is a network activation - if so, run the activation function for each blog id           
     725                // check if it is a network activation - if so, run the activation function for each blog id
    725726                if (isset($_GET['networkwide']) && ($_GET['networkwide'] == 1)) {
    726727                    $old_blog = $wpdb->blogid;
     
    730731                        switch_to_blog($blog_id);
    731732                        require self::ROOT_DIR . '/schema.php';
    732                         dbDelta($plugin_queries);                   
     733                        dbDelta($plugin_queries);
    733734                    }
    734735                    switch_to_blog($old_blog);
    735                     return;         
    736                 }           
     736                    return;
     737                }
    737738            }
    738739
    739             dbDelta($plugin_queries);       
     740            dbDelta($plugin_queries);
    740741
    741742        }
     
    750751         */
    751752        public function load_plugin_textdomain() {
    752            
    753             $locale = apply_filters( 'plugin_locale', get_locale(), 'wp_all_export_plugin' );                           
    754            
     753
     754            $locale = apply_filters( 'plugin_locale', get_locale(), 'wp_all_export_plugin' );
     755
    755756            load_plugin_textdomain( 'wp_all_export_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
    756         }   
     757        }
    757758
    758759        public function fix_db_schema(){
     
    807808            $iteration = false;
    808809            $parent_id = false;
    809             $export_post_type = false;         
    810 
    811             // Check if field exists
     810            $export_post_type = false;
     811            $created_at = false;
     812           
     813            // Check if field exists
    812814            foreach ($tablefields as $tablefield) {
    813815                if ('iteration' == $tablefield->Field) $iteration = true;
    814816                if ('parent_id' == $tablefield->Field) $parent_id = true;
    815817                if ('export_post_type' == $tablefield->Field) $export_post_type = true;
    816             }
    817 
    818             if ( ! $iteration ){               
     818                if ('created_at' == $tablefield->Field) $created_at = true;
     819            }
     820
     821            if ( ! $iteration ){
    819822                $wpdb->query("ALTER TABLE {$table} ADD `iteration` BIGINT(20) NOT NULL DEFAULT 0;");
    820823            }
    821             if ( ! $parent_id ){               
     824            if ( ! $parent_id ){
    822825                $wpdb->query("ALTER TABLE {$table} ADD `parent_id` BIGINT(20) NOT NULL DEFAULT 0;");
    823826            }
    824             if ( ! $export_post_type ){             
     827            if ( ! $export_post_type ){
    825828                $wpdb->query("ALTER TABLE {$table} ADD `export_post_type` TEXT NOT NULL DEFAULT '';");
    826829            }
     830            if ( ! $created_at ){
     831                $wpdb->query("ALTER TABLE {$table} ADD `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;");
     832                $wpdb->query("UPDATE {$table} SET `created_at` = `registered_on` WHERE 1");
     833            }
    827834
    828835            update_option( "wp_all_export_free_db_version", PMXE_VERSION );
     
    883890        public static function get_default_import_options() {
    884891            return array(
    885                 'cpt' => array(),   
     892                'cpt' => array(),
    886893                'whereclause' => '',
    887894                'joinclause' => '',
     
    890897                'order_item_per_row' => 1,
    891898                'order_item_fill_empty_columns' => 1,
    892                 'filepath' => '',               
     899                'filepath' => '',
    893900                'current_filepath' => '',
    894901                'bundlepath' => '',
    895902                'export_type' => 'specific',
    896                 'wp_query' => '',   
     903                'wp_query' => '',
    897904                'wp_query_selector' => 'wp_query',
    898905                'is_user_export' => false,
    899906                'is_comment_export' => false,
    900                 'export_to' => 'csv',   
     907                'export_to' => 'csv',
    901908                'export_to_sheet' => 'csv',
    902909                'delimiter' => ',',
    903910                'encoding' => 'UTF-8',
    904                 'is_generate_templates' => 1,               
    905                 'is_generate_import' => 1,             
    906                 'import_id' => 0,                                   
    907                 'template_name' => '',             
     911                'is_generate_templates' => 1,
     912                'is_generate_import' => 1,
     913                'import_id' => 0,
     914                'template_name' => '',
    908915                'is_scheduled' => 0,
    909                 'scheduled_period' => '',               
     916                'scheduled_period' => '',
    910917                'scheduled_email' => '',
    911918                'cc_label' => array(),
     
    915922                'cc_php' => array(),
    916923                'cc_code' => array(),
    917                 'cc_sql' => array(),               
     924                'cc_sql' => array(),
    918925                'cc_options' => array(),
    919926                'cc_settings' => array(),
     
    947954                'custom_xml_template_header' => '',
    948955                'custom_xml_template_loop' => '',
    949                 'custom_xml_template_footer' => '',             
     956                'custom_xml_template_footer' => '',
    950957                'custom_xml_template_options' => array(),
    951958                'custom_xml_cdata_logic' => 'auto',
     
    967974
    968975            );
    969         }       
     976        }
    970977
    971978        public static function is_ajax(){
  • wp-all-export/trunk/libraries/XmlCsvExport.php

    r2654009 r2698910  
    803803            if (!empty($section['content']) and !empty($available_data[$section['content']])) {
    804804                foreach ($available_data[$section['content']] as $field) {
     805                    if(is_string($post['cpt'])) {
     806                        $post['cpt'] = [$post['cpt']];
     807                    }
    805808                    if (is_array($field) and (isset($field['auto']) or (!in_array('product', $post['cpt']) || !\class_exists('WooCommerce')))) {
    806809                        $auto_generate['ids'][] = 1;
  • wp-all-export/trunk/readme.txt

    r2681463 r2698910  
    22Contributors: soflyy, wpallimport
    33Requires at least: 5.0
    4 Tested up to: 5.9
    5 Stable tag: 1.3.3
     4Tested up to: 5.9.2
     5Stable tag: 1.3.4
    66Tags: export, wordpress csv export, wordpress xml export, export woocommerce, migrate, export csv from wordpress, export xml from wordpress, advanced xml export, advanced csv export, export data, bulk csv export, export custom post type, export woocommerce products, export woocommerce orders, migrate woocommerce, csv export, export csv, xml export, export xml, csv exporter, datafeed
    77
     
    6060= Automatic Scheduling =
    6161
    62 A new service from Soflyy, Automatic Scheduling provides a simple interface for setting exports to run on a schedule. The service will make sure that your exports start on time and that they successfully complete without the need to set up individual cron jobs. 
     62A new service from Soflyy, Automatic Scheduling provides a simple interface for setting exports to run on a schedule. The service will make sure that your exports start on time and that they successfully complete without the need to set up individual cron jobs.
    6363
    6464It costs $9/mo and can be used with WP All Export and WP All Import. You can set up as many exports and imports on as many sites as you like.
     
    9191
    9292== Changelog ==
     93
     94
     95= 1.3.4 =
     96* improvement: UI updates
     97* bug fix: PHP 8 compatibility
    9398
    9499= 1.3.3 =
  • wp-all-export/trunk/src/App/Service/Addons/AddonService.php

    r2615815 r2698910  
    99        return defined('PMUE_EDITION');
    1010    }
    11 
    1211
    1312    public function isWooCommerceAddonActive() {
  • wp-all-export/trunk/static/css/admin.css

    r2654009 r2698910  
    44934493.wpallexport-plugin .download-import-templates h2 {
    44944494    margin-bottom: 10px;
    4495 }
     4495}
     4496
     4497
  • wp-all-export/trunk/static/js/jquery/jquery.mjs.pmxe_nestedSortable.js

    r1957754 r2698910  
    8787            }
    8888
     89            this.dragDirection = {
     90                vertical: this._getDragVerticalDirection(),
     91                horizontal: this._getDragHorizontalDirection()
     92            };
     93
    8994            //Regenerate the absolute position used for position checks
    9095            this.positionAbs = this._convertPositionTo("absolute");
     
    333338                }
    334339
    335                 id = ($(item).attr(o.attribute || 'id')).match(o.expression || (/(.+)[-=_](.+)/));
     340                id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
    336341
    337342                if (depth === sDepth + 1) {
  • wp-all-export/trunk/views/admin/export/options/settings.php

    r2654009 r2698910  
    6565                            <p style="text-align:right;">
    6666                                <div class="input">
    67                                     <label for="save_import_as" style="width: 103px;"><?php esc_html_e('Friendly Name:','wp_all_export_plugin');?></label>
    68                                     <input type="text" name="friendly_name" title="<?php esc_html_e('Save friendly name...', 'pmxi_plugin') ?>" style="vertical-align:middle; background:#fff !important;" value="<?php echo wp_all_export_clear_xss(esc_attr($post['friendly_name'])); ?>" />
     67                                    <label for="save_import_as" style="width: 103px;"><?php esc_html_e('Export Name:','wp_all_export_plugin');?></label>
     68                                    <input type="text" name="friendly_name" title="<?php esc_html_e('Save Export Name...', 'pmxi_plugin') ?>" style="vertical-align:middle; background:#fff !important; width: 350px;" value="<?php echo wp_all_export_clear_xss(esc_attr($post['friendly_name'])); ?>" />
    6969                                </div>
    7070                            </p>
  • wp-all-export/trunk/views/admin/manage/index.php

    r2654009 r2698910  
    298298                                            }
    299299
    300                                             // if ($is_re_import_allowed and wp_all_export_is_compatible() and ! empty($item['options']['import_id'])){                                             
    301                                             //  $import = new PMXI_Import_Record();
    302                                             //  $import->getById($item['options']['import_id']);
    303                                             //  if ($import->isEmpty() or $import->parent_import_id == 0){
    304                                             //      $item['options']['import_id'] = 0;
    305                                             //  }                                               
    306                                             // }                                           
    307300                                        }       
    308301
  • wp-all-export/trunk/wp-all-export.php

    r2654009 r2698910  
    44Plugin URI: http://www.wpallimport.com/upgrade-to-wp-all-export-pro/?utm_source=export-plugin-free&utm_medium=wp-plugins-page&utm_campaign=upgrade-to-pro
    55Description: Export any post type to a CSV or XML file. Edit the exported data, and then re-import it later using WP All Import.
    6 Version: 1.3.3
     6Version: 1.3.4
    77Author: Soflyy
    88*/
     
    3434
    3535    function pmxe_notice(){
    36        
     36
    3737        ?>
    3838        <div class="error">
     
    4141            </p>
    4242        </div>
    43         <?php               
     43        <?php
    4444
    4545        deactivate_plugins( str_replace('\\', '/', dirname(__FILE__)) . '/wp-all-export.php');
     
    4747    }
    4848
    49     add_action('admin_notices', 'pmxe_notice'); 
     49    add_action('admin_notices', 'pmxe_notice');
    5050
    5151}
     
    6060    define('PMXE_PREFIX', 'pmxe_');
    6161
    62     define('PMXE_VERSION', '1.3.3');
     62    define('PMXE_VERSION', '1.3.4');
    6363
    6464    define('PMXE_ASSETS_VERSION', '-1.0.2');
     
    7070     * @var string
    7171     */
    72     define('WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY', 'wpallexport'); 
     72    define('WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY', 'wpallexport');
    7373    /**
    7474     * Plugin uploads folder name
     
    8181     * @var string
    8282     */
    83     define('WP_ALL_EXPORT_TEMP_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'temp');   
     83    define('WP_ALL_EXPORT_TEMP_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'temp');
    8484
    8585    /**
     
    8787     * @var string
    8888     */
    89     define('WP_ALL_EXPORT_CRON_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'exports'); 
     89    define('WP_ALL_EXPORT_CRON_DIRECTORY', WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY . DIRECTORY_SEPARATOR . 'exports');
    9090
    9191    /**
     
    132132         * @var int
    133133         */
    134         const LARGE_SIZE = 0; // all files will importing in large import mode 
     134        const LARGE_SIZE = 0; // all files will importing in large import mode
    135135
    136136        /**
     
    191191
    192192            $this->addons = new \Wpae\App\Service\Addons\AddonService();
    193            
     193
    194194            // init plugin options
    195195            $option_name = get_class($this) . '_Options';
     
    241241            add_action('admin_init', array($this, 'fix_db_schema'), 10);
    242242            add_action('init', array($this, 'init'), 10);
    243 
    244243        }
    245244
     
    324323        public function getTablePrefix() {
    325324            global $wpdb;
    326            
     325
    327326            //return ($this->isNetwork() ? $wpdb->base_prefix : $wpdb->prefix) . self::PREFIX;
    328327            return $wpdb->prefix . self::PREFIX;
     
    368367            $addons_not_included = get_option('wp_all_export_free_addons_not_included',false);
    369368
    370 
    371369            if ( !get_option('wp_all_export_free_addons_not_included',false) && current_user_can( 'manage_options' ) && (!XmlExportEngine::get_addons_service()->isAcfAddonActive() || !XmlExportEngine::get_addons_service()->isWooCommerceAddonActive())){
    372370
     
    387385            $uploads = wp_upload_dir();
    388386
    389             $wpallimportDirs = array( WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY, self::TEMP_DIRECTORY, self::UPLOADS_DIRECTORY, self::CRON_DIRECTORY);           
     387            $wpallimportDirs = array( WP_ALL_EXPORT_UPLOADS_BASE_DIRECTORY, self::TEMP_DIRECTORY, self::UPLOADS_DIRECTORY, self::CRON_DIRECTORY);
    390388
    391389            foreach ($wpallimportDirs as $destination) {
    392390
    393391                $dir = $uploads['basedir'] . DIRECTORY_SEPARATOR . $destination;
    394                
    395                 if ( !is_dir($dir)) wp_mkdir_p($dir);           
    396 
    397                 if ( ! @file_exists($dir . DIRECTORY_SEPARATOR . 'index.php') ) @touch( $dir . DIRECTORY_SEPARATOR . 'index.php' );                     
    398                
     392
     393                if ( !is_dir($dir)) wp_mkdir_p($dir);
     394
     395                if ( ! @file_exists($dir . DIRECTORY_SEPARATOR . 'index.php') ) @touch( $dir . DIRECTORY_SEPARATOR . 'index.php' );
     396
    399397            }
    400398
     
    421419            }
    422420
    423             self::$session = new PMXE_Handler();                       
     421            self::$session = new PMXE_Handler();
    424422
    425423            $input = new PMXE_Input();
    426             $page = strtolower($input->getpost('page', ''));                       
     424            $page = strtolower($input->getpost('page', ''));
    427425
    428426            if (preg_match('%^' . preg_quote(str_replace('_', '-', self::PREFIX), '%') . '([\w-]+)$%', $page)) {
    429                 //$this->adminDispatcher($page, strtolower($input->getpost('action', 'index')));
    430427
    431428                $action = strtolower($input->getpost('action', 'index'));
    432429
    433                 // capitalize prefix and first letters of class name parts 
     430                // capitalize prefix and first letters of class name parts
    434431                $controllerName = preg_replace_callback('%(^' . preg_quote(self::PREFIX, '%') . '|_).%', array($this, "replace_callback"),str_replace('-', '_', $page));
    435432                $actionName = str_replace('-', '_', $action);
     
    438435                    if ( ! get_current_user_id() or ! current_user_can(self::$capabilities)) {
    439436                        // This nonce is not valid.
    440                         die( 'Security check' ); 
     437                        die( 'Security check' );
    441438
    442439                    } else {
    443                        
     440
    444441                        $this->_admin_current_screen = (object)array(
    445442                            'id' => $controllerName,
     
    462459                        }
    463460
     461                        $reviewsUI = new \Wpae\Reviews\ReviewsUI();
     462
     463                        add_action('admin_notices', [$reviewsUI, 'render']);
     464
    464465                            if($controller instanceof PMXE_Admin_Manage && ($action == 'update' || $action == 'template' || $action == 'options') && isset($_GET['id'])) {
    465466                                $addons = new \Wpae\App\Service\Addons\AddonService();
     
    499500                                            ( in_array( 'product', $cpt ) && \class_exists('WooCommerce') && ! XmlExportEngine::get_addons_service()->isWooCommerceProductAddonActive() ) ||
    500501                                            ( in_array( 'shop_order', $cpt ) && ! XmlExportEngine::get_addons_service()->isWooCommerceOrderAddonActive() ) ||
    501                                             in_array( 'shop_review', $cpt ) || 
    502                                             in_array( 'shop_coupon', $cpt ) 
    503                                         ) && ! $addons->isWooCommerceAddonActive() 
     502                                            in_array( 'shop_review', $cpt ) ||
     503                                            in_array( 'shop_coupon', $cpt )
     504                                        ) && ! $addons->isWooCommerceAddonActive()
    504505                                    ) ||
    505506                                    ( $export->options['export_type'] == 'advanced' && $export->options['wp_query_selector'] == 'wp_user_query' && ! $addons->isUserAddonActive() )
     
    514515
    515516
    516                         if ($this->_admin_current_screen->is_ajax) { // ajax request                       
     517                        if ($this->_admin_current_screen->is_ajax) { // ajax request
    517518                            $controller->$action();
    518519                            do_action('wpallexport_action_after');
    519520                            die(); // stop processing since we want to output only what controller is randered, nothing in addition
    520                         } elseif ( ! $controller->isInline) {                                                                                                                                       
     521                        } elseif ( ! $controller->isInline) {
    521522                            @ob_start();
    522523                            $controller->$action();
    523                             self::$buffer = @ob_get_clean();                                                   
     524                            self::$buffer = @ob_get_clean();
    524525                        } else {
    525526                            self::$buffer_callback = array($controller, $action);
     
    567568         */
    568569        public function adminDispatcher($page = '', $action = 'index') {
    569             if ('' === $page) {             
     570            if ('' === $page) {
    570571                if ( ! is_null(self::$buffer)) {
    571572                    echo '<div class="wrap">';
     
    582583                    throw new Exception('There is no previousely buffered content to display.');
    583584                }
    584             } 
     585            }
    585586        }
    586587
     
    674675         */
    675676        public function getOption($option = NULL) {
    676             $options = apply_filters('wp_all_export_config_options', $this->options);           
     677            $options = apply_filters('wp_all_export_config_options', $this->options);
    677678            if (is_null($option)) {
    678679                return $options;
     
    722723
    723724            if (function_exists('is_multisite') && is_multisite()) {
    724                 // check if it is a network activation - if so, run the activation function for each blog id           
     725                // check if it is a network activation - if so, run the activation function for each blog id
    725726                if (isset($_GET['networkwide']) && ($_GET['networkwide'] == 1)) {
    726727                    $old_blog = $wpdb->blogid;
     
    730731                        switch_to_blog($blog_id);
    731732                        require self::ROOT_DIR . '/schema.php';
    732                         dbDelta($plugin_queries);                   
     733                        dbDelta($plugin_queries);
    733734                    }
    734735                    switch_to_blog($old_blog);
    735                     return;         
    736                 }           
     736                    return;
     737                }
    737738            }
    738739
    739             dbDelta($plugin_queries);       
     740            dbDelta($plugin_queries);
    740741
    741742        }
     
    750751         */
    751752        public function load_plugin_textdomain() {
    752            
    753             $locale = apply_filters( 'plugin_locale', get_locale(), 'wp_all_export_plugin' );                           
    754            
     753
     754            $locale = apply_filters( 'plugin_locale', get_locale(), 'wp_all_export_plugin' );
     755
    755756            load_plugin_textdomain( 'wp_all_export_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
    756         }   
     757        }
    757758
    758759        public function fix_db_schema(){
     
    807808            $iteration = false;
    808809            $parent_id = false;
    809             $export_post_type = false;         
    810 
    811             // Check if field exists
     810            $export_post_type = false;
     811            $created_at = false;
     812           
     813            // Check if field exists
    812814            foreach ($tablefields as $tablefield) {
    813815                if ('iteration' == $tablefield->Field) $iteration = true;
    814816                if ('parent_id' == $tablefield->Field) $parent_id = true;
    815817                if ('export_post_type' == $tablefield->Field) $export_post_type = true;
    816             }
    817 
    818             if ( ! $iteration ){               
     818                if ('created_at' == $tablefield->Field) $created_at = true;
     819            }
     820
     821            if ( ! $iteration ){
    819822                $wpdb->query("ALTER TABLE {$table} ADD `iteration` BIGINT(20) NOT NULL DEFAULT 0;");
    820823            }
    821             if ( ! $parent_id ){               
     824            if ( ! $parent_id ){
    822825                $wpdb->query("ALTER TABLE {$table} ADD `parent_id` BIGINT(20) NOT NULL DEFAULT 0;");
    823826            }
    824             if ( ! $export_post_type ){             
     827            if ( ! $export_post_type ){
    825828                $wpdb->query("ALTER TABLE {$table} ADD `export_post_type` TEXT NOT NULL DEFAULT '';");
    826829            }
     830            if ( ! $created_at ){
     831                $wpdb->query("ALTER TABLE {$table} ADD `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;");
     832                $wpdb->query("UPDATE {$table} SET `created_at` = `registered_on` WHERE 1");
     833            }
    827834
    828835            update_option( "wp_all_export_free_db_version", PMXE_VERSION );
     
    883890        public static function get_default_import_options() {
    884891            return array(
    885                 'cpt' => array(),   
     892                'cpt' => array(),
    886893                'whereclause' => '',
    887894                'joinclause' => '',
     
    890897                'order_item_per_row' => 1,
    891898                'order_item_fill_empty_columns' => 1,
    892                 'filepath' => '',               
     899                'filepath' => '',
    893900                'current_filepath' => '',
    894901                'bundlepath' => '',
    895902                'export_type' => 'specific',
    896                 'wp_query' => '',   
     903                'wp_query' => '',
    897904                'wp_query_selector' => 'wp_query',
    898905                'is_user_export' => false,
    899906                'is_comment_export' => false,
    900                 'export_to' => 'csv',   
     907                'export_to' => 'csv',
    901908                'export_to_sheet' => 'csv',
    902909                'delimiter' => ',',
    903910                'encoding' => 'UTF-8',
    904                 'is_generate_templates' => 1,               
    905                 'is_generate_import' => 1,             
    906                 'import_id' => 0,                                   
    907                 'template_name' => '',             
     911                'is_generate_templates' => 1,
     912                'is_generate_import' => 1,
     913                'import_id' => 0,
     914                'template_name' => '',
    908915                'is_scheduled' => 0,
    909                 'scheduled_period' => '',               
     916                'scheduled_period' => '',
    910917                'scheduled_email' => '',
    911918                'cc_label' => array(),
     
    915922                'cc_php' => array(),
    916923                'cc_code' => array(),
    917                 'cc_sql' => array(),               
     924                'cc_sql' => array(),
    918925                'cc_options' => array(),
    919926                'cc_settings' => array(),
     
    947954                'custom_xml_template_header' => '',
    948955                'custom_xml_template_loop' => '',
    949                 'custom_xml_template_footer' => '',             
     956                'custom_xml_template_footer' => '',
    950957                'custom_xml_template_options' => array(),
    951958                'custom_xml_cdata_logic' => 'auto',
     
    967974
    968975            );
    969         }       
     976        }
    970977
    971978        public static function is_ajax(){
Note: See TracChangeset for help on using the changeset viewer.