Plugin Directory

Changeset 2830466


Ignore:
Timestamp:
12/08/2022 07:43:36 AM (3 years ago)
Author:
soflyy
Message:

1.3.8 release

Location:
wp-all-export
Files:
50 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-all-export/tags/1.3.8/actions/pmxe_after_export.php

    r1826194 r2830466  
    111111        {
    112112
    113             $exportOptions['split_files_list'] = array();                           
     113            $exportOptions['split_files_list'] = array();
    114114
    115115            if ( @file_exists($filepath) )
    116             {                   
    117 
    118                 switch ($export->options['export_to']) 
     116            {
     117
     118                switch ($export->options['export_to'])
    119119                {
    120120                    case 'xml':
     
    153153                        }
    154154
    155            
     155
    156156                        $records_count = 0;
    157157                        $chunk_records_count = 0;
     
    205205                                if ($rowCount > 0) {
    206206                                    fclose($out);
    207                                 }                               
     207                                }
    208208                                $outputFile = str_replace(basename($filepath), str_replace('.csv', '', basename($filepath)) . '-' . $fileCount++ . '.csv', $filepath);
    209209                                if ( ! in_array($outputFile, $exportOptions['split_files_list']))
    210210                                    $exportOptions['split_files_list'][] = $outputFile;
    211211
    212                                 $out = fopen($outputFile, 'w');                             
    213                             }                           
    214                             if ($data){             
     212                                $out = fopen($outputFile, 'w');
     213                            }
     214                            if ($data){
    215215                                if (($rowCount % $splitSize) == 0) {
    216216                                    fputcsv($out, $headers);
    217                                 }               
     217                                }
    218218                                fputcsv($out, $data);
    219219                            }
    220220                            $rowCount++;
    221221                        }
    222                         fclose($in);   
    223                         fclose($out);   
    224 
    225                         // convert splitted files into XLS format
    226                         if ( ! empty($exportOptions['split_files_list']) && ! empty($export->options['export_to_sheet']) and $export->options['export_to_sheet'] != 'csv' )
    227                         {
    228                             require_once PMXE_Plugin::ROOT_DIR . '/classes/PHPExcel/IOFactory.php';
    229 
    230                             foreach ($exportOptions['split_files_list'] as $key => $file)
    231                             {
    232                                 $objReader = PHPExcel_IOFactory::createReader('CSV');
    233                                 // If the files uses a delimiter other than a comma (e.g. a tab), then tell the reader
    234                                 $objReader->setDelimiter($export->options['delimiter']);
    235                                 // If the files uses an encoding other than UTF-8 or ASCII, then tell the reader
    236                                 $objPHPExcel = $objReader->load($file);
    237                                 switch ($export->options['export_to_sheet']){
    238                                     case 'xls':
    239                                         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
    240                                         $objWriter->save(str_replace(".csv", ".xls", $file));
    241                                         $exportOptions['split_files_list'][$key] = str_replace(".csv", ".xls", $file);
    242                                         break;
    243                                     case 'xlsx':
    244                                         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    245                                         $objWriter->save(str_replace(".csv", ".xlsx", $file));
    246                                         $exportOptions['split_files_list'][$key] = str_replace(".csv", ".xlsx", $file);
    247                                         break;
    248                                 }
    249                                 @unlink($file);
    250                             }
    251                         }
     222                        fclose($in);
     223                        fclose($out);
    252224
    253225                        break;
    254                    
     226
    255227                    default:
    256                        
     228
    257229                        break;
    258                 }               
     230                }
    259231
    260232                $export->set(array('options' => $exportOptions))->save();
    261             }   
    262         }   
    263 
    264         // convert CSV to XLS
    265         if ( @file_exists($filepath) and $export->options['export_to'] == 'csv' && ! empty($export->options['export_to_sheet']) and $export->options['export_to_sheet'] != 'csv')
    266         {           
    267            
    268             require_once PMXE_Plugin::ROOT_DIR . '/classes/PHPExcel/IOFactory.php';
    269 
    270             $objReader = PHPExcel_IOFactory::createReader('CSV');
    271             // If the files uses a delimiter other than a comma (e.g. a tab), then tell the reader
    272             $objReader->setDelimiter($export->options['delimiter']);
    273             // If the files uses an encoding other than UTF-8 or ASCII, then tell the reader
    274 
    275             $objPHPExcel = $objReader->load($filepath);
    276 
    277             switch ($export->options['export_to_sheet']) {
    278                 case 'xls':
    279                     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
    280                     $objWriter->save(str_replace(".csv", ".xls", $filepath));
    281                     @unlink($filepath);
    282                     $filepath = str_replace(".csv", ".xls", $filepath);
    283                     break;
    284                 case 'xlsx':
    285                     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    286                     $objWriter->save(str_replace(".csv", ".xlsx", $filepath));
    287                     @unlink($filepath);
    288                     $filepath = str_replace(".csv", ".xlsx", $filepath);
    289                     break;
    290             }
    291 
    292             $exportOptions = $export->options;
    293             $exportOptions['filepath'] = wp_all_export_get_relative_path($filepath);
    294             $export->set(array('options' => $exportOptions))->save();
    295 
    296             $is_secure_import = PMXE_Plugin::getInstance()->getOption('secure');
    297 
    298             if ( ! $is_secure_import ){
    299                 $wp_uploads = wp_upload_dir();
    300                 $wp_filetype = wp_check_filetype(basename($filepath), null );
    301                 $attachment_data = array(
    302                     'guid' => $wp_uploads['baseurl'] . '/' . _wp_relative_upload_path( $filepath ),
    303                     'post_mime_type' => $wp_filetype['type'],
    304                     'post_title' => preg_replace('/\.[^.]+$/', '', basename($filepath)),
    305                     'post_content' => '',
    306                     'post_status' => 'inherit'
    307                 ); 
    308                 if ( ! empty($export->attch_id) )
    309                 {
    310                     $attach_id = $export->attch_id;                     
    311                     $attachment = get_post($attach_id);
    312                     if ($attachment)
    313                     {
    314                         update_attached_file( $attach_id, $filepath );
    315                         wp_update_attachment_metadata( $attach_id, $attachment_data ); 
    316                     }
    317                     else
    318                     {
    319                         $attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );             
    320                     }
    321                 }
    322233            }
    323 
    324234        }
    325235
     
    328238        {
    329239            $exportOptions = $export->options;
    330             $exportOptions['current_filepath'] = str_replace(basename($filepath), '', $filepath) . 'current-' . basename($filepath);                       
     240            $exportOptions['current_filepath'] = str_replace(basename($filepath), '', $filepath) . 'current-' . basename($filepath);
    331241            $export->set(array('options' => $exportOptions))->save();
    332242        }
    333        
     243
    334244        $generateBundle = apply_filters('wp_all_export_generate_bundle', true);
    335245
     
    350260        }
    351261
    352 
    353         // send exported data to zapier.com
    354         $subscriptions = get_option('zapier_subscribe', array());       
    355         if ( ! empty($subscriptions) and empty($export->parent_id))
    356         {           
    357 
    358             $wp_uploads = wp_upload_dir();
    359 
    360             $fileurl = str_replace($wp_uploads['basedir'], $wp_uploads['baseurl'], $filepath);     
    361 
    362             $response = array(             
    363                 'website_url' => home_url(),
    364                 'export_id' => $export->id,
    365                 'export_name' => $export->friendly_name,
    366                 'file_name' => basename($filepath),
    367                 'file_type' => wp_all_export_get_export_format($export->options),
    368                 'post_types_exported' => empty($export->options['cpt']) ? $export->options['wp_query'] : implode($export->options['cpt'], ','),
    369                 'export_created_date' => $export->registered_on,
    370                 'export_last_run_date' => date('Y-m-d H:i:s'),
    371                 'export_trigger_type' => empty($_GET['export_key']) ? 'manual' : 'cron',
    372                 'records_exported' => $export->exported,
    373                 'export_file' => ''
    374             );
    375 
    376             if (file_exists($filepath))
    377             {
    378                 $response['export_file_url'] = $fileurl;
    379                 $response['status'] = 200;
    380                 $response['message'] = 'OK';   
    381             }
    382             else
    383             {
    384                 $response['export_file_url'] = '';
    385                 $response['status'] = 300;
    386                 $response['message'] = 'File doesn\'t exist';   
    387             }
    388 
    389             $response = apply_filters('wp_all_export_zapier_response', $response);
    390 
    391             foreach ($subscriptions as $zapier)
    392             {
    393                 if (empty($zapier['target_url'])) continue;
    394 
    395                 wp_remote_post( $zapier['target_url'], array(
    396                     'method' => 'POST',
    397                     'timeout' => 45,
    398                     'redirection' => 5,
    399                     'httpversion' => '1.0',
    400                     'blocking' => true,
    401                     'headers' => array(
    402                             'Content-Type' => 'application/json'
    403                         ),
    404                     'body' => "[".json_encode($response)."]",
    405                     'cookies' => array()
    406                     )
    407                 );
    408             }           
    409         }
    410 
    411         // clean session
     262        // clean session
    412263        if ( ! empty(PMXE_Plugin::$session) and PMXE_Plugin::$session->has_session() )
    413264        {
    414             PMXE_Plugin::$session->clean_session( $export->id );               
    415         }
    416     }   
     265            PMXE_Plugin::$session->clean_session( $export->id );
     266        }
     267    }
    417268}
  • wp-all-export/tags/1.3.8/actions/wp_ajax_save_scheduling.php

    r1826194 r2830466  
    1111
    1212    if (!check_ajax_referer('wp_all_export_secure', 'security', false)) {
    13         exit(__('Security check', 'wp_all_export_plugin'));
     13        exit(esc_html__('Security check', 'wp_all_export_plugin'));
    1414    }
    1515
    1616    if (!current_user_can(PMXE_Plugin::$capabilities)) {
    17         exit(__('Security check', 'wp_all_export_plugin'));
     17        exit(esc_html__('Security check', 'wp_all_export_plugin'));
    1818    }
    1919
  • wp-all-export/tags/1.3.8/actions/wp_ajax_scheduling_dialog_content.php

    r2738627 r2830466  
    55
    66    if (!check_ajax_referer('wp_all_export_secure', 'security', false)) {
    7         exit(json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))));
     7        exit(json_encode(array('html' => esc_html__('Security check', 'wp_all_export_plugin'))));
    88    }
    99
    1010    if (!current_user_can(PMXE_Plugin::$capabilities)) {
    11         exit(json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))));
     11        exit(json_encode(array('html' => esc_html__('Security check', 'wp_all_export_plugin'))));
    1212    }
    1313
     
    1818        throw new Exception('Export not found');
    1919    }
    20     $post = $export->options;
     20    $schedulingExportOptions = $export->options;
    2121
    2222    $hasActiveLicense = PMXE_Plugin::hasActiveSchedulingLicense();
     
    2828    $cron_job_key = PMXE_Plugin::getInstance()->getOption('cron_job_key');
    2929
    30     if (!isset($post['scheduling_enable'])) {
    31         $post['scheduling_enable'] = 0;
     30    if (!isset($schedulingExportOptions['scheduling_enable'])) {
     31        $schedulingExportOptions['scheduling_enable'] = 0;
    3232    }
    3333
    34     if (!isset($post['scheduling_timezone'])) {
    35         $post['scheduling_timezone'] = 'UTC';
     34    if (!isset($schedulingExportOptions['scheduling_timezone'])) {
     35        $schedulingExportOptions['scheduling_timezone'] = 'UTC';
    3636    }
    3737
    38     if (!isset($post['scheduling_run_on'])) {
    39         $post['scheduling_run_on'] = 'weekly';
     38    if (!isset($schedulingExportOptions['scheduling_run_on'])) {
     39        $schedulingExportOptions['scheduling_run_on'] = 'weekly';
    4040    }
    4141
    42     if (!isset($post['scheduling_times'])) {
    43         $post['scheduling_times'] = array();
     42    if (!isset($schedulingExportOptions['scheduling_times'])) {
     43        $schedulingExportOptions['scheduling_times'] = array();
    4444    }
    4545    ?>
     
    196196        #add-subscription-field {
    197197            position: absolute;
    198             left: -155px;
     198            left: -152px;
    199199            top: -1px;
    200200            height: 46px;
     
    249249            margin-left: 26px;
    250250        }
     251
    251252        .chosen-container .chosen-results {
    252253
    253254            margin: 0 4px 4px 0 !important;
     255        }
     256
     257        .unable-to-connect {
     258            color: #f2b03d;
    254259        }
    255260    </style>
     
    270275                        }
    271276                    }
     277
     278                    updateSaveButtonState = function() {
     279                        var howToRun = $('input[name="scheduling_enable"]:checked').val();
     280
     281                        if(parseInt(howToRun) === 1 && !hasActiveLicense) {
     282                            $('.save-changes').addClass('disabled');
     283                        } else {
     284                            $('.save-changes').removeClass('disabled');
     285                        }
     286                    };
     287
     288                    updateSaveButtonState();
     289
     290                    $('input[name="scheduling_enable"]').change(function(){
     291                        updateSaveButtonState();
     292                    });
     293
    272294
    273295                    window.pmxeValidateSchedulingForm = function () {
     
    427449                            if (!$(this).data('iunderstand') && schedulingEnable) {
    428450                                $('#no-subscription').slideDown();
    429                                 $(this).find('.save-text').html('<?php echo _e('I Understand');?>');
     451                                $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
    430452                                $(this).find('.save-text').css('left', '100px');
    431453                                $(this).data('iunderstand', 1);
     
    491513                    });
    492514
    493                     <?php if($post['scheduling_timezone'] == 'UTC') {
     515                    <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    494516                    ?>
    495517                    var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    496518
    497                     if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
     519                    if ($('#timezone').find("option:contains('" + timeZone + "')").length != 0) {
    498520                        $('#timezone').trigger("chosen:updated");
    499521                        $('#timezone').val(timeZone);
    500522                        $('#timezone').trigger("chosen:updated");
    501                     }else{
     523                    } else {
    502524                        var parts = timeZone.split('/');
    503                         var lastPart = parts[parts.length-1];
    504                         var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
     525                        var lastPart = parts[parts.length - 1];
     526                        var opt = $('#timezone').find("option:contains('" + lastPart + "')");
    505527
    506528                        $('#timezone').val(opt.val());
     
    538560                            var license = $('#add-subscription-field').val();
    539561                            $.ajax({
    540                                 url: ajaxurl + '?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     562                                url: ajaxurl + '?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    541563                                type: "POST",
    542564                                data: {
     
    580602                                        setTimeout(function () {
    581603                                            $('#add-subscription-field').animate({width: '140px'}, 225);
    582                                             $('#add-subscription-field').animate({left: '-155px'}, 225);
     604                                            $('#add-subscription-field').animate({left: '-152px'}, 225);
    583605                                        }, 300);
    584606
     
    636658    <?php require __DIR__ . '/../src/Scheduling/views/CommonJs.php'; ?>
    637659    <div id="post-preview" class="wpallexport-preview wpallexport-scheduling-dialog">
    638         <p class="wpallexport-preview-title"><strong>Scheduling Options</strong></p>
     660        <p class="wpallexport-preview-title"><strong>Scheduling Options for Export ID
     661                #<?php echo intval($export_id); ?></strong></p>
    639662        <div class="wpallexport-preview-content" style="max-height: 700px; overflow: visible;">
    640663
     
    642665                <label>
    643666                    <input type="radio" name="scheduling_enable"
    644                            value="0" <?php if ((isset($post['scheduling_enable']) && $post['scheduling_enable'] == 0) || !isset($post['scheduling_enable'])) { ?> checked="checked" <?php } ?>/>
     667                           value="0" <?php if ((isset($schedulingExportOptions['scheduling_enable']) && $schedulingExportOptions['scheduling_enable'] == 0) || !isset($schedulingExportOptions['scheduling_enable'])) { ?> checked="checked" <?php } ?>/>
    645668                    <h4 style="display: inline-block;"><?php esc_html_e('Do Not Schedule'); ?></h4>
    646669                </label>
     
    649672                <label>
    650673                    <input type="radio" name="scheduling_enable"
    651                            value="1" <?php if ($post['scheduling_enable'] == 1) { ?> checked="checked" <?php } ?>/>
     674                           value="1" <?php if ($schedulingExportOptions['scheduling_enable'] == 1) { ?> checked="checked" <?php } ?>/>
    652675                    <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    653676                        <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    654                                                             <?php include __DIR__ . '/../src/Scheduling/views/ConnectionIcon.php'; ?>
    655                                                         </span>
    656                         <?php if($post['scheduling_enable'] == 1) { ?>
     677                                                        <?php include __DIR__ . '/../src/Scheduling/views/ConnectionIcon.php'; ?>
     678                                                    </span>
     679                        <?php if($schedulingExportOptions['scheduling_enable'] == 1) { ?>
    657680                            <?php if (!$scheduling->checkConnection()) { ?>
    658681                                <span class="wpai-license" style="margin-left: 8px; font-weight: normal; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?>"><span class="unable-to-connect">Unable to connect, please contact support.</span></span>
     
    669692                </div>
    670693                <div id="automatic-scheduling"
    671                      style="margin-left: 21px; <?php if ($post['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
     694                     style="margin-left: 21px; <?php if ($schedulingExportOptions['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
    672695                    <div>
    673696                        <div class="input">
    674697                            <label style="color: rgb(68,68,68);">
    675698                                <input
    676                                         type="radio" <?php if (isset($post['scheduling_run_on']) && $post['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
     699                                        type="radio" <?php if (isset($schedulingExportOptions['scheduling_run_on']) && $schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
    677700                                        name="scheduling_run_on" value="weekly"
    678701                                        checked="checked"/> <?php esc_html_e('Every week on...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    680703                        </div>
    681704                        <input type="hidden" style="width: 500px;" name="scheduling_weekly_days"
    682                                value="<?php echo esc_attr($post['scheduling_weekly_days']); ?>" id="weekly_days"/>
     705                               value="<?php echo esc_attr($schedulingExportOptions['scheduling_weekly_days']); ?>"
     706                               id="weekly_days"/>
    683707                        <?php
    684                         if (isset($post['scheduling_weekly_days'])) {
    685                             $weeklyArray = explode(',', $post['scheduling_weekly_days']);
     708                        if (isset($schedulingExportOptions['scheduling_weekly_days'])) {
     709                            $weeklyArray = explode(',', $schedulingExportOptions['scheduling_weekly_days']);
    686710                        } else {
    687711                            $weeklyArray = array();
     
    689713                        ?>
    690714                        <ul class="days-of-week" id="weekly"
    691                             style="<?php if ($post['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
     715                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
    692716                            <li data-day="0" <?php if (in_array('0', $weeklyArray)) { ?> class="selected" <?php } ?>>
    693717                                Mon
     
    718742                            <label style="color: rgb(68,68,68); margin-top: 5px;">
    719743                                <input
    720                                         type="radio" <?php if (isset($post['scheduling_run_on']) && $post['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
     744                                        type="radio" <?php if (isset($schedulingExportOptions['scheduling_run_on']) && $schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
    721745                                        name="scheduling_run_on"
    722746                                        value="monthly"/> <?php esc_html_e('Every month on the first...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    724748                        </div>
    725749                        <input type="hidden" name="scheduling_monthly_days"
    726                                value="<?php if(isset($post['scheduling_monthly_days'])) echo esc_attr($post['scheduling_monthly_days']); ?>" id="monthly_days"/>
     750                               value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>"
     751                               id="monthly_days"/>
    727752                        <?php
    728                         if (isset($post['scheduling_monthly_days'])) {
    729                             $monthlyArray = explode(',', $post['scheduling_monthly_days']);
     753                        if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     754                            $monthlyArray = explode(',', $schedulingExportOptions['scheduling_monthly_days']);
    730755                        } else {
    731756                            $monthlyArray = array();
     
    733758                        ?>
    734759                        <ul class="days-of-week" id="monthly"
    735                             style="<?php if ($post['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
     760                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
    736761                            <li data-day="0" <?php if (in_array('0', $monthlyArray)) { ?> class="selected" <?php } ?>>
    737762                                Mon
     
    765790
    766791                        <div id="times" style="margin-bottom: 10px;">
    767                             <?php if (isset($post['scheduling_times']) && is_array($post['scheduling_times'])) {
    768                                 foreach ($post['scheduling_times'] as $time) { ?>
     792                            <?php if (isset($schedulingExportOptions['scheduling_times']) && is_array($schedulingExportOptions['scheduling_times'])) {
     793                                foreach ($schedulingExportOptions['scheduling_times'] as $time) { ?>
    769794
    770795                                    <?php if ($time) { ?>
     
    781806
    782807                            $timezoneValue = false;
    783                             if ($post['scheduling_timezone']) {
    784                                 $timezoneValue = $post['scheduling_timezone'];
     808                            if ($schedulingExportOptions['scheduling_timezone']) {
     809                                $timezoneValue = $schedulingExportOptions['scheduling_timezone'];
    785810                            }
    786811
     
    832857                                <p><?php esc_html_e('Have a license?'); ?>
    833858                                    <a href="#"
    834                                        id="add-subscription"><?php esc_html_e('Register this site.'); ?></a> <?php _e('Questions?'); ?>
     859                                       id="add-subscription"><?php esc_html_e('Register this site.'); ?></a> <?php esc_html_e('Questions?'); ?>
    835860                                    <a href="#" class="help_scheduling">Read more.</a>
    836861                                </p>
  • wp-all-export/tags/1.3.8/actions/wp_ajax_wpae_filtering_count.php

    r2654009 r2830466  
    131131
    132132            $exportQuery = eval('return new WP_Query(array(' . PMXE_Plugin::$session->get('wp_query') . ', \'offset\' => 0, \'posts_per_page\' => 10 ));');
     133
     134            // Clear LIKE, NOT LIKE, and 's' percent placeholders for request and orderby.
     135            global $wpdb;
     136            $exportQuery->request = $wpdb->remove_placeholder_escape($exportQuery->request);
     137
     138            foreach( $exportQuery->query_vars['search_orderby_title'] as $key => $value ){
     139                $exportQuery->query_vars['search_orderby_title'][$key] = $wpdb->remove_placeholder_escape($value);
     140            }
     141
    133142            if (!empty($exportQuery->found_posts)) {
    134143                $foundRecords = $exportQuery->found_posts;
  • wp-all-export/tags/1.3.8/config/options.php

    r2267563 r2830466  
    55 */
    66$config = array(
    7     "info_api_url" => "http://www.wpallimport.com",
     7    "info_api_url" => "https://www.wpallimport.com",
    88    "dismiss" => 0,
    99    "dismiss_manage_top" => 0,
  • wp-all-export/tags/1.3.8/libraries/XmlExportCustomRecord.php

    r2654009 r2830466  
    3636        }
    3737
    38         public static function prepare_data($record, $exportOptions, $xmlWriter = false, $implode_delimiter, $preview) {
     38        public static function prepare_data($record, $exportOptions, $xmlWriter, $implode_delimiter, $preview) {
    3939            $article = array();
    4040
  • wp-all-export/tags/1.3.8/libraries/XmlExportMediaGallery.php

    r2121544 r2830466  
    283283            case 'image_title':
    284284                $field_options = json_decode($options['cc_options'][$ID], true);
    285                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     285                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    286286                {                   
    287287                    $templateOptions['set_image_meta_title'] = 1;               
     
    297297            case 'image_caption':
    298298                $field_options = json_decode($options['cc_options'][$ID], true);
    299                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     299                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    300300                {
    301301                    $templateOptions['set_image_meta_caption'] = 1;             
     
    311311            case 'image_description':
    312312                $field_options = json_decode($options['cc_options'][$ID], true);
    313                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     313                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    314314                {
    315315                    $templateOptions['set_image_meta_description'] = 1;             
     
    325325            case 'image_alt':
    326326                $field_options = json_decode($options['cc_options'][$ID], true);
    327                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     327                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    328328                {
    329329                    $templateOptions['set_image_meta_alt'] = 1;         
  • wp-all-export/tags/1.3.8/readme.txt

    r2811263 r2830466  
    33Requires at least: 5.0
    44Tested up to: 6.1
    5 Stable tag: 1.3.7
     5Stable tag: 1.3.8
    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
     
    8686[Export WordPress Users to CSV/XML](https://wordpress.org/plugins/export-wp-users-xml-csv/)
    8787
     88= Related Tutorials =
     89[How to Export WooCommerce Products to Google Merchant Center](https://www.wpallimport.com/documentation/how-to-export-woocommerce-products-to-google-merchant-center/)
     90
    8891== Premium Support ==
    8992Upgrade to the Pro edition of WP All Export for premium support.
     
    99102
    100103== Changelog ==
     104
     105= 1.3.8 =
     106* improvement: only contact Scheduling service if a Scheduling license is set
     107* bug fix: enable use of 's', 'LIKE' and 'NOT LIKE' in WP_Query exports
    101108
    102109= 1.3.7 =
  • wp-all-export/tags/1.3.8/src/App/Service/ScheduledExport.php

    r2654009 r2830466  
    33namespace Wpae\App\Service;
    44
     5
     6use Wpae\App\Service\Addons\AddonNotFoundException;
    57
    68class ScheduledExport
     
    2729            return new JsonResponse(array(
    2830                'status' => 403,
    29                 'message' => sprintf(esc_html__('Export #%s already triggered. Request skipped.', 'wp_all_export_plugin'), $export->id)
     31                'message' => sprintf('Export #%s already triggered. Request skipped.', $export->id)
    3032            ));
    3133        }
     
    7072            ));
    7173        } elseif ((int)$export->triggered and !(int)$export->processing) {
    72             $response = $export->set(array('canceled' => 0))->execute($logger, true);
    73 
     74            try {
     75                $response = $export->set(array('canceled' => 0))->execute($logger, true);
     76            } catch (AddonNotFoundException $e) {
     77                die($e->getMessage());
     78            }
    7479            if (!(int)$export->triggered and !(int)$export->processing) {
    7580
  • wp-all-export/tags/1.3.8/src/Scheduling/Scheduling.php

    r2615815 r2830466  
    8484    public function handleScheduling($id, $post)
    8585    {
     86
     87        if (!$this->checkLicense()) {
     88            return false;
     89        }
     90
    8691        $schedulingEnabled = $post['scheduling_enable'];
    8792   
     
    213218    }
    214219
     220    public function updateApiKey($elementId, $newKey) {
     221
     222        $remoteSchedule = $this->getSchedule($elementId);
     223
     224        if ($remoteSchedule) {
     225            $this->schedulingApi->updateScheduleKey($remoteSchedule->id, $newKey);
     226        }
     227    }
     228
    215229    /**
    216230     * TODO: Uglier but simpler method, if this gets in the way, extract to a class
  • wp-all-export/tags/1.3.8/src/Scheduling/SchedulingApi.php

    r2307882 r2830466  
    148148    }
    149149
     150    public function updateScheduleKey($remoteScheduleId, $newKey)
     151    {
     152        wp_remote_request(
     153            $this->getApiUrl('schedules/' . $remoteScheduleId . '/key'),
     154            array(
     155                'method' => 'POST',
     156                'headers' => $this->getHeaders(),
     157                'body' => json_encode(['key' => $newKey])
     158
     159            )
     160        );
     161    }
     162
    150163    private function getHeaders()
    151164    {
  • wp-all-export/tags/1.3.8/src/Scheduling/views/CommonJs.php

    r1826194 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<script type="text/javascript">
    27    (function ($) {
  • wp-all-export/tags/1.3.8/src/Scheduling/views/ConnectionIcon.php

    r2738627 r2830466  
    11<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
    25$scheduling = \Wpae\Scheduling\Scheduling::create();
    36?>
    47<span class="wpai-no-license" <?php if ($scheduling->checkLicense()) { ?> style="display: none;" <?php } ?> >
    58
    6     <a href="#" style="z-index: 1000; margin-top: -4px; margin-left: 0;" class="wpallexport-help help_scheduling"
     9    <a href="#" style="z-index: 1000;" class="wpallexport-help help_scheduling"
    710       title="Automatic Scheduling is a paid service from Soflyy. Click for more info.">
    811
     
    1013</span>
    1114
     15<?php if ($scheduling->checkLicense()) { ?>
     16    <span class="wpai-license">
     17        <?php if ( $scheduling->checkConnection() ) {
     18            ?>
     19            <span class="wpallexport-help" title="Connection to WP All Export servers is stable and confirmed"
     20                  style="background-image: none; width: 20px; height: 20px;">
     21            <img src="<?php echo esc_url(PMXE_ROOT_URL); ?>/static/img/s-check.png" style="width: 16px;"/>
     22            </span>
     23            <?php
     24        } else  { ?>
     25            <img src="<?php echo esc_url(PMXE_ROOT_URL); ?>/static/img/s-exclamation.png" style="width: 16px;"/>
    1226
    13 <span class="wpai-license" <?php if (!$scheduling->checkLicense()) { ?> style="display: none;" <?php } ?> >
    14     <?php if ( $scheduling->checkConnection() ) {
     27            <?php
     28        }
    1529        ?>
    16         <span class="wpallexport-help" title="Connection to WP All Export servers is stable and confirmed"
    17               style="background-image: none; width: 20px; height: 20px;;">
    18         <img src="<?php echo PMXE_ROOT_URL; ?>/static/img/s-check.png" style="width: 16px;"/>
    1930    </span>
    20         <?php
    21     } else  { ?>
    22         <img src="<?php echo PMXE_ROOT_URL; ?>/static/img/s-exclamation.png" style="width: 16px;"/>
     31<?php
     32}
    2333
    24         <?php
    25     }
    26     ?>
    27 </span>
     34?>
  • wp-all-export/tags/1.3.8/src/Scheduling/views/ManualScheduling.php

    r2654009 r2830466  
    33    <label>
    44        <input type="radio" name="scheduling_enable"
    5                value="2" <?php if ($post['scheduling_enable'] == 2) { ?> checked="checked" <?php } ?>/>
     5               value="2"/>
    66        <h4 style="margin-top: 0;display: inline-block;"><?php esc_html_e('Manual Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?></h4>
    77    </label>
    88    <div style="margin-left: 26px; margin-bottom: 10px; font-size: 13px;"><?php esc_html_e('Run this export using cron jobs.'); ?></div>
    9     <div style="<?php if ($post['scheduling_enable'] != 2) { ?> display: none; <?php } ?>" class="manual-scheduling">
     9    <div style="display: none;" class="manual-scheduling">
    1010
    1111        <div class="wpallexport-free-edition-notice" style="margin: 15px 0; width: 90%; padding-left: 10px; padding-right: 10px;">
  • wp-all-export/tags/1.3.8/src/Scheduling/views/SaveSchedulingButton.php

    r2654009 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<div class="wpae-save-button button button-primary button-hero wpallexport-large-button"
    2      style="position: relative; width: 285px; margin-left: 5px;">
    3     <svg width="30" height="30" viewBox="0 0 1792 1792"
    4          xmlns="http://www.w3.org/2000/svg"
    5          style="fill: white; display: none;">
    6         <path
    7                 d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"
    8                 fill="white"/>
    9     </svg>
    10     <div class="easing-spinner" style="display: none;">
    11         <div class="double-bounce1"></div>
    12         <div class="double-bounce2"></div>
    13     </div>
     7     style="position: relative; width: 285px; margin-left: 5px; ">
     8
    149    <div class="save-text"
    15          style="display: block; position:absolute; <?php if($this->isWizard) {?> left: 70px; <?php } else { ?> left: 60px; <?php } ?> top:0; user-select: none;">
    16         <?php if($this->isWizard) {?>
    17             <?php esc_html_e('Confirm & Run Export', 'wp_all_export_plugin'); ?>
     10         style=" user-select: none; display: flex; align-content: center; justify-content: center;">
     11        <?php if($this->isWizard || (isset($post['enable_real_time_exports']) && $post['enable_real_time_exports'])) {?>
     12            <?php esc_html_e('Save & Run Export', 'wp_all_export_plugin'); ?>
    1813        <?php } else { ?>
    1914            <?php esc_html_e('Save Export Configuration', 'wp_all_export_plugin'); ?>
  • wp-all-export/tags/1.3.8/src/Scheduling/views/SchedulingHelp.php

    r2654009 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<div id="wp-all-export-scheduling-help-inner" class="wp_all_export_scheduling_help">
    27
  • wp-all-export/tags/1.3.8/src/Scheduling/views/SchedulingOptions.php

    r2654009 r2830466  
    11<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5
    26$scheduling = \Wpae\Scheduling\Scheduling::create();
    37$schedulingExportOptions = $export->options;
     
    377381                        if (!$(this).data('iunderstand') && schedulingEnable) {
    378382                            $('#no-subscription').slideDown();
    379                             $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
     383                            $(this).find('.save-text').html('<?php echo esc_html('I Understand');?>');
    380384                            $(this).find('.save-text').css('left', '100px');
    381385                            $(this).data('iunderstand', 1);
     
    420424                    formData.push({name: 'scheduling_enable', value: $('input[name="scheduling_enable"]:checked').val()});
    421425
    422                     $button.find('.easing-spinner').toggle();
    423 
    424426                    $.ajax({
    425427                        type: 'POST',
     
    427429                        data: formData,
    428430                        success: function (response) {
    429                             $button.find('.easing-spinner').toggle();
    430                             $button.find('.save-text').html(initialValue);
    431                             $button.find('svg').show();
    432 
    433                             setTimeout(function(){
    434                                 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
    435                                 $(document).trigger(submitEvent);
    436                             }, 1000);
     431
     432                            var submitEvent = $.Event('wpae-scheduling-options-form:submit');
     433                            $(document).trigger(submitEvent);
    437434
    438435                        },
    439436                        error: function () {
    440                             $button.find('.easing-spinner').toggle();
    441                             $button.find('.save-text').html(initialValue);
    442437                        }
    443438                    });
     
    456451                            if (!$(this).data('iunderstand') && schedulingEnable) {
    457452                                $('#no-subscription').slideDown();
    458                                 $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
     453                                $(this).find('.save-text').html('<?php echo esc_html('I Understand');?>');
    459454                                $(this).find('.save-text').css('left', '100px');
    460455                                $(this).data('iunderstand', 1);
     
    527522                <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    528523                ?>
    529                 var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    530 
    531                 if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
    532                     $('#timezone').trigger("chosen:updated");
    533                     $('#timezone').val(timeZone);
    534                     $('#timezone').trigger("chosen:updated");
    535                 }else{
    536                     var parts = timeZone.split('/');
    537                     var lastPart = parts[parts.length-1];
    538                     var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
    539 
    540                     $('#timezone').val(opt.val());
    541                     $('#timezone').trigger("chosen:updated");
    542                 }
     524                    var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
     525
     526                    if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
     527                        $('#timezone').trigger("chosen:updated");
     528                        $('#timezone').val(timeZone);
     529                        $('#timezone').trigger("chosen:updated");
     530                    }else{
     531                        var parts = timeZone.split('/');
     532                        var lastPart = parts[parts.length-1];
     533                        var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
     534
     535                        $('#timezone').val(opt.val());
     536                        $('#timezone').trigger("chosen:updated");
     537                    }
    543538
    544539                <?php
     
    573568                        var license = $('#add-subscription-field').val();
    574569                        $.ajax({
    575                             url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     570                            url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    576571                            type:"POST",
    577572                            data: {
     
    654649</script>
    655650<?php require __DIR__.'/CommonJs.php'; ?>
    656 <div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed"
    657      style="margin-top: -10px; margin-bottom: 10px;">
     651<div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed wpallexport-scheduling" style="margin-top: -10px; margin-bottom: 10px;">
    658652    <div id="scheduling-form">
    659653
     
    675669                    <div>
    676670                        <label>
    677                             <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
     671                        <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
    678672
    679673                            <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    680                                 <span class="connection-icon" style="margin-left: 8px;">
     674                                <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    681675                                                            <?php include_once('ConnectionIcon.php'); ?>
    682676                                                        </span>
    683                                 <?php if (!$scheduling->checkConnection()) { ?>
    684                                     <span class="wpai-license" style="margin-left: 8px; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?> color: #f2b03d;  ">Unable to connect, please contact support.</span>
     677                                <?php if($schedulingExportOptions['scheduling_enable'] == 1) { ?>
     678                                    <?php if (!$scheduling->checkConnection()) { ?>
     679                                        <span class="wpai-license" style="margin-left: 8px; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?>"><span class="unable-to-connect">Unable to connect, please contact support.</span></span>
     680                                    <?php } ?>
    685681                                <?php } ?>
    686682                            </h4>
     
    746742                                </label>
    747743                            </div>
    748                             <input type="hidden" name="scheduling_monthly_days" value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo $schedulingExportOptions['scheduling_monthly_days']; ?>" id="monthly_days"/>
     744                            <input type="hidden" name="scheduling_monthly_days" value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>" id="monthly_days"/>
    749745                            <?php
    750746                            if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     
    819815                                <div class="button-container">
    820816
    821                                     <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=515704&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=automatic-scheduling" target="_blank" id="subscribe-button">
     817                                    <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=515704" target="_blank" id="subscribe-button">
    822818                                        <div class="button button-primary button-hero wpallexport-large-button button-subscribe"
    823819                                             style="background-image: none; width: 140px; text-align: center; position: absolute; z-index: 4;">
  • wp-all-export/tags/1.3.8/src/Scheduling/views/SchedulingUI.php

    r2738627 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<style type="text/css">
    27    .days-of-week {
     
    202207<?php
    203208$scheduling = \Wpae\Scheduling\Scheduling::create();
    204 $post = $export->options;
     209$schedulingExportOptions = $export->options;
    205210$hasActiveLicense = $scheduling->checkLicense();
    206211$cron_job_key = PMXE_Plugin::getInstance()->getOption('cron_job_key');
     
    417422                });
    418423
    419                 <?php if($post['scheduling_timezone'] == 'UTC') {
     424                <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    420425                ?>
    421426                var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
     
    463468                        var license = $('#add-subscription-field').val();
    464469                        $.ajax({
    465                             url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     470                            url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    466471                            type:"POST",
    467472                            data: {
     
    474479                                if(response.success) {
    475480                                    hasActiveLicense = true;
    476                                     $('.wpae-save-button').slideDown().css('display','block');
     481                                    $('.wpae-save-button').removeClass('disabled');
    477482                                    $('#subscribe-button .easing-spinner').hide();
    478483                                    $('#subscribe-button svg.success').show();
     
    500505                                    setTimeout(function () {
    501506                                        $('#add-subscription-field').animate({width:'140px'}, 225);
    502                                         $('#add-subscription-field').animate({left:'-155px'}, 225);
     507                                        $('#add-subscription-field').animate({left:'-152px'}, 225);
    503508                                    }, 300);
    504509
     
    551556                <div style="margin-bottom: 20px;">
    552557                    <label>
    553                         <input type="radio" name="scheduling_enable" value="0" <?php if($post['scheduling_enable'] == 0) { ?> checked="checked" <?php } ?>/>
     558                        <input type="radio" name="scheduling_enable" value="0" <?php if($schedulingExportOptions['scheduling_enable'] == 0) { ?> checked="checked" <?php } ?>/>
    554559                        <h4 style="display: inline-block;"><?php esc_html_e('Do Not Schedule'); ?></h4>
    555560                    </label>
     
    557562                <div>
    558563                    <label>
    559                         <input type="radio" name="scheduling_enable" value="1" <?php if($post['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
     564                        <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
    560565                        <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    561                             <span class="connection-icon" style="margin-left: 8px;">
     566                            <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    562567                                                            <?php include_once('ConnectionIcon.php'); ?>
    563568                                                        </span>
     
    579584                </div>
    580585                <div id="automatic-scheduling"
    581                      style="margin-left: 21px; <?php if ($post['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
     586                     style="margin-left: 21px; <?php if ($schedulingExportOptions['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
    582587                    <div>
    583588                        <div class="input">
    584589                            <label style="color: rgb(68,68,68);">
    585590                                <input
    586                                     type="radio" <?php if ($post['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
     591                                    type="radio" <?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
    587592                                    name="scheduling_run_on" value="weekly"
    588593                                    checked="checked"/> <?php esc_html_e('Every week on...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    590595                        </div>
    591596                        <input type="hidden" style="width: 500px;" name="scheduling_weekly_days"
    592                                value="<?php echo esc_attr($post['scheduling_weekly_days']); ?>" id="weekly_days"/>
     597                               value="<?php echo esc_attr($schedulingExportOptions['scheduling_weekly_days']); ?>" id="weekly_days"/>
    593598                        <?php
    594                         if (isset($post['scheduling_weekly_days'])) {
    595                             $weeklyArray = explode(',', $post['scheduling_weekly_days']);
     599                        if (isset($schedulingExportOptions['scheduling_weekly_days'])) {
     600                            $weeklyArray = explode(',', $schedulingExportOptions['scheduling_weekly_days']);
    596601                        } else {
    597602                            $weeklyArray = array();
    598603                        }
    599604                        ?>
    600                         <ul class="days-of-week" id="weekly" style="<?php if ($post['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
     605                        <ul class="days-of-week" id="weekly" style="<?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
    601606                            <li data-day="0" <?php if (in_array('0', $weeklyArray)) { ?> class="selected" <?php } ?>>
    602607                                Mon
     
    627632                            <label style="color: rgb(68,68,68);">
    628633                                <input
    629                                     type="radio" <?php if ($post['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
     634                                    type="radio" <?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
    630635                                    name="scheduling_run_on"
    631636                                    value="monthly"/> <?php esc_html_e('Every month on the first...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    632637                            </label>
    633638                        </div>
    634                         <input type="hidden" name="scheduling_monthly_days" value="<?php if(isset($post['scheduling_monthly_days'])) echo esc_attr($post['scheduling_monthly_days']); ?>" id="monthly_days"/>
     639                        <input type="hidden" name="scheduling_monthly_days" value="<?php if(isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>" id="monthly_days"/>
    635640                        <?php
    636                         if (isset($post['scheduling_monthly_days'])) {
    637                             $monthlyArray = explode(',', $post['scheduling_monthly_days']);
     641                        if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     642                            $monthlyArray = explode(',', $schedulingExportOptions['scheduling_monthly_days']);
    638643                        } else {
    639644                            $monthlyArray = array();
     
    641646                        ?>
    642647                        <ul class="days-of-week" id="monthly"
    643                             style="<?php if ($post['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
     648                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
    644649                            <li data-day="0" <?php if (in_array('0', $monthlyArray)) { ?> class="selected" <?php } ?>>
    645650                                Mon
     
    673678
    674679                        <div id="times" style="margin-bottom: 10px;">
    675                             <?php if (is_array($post['scheduling_times'])) {
    676                                 foreach ($post['scheduling_times'] as $time) { ?>
     680                            <?php if (is_array($schedulingExportOptions['scheduling_times'])) {
     681                                foreach ($schedulingExportOptions['scheduling_times'] as $time) { ?>
    677682
    678683                                    <?php if ($time) { ?>
     
    689694
    690695                            $timezoneValue = false;
    691                             if ($post['scheduling_timezone']) {
    692                                 $timezoneValue = $post['scheduling_timezone'];
     696                            if ($schedulingExportOptions['scheduling_timezone']) {
     697                                $timezoneValue = $schedulingExportOptions['scheduling_timezone'];
    693698                            }
    694699
     
    749754</div>
    750755
    751 <div class="wpae-save-button button button-primary button-hero wpallexport-large-button wpae-export-complete-save-button" id="save-scheduling-button"
    752      style="position: relative; width: 285px; <?php if($hasActiveLicense) { echo 'display: block;';} else { echo "display: none;";}?> margin:auto; background-image: none; margin-top: 25px;">
     756<div class="wpae-save-button button button-primary button-hero wpallexport-large-button wpae-export-complete-save-button <?php if(!$hasActiveLicense) { echo 'disabled'; }?>"
     757     style="position: relative; width: 285px; display: block; margin:auto; background-image: none; margin-top: 25px;">
    753758    <svg width="30" height="30" viewBox="0 0 1792 1792"
    754759         xmlns="http://www.w3.org/2000/svg"
  • wp-all-export/tags/1.3.8/static/css/admin.css

    r2738627 r2830466  
    3737    overflow: auto;
    3838}
     39
     40.wpallexport-plugin .wpallexport-step-4 .wpallexport-free-edition-notice a.upgrade_link {
     41    font-size: 1.3em !important;
     42}
     43
    3944.wpallexport-plugin .wp_all_export_custom_xml_help p,
    4045.wpallexport-plugin .wp_all_export_scheduling_help p
     
    148153    text-decoration: none;
    149154}
     155
     156.wpallexport-plugin .connection-icon .help_scheduling {
     157    margin: 0;
     158    position: initial;
     159}
     160
    150161.wpallexport-plugin .wpallexport-free-edition-notice{
    151162    display: block;
     
    45004511
    45014512
     4513.wpae-shake {
     4514    -webkit-animation: wpae_shake 0.4s 1 linear;
     4515    -moz-animation: wpae_shake 0.4s 1 linear;
     4516    -o-animation: wpae_shake 0.4s 1 linear;
     4517}
     4518@-webkit-keyframes wpae_shake {
     4519    0% { -webkit-transform: translate(30px); }
     4520    20% { -webkit-transform: translate(-30px); }
     4521    40% { -webkit-transform: translate(15px); }
     4522    60% { -webkit-transform: translate(-15px); }
     4523    80% { -webkit-transform: translate(8px); }
     4524    100% { -webkit-transform: translate(0px); }
     4525}
     4526@-moz-keyframes wpae_shake {
     4527    0% { -moz-transform: translate(30px); }
     4528    20% { -moz-transform: translate(-30px); }
     4529    40% { -moz-transform: translate(15px); }
     4530    60% { -moz-transform: translate(-15px); }
     4531    80% { -moz-transform: translate(8px); }
     4532    100% { -moz-transform: translate(0px); }
     4533}
     4534@-o-keyframes wpae_shake {
     4535    0% { -o-transform: translate(30px); }
     4536    20% { -o-transform: translate(-30px); }
     4537    40% { -o-transform: translate(15px); }
     4538    60% { -o-transform: translate(-15px); }
     4539    80% { -o-transform: translate(8px); }
     4540    100% { -o-origin-transform: translate(0px); }
     4541}
     4542
     4543.wpae-shake-small {
     4544    -webkit-animation: wpae_shake_small 0.4s 1 linear;
     4545    -moz-animation: wpae_shake_small 0.4s 1 linear;
     4546    -o-animation: wpae_shake_small 0.4s 1 linear;
     4547}
     4548@-webkit-keyframes wpae_shake_small {
     4549    0% { -webkit-transform: translate(10px); }
     4550    20% { -webkit-transform: translate(-10px); }
     4551    40% { -webkit-transform: translate(5px); }
     4552    60% { -webkit-transform: translate(-5px); }
     4553    80% { -webkit-transform: translate(3px); }
     4554    100% { -webkit-transform: translate(0px); }
     4555}
     4556@-moz-keyframes wpae_shake_small {
     4557    0% { -moz-transform: translate(10px); }
     4558    20% { -moz-transform: translate(-10px); }
     4559    40% { -moz-transform: translate(5px); }
     4560    60% { -moz-transform: translate(-5px); }
     4561    80% { -moz-transform: translate(3px); }
     4562    100% { -moz-transform: translate(0px); }
     4563}
     4564@-o-keyframes wpae_shake_small {
     4565    0% { -o-transform: translate(10px); }
     4566    20% { -o-transform: translate(-10px); }
     4567    40% { -o-transform: translate(5px); }
     4568    60% { -o-transform: translate(-5px); }
     4569    80% { -o-transform: translate(3px); }
     4570    100% { -o-origin-transform: translate(0px); }
     4571}
  • wp-all-export/tags/1.3.8/static/js/admin.js

    r2738627 r2830466  
    385385
    386386
    387 
    388     // swither show/hide logic
     387    $('input#enable_real_time_exports').click(function(e){
     388        $('.wpallexport-free-edition-notice.php-rte-upgrade').slideDown();
     389
     390
     391        $('input#enable_real_time_exports').addClass('wpae-shake-small');
     392        setTimeout(function(){
     393            $('input#enable_real_time_exports').prop('checked', false);
     394            $('input#enable_real_time_exports').removeClass('wpae-shake-small');
     395
     396            return false;
     397        },600);
     398
     399        e.preventDefault();
     400        return false;
     401
     402    });
     403
     404    $('input#export_only_new_stuff').click(function(e){
     405        $('.wpallexport-free-edition-notice.only-export-posts-once').slideDown();
     406
     407        $('input#export_only_new_stuff').addClass('wpae-shake-small');
     408        setTimeout(function(){
     409            $('input#export_only_new_stuff').prop('checked', false);
     410            $('input#export_only_new_stuff').removeClass('wpae-shake-small');
     411
     412            return false;
     413        },600);
     414
     415        e.preventDefault();
     416        return false;
     417
     418    });
     419
     420    $('input#export_only_modified_stuff').click(function(e){
     421        $('.wpallexport-free-edition-notice.only-export-modified-posts').slideDown();
     422
     423        $('input#export_only_modified_stuff').addClass('wpae-shake-small');
     424        setTimeout(function(){
     425            $('input#export_only_modified_stuff').prop('checked', false);
     426            $('input#export_only_modified_stuff').removeClass('wpae-shake-small');
     427
     428            return false;
     429        },600);
     430
     431        e.preventDefault();
     432        return false;
     433
     434    });
     435
     436    $('input#allow_client_mode').click(function(e){
     437        $('.wpallexport-free-edition-notice.client-mode-notice').slideDown();
     438
     439        $('input#allow_client_mode').addClass('wpae-shake-small');
     440        setTimeout(function(){
     441            $('input#allow_client_mode').prop('checked', false);
     442            $('input#allow_client_mode').removeClass('wpae-shake-small');
     443
     444            return false;
     445        },600);
     446
     447        e.preventDefault();
     448        return false;
     449
     450    });
     451
     452
     453
     454
     455
     456    // swither show/hide logic
    389457    $('input.switcher-horizontal').change('change', function (e) {
    390458
     
    694762        var postType = $('input[name=cpt]').length ? $('input[name=cpt]').val() : $('input[name=selected_post_type]').val();
    695763
    696         var $export_only_new_stuff = $('input[name=export_only_new_stuff]').val();
    697         if ($('#export_only_new_stuff').length){
    698             $export_only_new_stuff = $('#export_only_new_stuff').is(':checked') ? 1 : 0;
    699         }
     764
    700765
    701766        var $export_only_modified_stuff = $('input[name=export_only_modified_stuff]').val();
     
    713778                'is_confirm_screen' : $('.wpallexport-step-4').length,
    714779                'is_template_screen' : $('.wpallexport-step-3').length,
    715                 'export_only_new_stuff' : $export_only_new_stuff,
     780                'export_only_new_stuff' : 0,
    716781                'export_only_modified_stuff' : $export_only_modified_stuff,
    717782                'export_type' : $('input[name=export_type]').val(),
     
    23552420
    23562421    }
    2357     $('#export_only_new_stuff').click(function(){
    2358         $(this).attr('disabled','disabled');
    2359         $('label[for=export_only_new_stuff]').addClass('loading');
    2360         liveFiltering(null, function(){
    2361             $('label[for=export_only_new_stuff]').removeClass('loading');
    2362             $('#export_only_new_stuff').removeAttr('disabled');
    2363         });
    2364     });
    2365     $('#export_only_modified_stuff').click(function(){
    2366         $(this).attr('disabled','disabled');
    2367         $('label[for=export_only_modified_stuff]').addClass('loading');
    2368         liveFiltering(null, function(){
    2369             $('label[for=export_only_modified_stuff]').removeClass('loading');
    2370             $('#export_only_modified_stuff').removeAttr('disabled');
    2371         });
    2372     });
     2422
    23732423    // [ \Step 3 ( export options ) ]
    23742424
  • wp-all-export/tags/1.3.8/views/admin/export/options.php

    r2654009 r2830466  
    3636                <?php do_action('pmxe_options_header', $this->isWizard, $post); ?>
    3737               
    38                 <div class="ajax-console">                 
     38                <div class="ajax-console">
    3939                    <?php if ($this->errors->get_error_codes()): ?>
    4040                        <?php $this->error() ?>
  • wp-all-export/tags/1.3.8/views/admin/export/options/settings.php

    r2738627 r2830466  
    1313                <table class="form-table" style="max-width:none;">
    1414                    <tr>
    15                         <td colspan="3">                                                                                                   
     15                        <td colspan="3">
     16
    1617                            <div class="input" style="margin:5px 0px;">
    1718                                <label for="records_per_request"><?php esc_html_e('In each iteration, process', 'wp_all_export_plugin');?> <input type="text" name="records_per_iteration" class="wp_all_export_sub_input" style="width: 40px;" value="<?php echo esc_attr($post['records_per_iteration']) ?>" /> <?php esc_html_e('records', 'wp_all_export_plugin'); ?></label>
    1819                                <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('WP All Export must be able to process this many records in less than your server\'s timeout settings. If your export fails before completion, to troubleshoot you should lower this number.', 'wp_all_export_plugin'); ?>">?</a>
    1920                            </div>
    20                             <div class="input" style="margin:5px 0px;">
     21
     22                            <?php
     23                            $cpt_initial = $post['cpt'];
     24                            $cpt_name = is_array($post['cpt']) ? reset($post['cpt']) : $post['cpt'];
     25                            if ('advanced' !== $post['export_type']) {
     26                                if ($cpt_name !== 'taxonomies') {
     27
     28                                    if ($cpt_name === 'users') {
     29                                        $cpt_name = 'user';
     30                                    }
     31
     32                                    $display_verb = 'created';
     33                                    $display_cpt_name = $cpt_name;
     34                                    $tooltip_cpt_name = strtolower(wp_all_export_get_cpt_name($cpt_initial));
     35
     36                                    if ($display_cpt_name === 'shop_order') {
     37                                        $display_cpt_name = 'WooCommerce Order';
     38                                        $display_verb = 'completed';
     39                                    }
     40
     41                                    if ($display_cpt_name === 'shop_customer') {
     42                                        $display_cpt_name = 'WooCommerce Customer';
     43                                        $display_verb = 'created';
     44                                    }
     45
     46                                    if ($display_cpt_name === 'custom_wpae-gf-addon') {
     47                                        $display_cpt_name = 'Gravity Forms Entry';
     48                                    }
     49
     50                                    if ($display_cpt_name === 'comments') {
     51                                        $display_cpt_name = 'comment';
     52                                    }
     53                                }
     54                            }
     55
     56                            ?>
     57                            <div class="input">
     58
     59                                <input type="hidden" id="wpae-post-name" value="<?php echo $display_cpt_name; ?>" />
     60                                <input type="hidden" name="enable_real_time_exports" value="0"/>
     61                                <input type="checkbox"
     62                                       id="enable_real_time_exports" <?php if ((isset($post['xml_template_type']) && $post['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) || $cpt_name === 'shop_customer') { ?> disabled="disabled" <?php } ?>
     63                                       name="enable_real_time_exports"
     64                                       value="1"  />
     65                                <label for="enable_real_time_exports"><?php esc_html_e('Export each ' . esc_html($display_cpt_name) . ' in real time as they are ' . esc_html($display_verb), 'wp_all_export_plugin') ?></label>
     66                                <span>
     67                                            <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;"
     68                                                <?php
     69                                                if (isset($post['xml_template_type']) && $post['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) { ?>
     70                                                    title="<?php esc_html_e('This feature it not available for Google Merchants Exports.', 'wp_all_export_plugin'); ?>"
     71                                                <?php } else if ($cpt_name === 'shop_customer')
     72                                                {
     73                                                    ?>
     74
     75                                                    title="<?php esc_html_e('This feature it not available for Customer Exports.', 'wp_all_export_plugin'); ?>"
     76                                                <?php } else { ?>
     77                                               title="<?php esc_html_e('This will export ' . esc_html(strtolower($tooltip_cpt_name)) . ' one by one, in real time, as they are ' . esc_html($display_verb) . '.'); ?> <br/><br/><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>">
     78                                            <?php } ?>>?</a>
     79                                </span>
     80
     81                                <div class="wpallexport-free-edition-notice php-rte-upgrade" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     82                                    <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=real-time-exports"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to export each '. $display_cpt_name .' in real time.','wp_all_export_plugin');?></a>
     83                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     84                                </div>
     85                            </div>
     86
     87
     88
     89                            <div class="input" style="margin:5px 0px;">
    2190                                <input type="hidden" name="export_only_new_stuff" value="0" />
    22                                 <input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" <?php echo $post['export_only_new_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
    23                                 <label for="export_only_new_stuff" disabled="disabled"><?php printf(esc_html__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt']))); ?></label>
     91                                <input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" />
     92                                <label for="export_only_new_stuff"><?php printf(esc_html__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt']))); ?></label>
    2493                                <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have not been previously exported.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
    25                             </div>
     94
     95                                <div class="wpallexport-free-edition-notice only-export-posts-once" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     96                                    <a class="upgrade_link" target="_blank"
     97                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=export-only-new-stuff">
     98                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     99                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to only export '.  $noun .' once.','wp_all_export_plugin');?></a>
     100                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     101                                </div>
     102                            </div>
    26103                            <div class="input" style="margin:5px 0px;">
    27104                                <input type="hidden" name="export_only_modified_stuff" value="0" />
    28                                 <input type="checkbox" id="export_only_modified_stuff" name="export_only_modified_stuff" value="1" <?php echo $post['export_only_modified_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
     105                                <input type="checkbox" id="export_only_modified_stuff" name="export_only_modified_stuff" value="1" <?php echo $post['export_only_modified_stuff'] ? 'checked="checked"': '' ?> <?php if (is_array($post['cpt']) && $post['cpt'][0] === 'users') {?> disabled="disabled" <?php }?> />
    29106                                <label for="export_only_modified_stuff" disabled="disabled"><?php printf(esc_html__('Only export %s that have been modified since last export', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'], 2, $post))); ?></label>
    30                                 <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have been modified since last export run.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
    31                             </div>
     107
     108                                <?php
     109                                if(is_array($post['cpt']) && $post['cpt'][0] === 'users') {
     110                                    ?>
     111                                    <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('This feature is not available for user exports.', 'wp_all_export_plugin'); ?>">?</a>
     112
     113                                    <?php
     114                                } else {
     115                                ?>
     116                                    <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have been modified since last export run.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
     117                                <?php
     118                                }
     119                                ?>
     120                                <div class="wpallexport-free-edition-notice only-export-modified-posts" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     121                                    <a class="upgrade_link" target="_blank"
     122                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=export-only-modified-stuff">
     123                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     124                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to only export '.  $noun .' that have been modified since last export.','wp_all_export_plugin');?></a>
     125                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     126                                </div>
     127
     128                            </div>
    32129
    33130                            <div class="input" style="margin:5px 0px;">
     
    55152                            <div class="input" style="margin:5px 0px;">
    56153                                <input type="hidden" name="allow_client_mode" value="0"/>
    57                                 <input type="checkbox" disabled="disabled" id="allow_client_mode" name="allow_client_mode"
     154                                <input type="checkbox" id="allow_client_mode" name="allow_client_mode"
    58155                                       value="1" <?php echo (isset($post['allow_client_mode']) && $post['allow_client_mode']) ? 'checked="checked"' : '' ?> />
    59156                                <label for="allow_client_mode"><?php esc_html_e('Allow non-admins to run this export in Client Mode', 'wp_all_export_plugin') ?></label>
     
    61158                                    <a href="#help" class="wpallexport-help" style="position: relative; top: 0;" title="<?php esc_html_e('When enabled, users with access to Client Mode will be able to run this export and download the export file. Go to All Export > Settings to give users access to Client Mode. <br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>'); ?>">?</a>
    62159                                </span>
     160
     161                                <div class="wpallexport-free-edition-notice client-mode-notice" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     162                                    <a class="upgrade_link" target="_blank"
     163                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=client-mode">
     164                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     165                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to allow non-admins to run this export in Client Mode.','wp_all_export_plugin');?></a>
     166                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     167                                </div>
    63168                            </div>
    64169                            <br>
  • wp-all-export/tags/1.3.8/views/admin/manage/index.php

    r2738627 r2830466  
    242242                                                // Disable scheduling options for ACF exports if ACF Export Add-On isn't enabled
    243243                                            } else if (
    244                                                 ((!in_array('comments', $item['options']['cpt']) || !in_array('shop_review', $item['options']['cpt'])) && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive()) ||
     244                                                (isset($item['options']['cpt']) && (!in_array('comments', $item['options']['cpt']) || !in_array('shop_review', $item['options']['cpt'])) && isset($item['options']['cc_type']) && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive()) ||
    245245                                                ($item['options']['export_type'] == 'advanced' && $item['options']['wp_query_selector'] != 'wp_comment_query' && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive())
    246246                                            ) {
  • wp-all-export/tags/1.3.8/views/admin/settings/index.php

    r2654009 r2830466  
    44}
    55?>
    6 <style type="text/css">
    7     .wpae-shake {
    8         -webkit-animation: wpae_shake 0.4s 1 linear;
    9         -moz-animation: wpae_shake 0.4s 1 linear;
    10         -o-animation: wpae_shake 0.4s 1 linear;
    11     }
    12     @-webkit-keyframes wpae_shake {
    13         0% { -webkit-transform: translate(30px); }
    14         20% { -webkit-transform: translate(-30px); }
    15         40% { -webkit-transform: translate(15px); }
    16         60% { -webkit-transform: translate(-15px); }
    17         80% { -webkit-transform: translate(8px); }
    18         100% { -webkit-transform: translate(0px); }
    19     }
    20     @-moz-keyframes wpae_shake {
    21         0% { -moz-transform: translate(30px); }
    22         20% { -moz-transform: translate(-30px); }
    23         40% { -moz-transform: translate(15px); }
    24         60% { -moz-transform: translate(-15px); }
    25         80% { -moz-transform: translate(8px); }
    26         100% { -moz-transform: translate(0px); }
    27     }
    28     @-o-keyframes wpae_shake {
    29         0% { -o-transform: translate(30px); }
    30         20% { -o-transform: translate(-30px); }
    31         40% { -o-transform: translate(15px); }
    32         60% { -o-transform: translate(-15px); }
    33         80% { -o-transform: translate(8px); }
    34         100% { -o-origin-transform: translate(0px); }
    35     }
    36 </style>
    376
    387<form class="settings" method="post" action="<?php echo esc_url($this->baseUrl); ?>" enctype="multipart/form-data">
  • wp-all-export/tags/1.3.8/wp-all-export.php

    r2740070 r2830466  
    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.7
     6Version: 1.3.8
    77Author: Soflyy
    88*/
     
    6060    define('PMXE_PREFIX', 'pmxe_');
    6161
    62     define('PMXE_VERSION', '1.3.7');
     62    define('PMXE_VERSION', '1.3.8');
    6363
    6464    define('PMXE_ASSETS_VERSION', '-1.0.2');
  • wp-all-export/trunk/actions/pmxe_after_export.php

    r1826194 r2830466  
    111111        {
    112112
    113             $exportOptions['split_files_list'] = array();                           
     113            $exportOptions['split_files_list'] = array();
    114114
    115115            if ( @file_exists($filepath) )
    116             {                   
    117 
    118                 switch ($export->options['export_to']) 
     116            {
     117
     118                switch ($export->options['export_to'])
    119119                {
    120120                    case 'xml':
     
    153153                        }
    154154
    155            
     155
    156156                        $records_count = 0;
    157157                        $chunk_records_count = 0;
     
    205205                                if ($rowCount > 0) {
    206206                                    fclose($out);
    207                                 }                               
     207                                }
    208208                                $outputFile = str_replace(basename($filepath), str_replace('.csv', '', basename($filepath)) . '-' . $fileCount++ . '.csv', $filepath);
    209209                                if ( ! in_array($outputFile, $exportOptions['split_files_list']))
    210210                                    $exportOptions['split_files_list'][] = $outputFile;
    211211
    212                                 $out = fopen($outputFile, 'w');                             
    213                             }                           
    214                             if ($data){             
     212                                $out = fopen($outputFile, 'w');
     213                            }
     214                            if ($data){
    215215                                if (($rowCount % $splitSize) == 0) {
    216216                                    fputcsv($out, $headers);
    217                                 }               
     217                                }
    218218                                fputcsv($out, $data);
    219219                            }
    220220                            $rowCount++;
    221221                        }
    222                         fclose($in);   
    223                         fclose($out);   
    224 
    225                         // convert splitted files into XLS format
    226                         if ( ! empty($exportOptions['split_files_list']) && ! empty($export->options['export_to_sheet']) and $export->options['export_to_sheet'] != 'csv' )
    227                         {
    228                             require_once PMXE_Plugin::ROOT_DIR . '/classes/PHPExcel/IOFactory.php';
    229 
    230                             foreach ($exportOptions['split_files_list'] as $key => $file)
    231                             {
    232                                 $objReader = PHPExcel_IOFactory::createReader('CSV');
    233                                 // If the files uses a delimiter other than a comma (e.g. a tab), then tell the reader
    234                                 $objReader->setDelimiter($export->options['delimiter']);
    235                                 // If the files uses an encoding other than UTF-8 or ASCII, then tell the reader
    236                                 $objPHPExcel = $objReader->load($file);
    237                                 switch ($export->options['export_to_sheet']){
    238                                     case 'xls':
    239                                         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
    240                                         $objWriter->save(str_replace(".csv", ".xls", $file));
    241                                         $exportOptions['split_files_list'][$key] = str_replace(".csv", ".xls", $file);
    242                                         break;
    243                                     case 'xlsx':
    244                                         $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    245                                         $objWriter->save(str_replace(".csv", ".xlsx", $file));
    246                                         $exportOptions['split_files_list'][$key] = str_replace(".csv", ".xlsx", $file);
    247                                         break;
    248                                 }
    249                                 @unlink($file);
    250                             }
    251                         }
     222                        fclose($in);
     223                        fclose($out);
    252224
    253225                        break;
    254                    
     226
    255227                    default:
    256                        
     228
    257229                        break;
    258                 }               
     230                }
    259231
    260232                $export->set(array('options' => $exportOptions))->save();
    261             }   
    262         }   
    263 
    264         // convert CSV to XLS
    265         if ( @file_exists($filepath) and $export->options['export_to'] == 'csv' && ! empty($export->options['export_to_sheet']) and $export->options['export_to_sheet'] != 'csv')
    266         {           
    267            
    268             require_once PMXE_Plugin::ROOT_DIR . '/classes/PHPExcel/IOFactory.php';
    269 
    270             $objReader = PHPExcel_IOFactory::createReader('CSV');
    271             // If the files uses a delimiter other than a comma (e.g. a tab), then tell the reader
    272             $objReader->setDelimiter($export->options['delimiter']);
    273             // If the files uses an encoding other than UTF-8 or ASCII, then tell the reader
    274 
    275             $objPHPExcel = $objReader->load($filepath);
    276 
    277             switch ($export->options['export_to_sheet']) {
    278                 case 'xls':
    279                     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');
    280                     $objWriter->save(str_replace(".csv", ".xls", $filepath));
    281                     @unlink($filepath);
    282                     $filepath = str_replace(".csv", ".xls", $filepath);
    283                     break;
    284                 case 'xlsx':
    285                     $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
    286                     $objWriter->save(str_replace(".csv", ".xlsx", $filepath));
    287                     @unlink($filepath);
    288                     $filepath = str_replace(".csv", ".xlsx", $filepath);
    289                     break;
    290             }
    291 
    292             $exportOptions = $export->options;
    293             $exportOptions['filepath'] = wp_all_export_get_relative_path($filepath);
    294             $export->set(array('options' => $exportOptions))->save();
    295 
    296             $is_secure_import = PMXE_Plugin::getInstance()->getOption('secure');
    297 
    298             if ( ! $is_secure_import ){
    299                 $wp_uploads = wp_upload_dir();
    300                 $wp_filetype = wp_check_filetype(basename($filepath), null );
    301                 $attachment_data = array(
    302                     'guid' => $wp_uploads['baseurl'] . '/' . _wp_relative_upload_path( $filepath ),
    303                     'post_mime_type' => $wp_filetype['type'],
    304                     'post_title' => preg_replace('/\.[^.]+$/', '', basename($filepath)),
    305                     'post_content' => '',
    306                     'post_status' => 'inherit'
    307                 ); 
    308                 if ( ! empty($export->attch_id) )
    309                 {
    310                     $attach_id = $export->attch_id;                     
    311                     $attachment = get_post($attach_id);
    312                     if ($attachment)
    313                     {
    314                         update_attached_file( $attach_id, $filepath );
    315                         wp_update_attachment_metadata( $attach_id, $attachment_data ); 
    316                     }
    317                     else
    318                     {
    319                         $attach_id = wp_insert_attachment( $attachment_data, PMXE_Plugin::$session->file );             
    320                     }
    321                 }
    322233            }
    323 
    324234        }
    325235
     
    328238        {
    329239            $exportOptions = $export->options;
    330             $exportOptions['current_filepath'] = str_replace(basename($filepath), '', $filepath) . 'current-' . basename($filepath);                       
     240            $exportOptions['current_filepath'] = str_replace(basename($filepath), '', $filepath) . 'current-' . basename($filepath);
    331241            $export->set(array('options' => $exportOptions))->save();
    332242        }
    333        
     243
    334244        $generateBundle = apply_filters('wp_all_export_generate_bundle', true);
    335245
     
    350260        }
    351261
    352 
    353         // send exported data to zapier.com
    354         $subscriptions = get_option('zapier_subscribe', array());       
    355         if ( ! empty($subscriptions) and empty($export->parent_id))
    356         {           
    357 
    358             $wp_uploads = wp_upload_dir();
    359 
    360             $fileurl = str_replace($wp_uploads['basedir'], $wp_uploads['baseurl'], $filepath);     
    361 
    362             $response = array(             
    363                 'website_url' => home_url(),
    364                 'export_id' => $export->id,
    365                 'export_name' => $export->friendly_name,
    366                 'file_name' => basename($filepath),
    367                 'file_type' => wp_all_export_get_export_format($export->options),
    368                 'post_types_exported' => empty($export->options['cpt']) ? $export->options['wp_query'] : implode($export->options['cpt'], ','),
    369                 'export_created_date' => $export->registered_on,
    370                 'export_last_run_date' => date('Y-m-d H:i:s'),
    371                 'export_trigger_type' => empty($_GET['export_key']) ? 'manual' : 'cron',
    372                 'records_exported' => $export->exported,
    373                 'export_file' => ''
    374             );
    375 
    376             if (file_exists($filepath))
    377             {
    378                 $response['export_file_url'] = $fileurl;
    379                 $response['status'] = 200;
    380                 $response['message'] = 'OK';   
    381             }
    382             else
    383             {
    384                 $response['export_file_url'] = '';
    385                 $response['status'] = 300;
    386                 $response['message'] = 'File doesn\'t exist';   
    387             }
    388 
    389             $response = apply_filters('wp_all_export_zapier_response', $response);
    390 
    391             foreach ($subscriptions as $zapier)
    392             {
    393                 if (empty($zapier['target_url'])) continue;
    394 
    395                 wp_remote_post( $zapier['target_url'], array(
    396                     'method' => 'POST',
    397                     'timeout' => 45,
    398                     'redirection' => 5,
    399                     'httpversion' => '1.0',
    400                     'blocking' => true,
    401                     'headers' => array(
    402                             'Content-Type' => 'application/json'
    403                         ),
    404                     'body' => "[".json_encode($response)."]",
    405                     'cookies' => array()
    406                     )
    407                 );
    408             }           
    409         }
    410 
    411         // clean session
     262        // clean session
    412263        if ( ! empty(PMXE_Plugin::$session) and PMXE_Plugin::$session->has_session() )
    413264        {
    414             PMXE_Plugin::$session->clean_session( $export->id );               
    415         }
    416     }   
     265            PMXE_Plugin::$session->clean_session( $export->id );
     266        }
     267    }
    417268}
  • wp-all-export/trunk/actions/wp_ajax_save_scheduling.php

    r1826194 r2830466  
    1111
    1212    if (!check_ajax_referer('wp_all_export_secure', 'security', false)) {
    13         exit(__('Security check', 'wp_all_export_plugin'));
     13        exit(esc_html__('Security check', 'wp_all_export_plugin'));
    1414    }
    1515
    1616    if (!current_user_can(PMXE_Plugin::$capabilities)) {
    17         exit(__('Security check', 'wp_all_export_plugin'));
     17        exit(esc_html__('Security check', 'wp_all_export_plugin'));
    1818    }
    1919
  • wp-all-export/trunk/actions/wp_ajax_scheduling_dialog_content.php

    r2738627 r2830466  
    55
    66    if (!check_ajax_referer('wp_all_export_secure', 'security', false)) {
    7         exit(json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))));
     7        exit(json_encode(array('html' => esc_html__('Security check', 'wp_all_export_plugin'))));
    88    }
    99
    1010    if (!current_user_can(PMXE_Plugin::$capabilities)) {
    11         exit(json_encode(array('html' => __('Security check', 'wp_all_export_plugin'))));
     11        exit(json_encode(array('html' => esc_html__('Security check', 'wp_all_export_plugin'))));
    1212    }
    1313
     
    1818        throw new Exception('Export not found');
    1919    }
    20     $post = $export->options;
     20    $schedulingExportOptions = $export->options;
    2121
    2222    $hasActiveLicense = PMXE_Plugin::hasActiveSchedulingLicense();
     
    2828    $cron_job_key = PMXE_Plugin::getInstance()->getOption('cron_job_key');
    2929
    30     if (!isset($post['scheduling_enable'])) {
    31         $post['scheduling_enable'] = 0;
     30    if (!isset($schedulingExportOptions['scheduling_enable'])) {
     31        $schedulingExportOptions['scheduling_enable'] = 0;
    3232    }
    3333
    34     if (!isset($post['scheduling_timezone'])) {
    35         $post['scheduling_timezone'] = 'UTC';
     34    if (!isset($schedulingExportOptions['scheduling_timezone'])) {
     35        $schedulingExportOptions['scheduling_timezone'] = 'UTC';
    3636    }
    3737
    38     if (!isset($post['scheduling_run_on'])) {
    39         $post['scheduling_run_on'] = 'weekly';
     38    if (!isset($schedulingExportOptions['scheduling_run_on'])) {
     39        $schedulingExportOptions['scheduling_run_on'] = 'weekly';
    4040    }
    4141
    42     if (!isset($post['scheduling_times'])) {
    43         $post['scheduling_times'] = array();
     42    if (!isset($schedulingExportOptions['scheduling_times'])) {
     43        $schedulingExportOptions['scheduling_times'] = array();
    4444    }
    4545    ?>
     
    196196        #add-subscription-field {
    197197            position: absolute;
    198             left: -155px;
     198            left: -152px;
    199199            top: -1px;
    200200            height: 46px;
     
    249249            margin-left: 26px;
    250250        }
     251
    251252        .chosen-container .chosen-results {
    252253
    253254            margin: 0 4px 4px 0 !important;
     255        }
     256
     257        .unable-to-connect {
     258            color: #f2b03d;
    254259        }
    255260    </style>
     
    270275                        }
    271276                    }
     277
     278                    updateSaveButtonState = function() {
     279                        var howToRun = $('input[name="scheduling_enable"]:checked').val();
     280
     281                        if(parseInt(howToRun) === 1 && !hasActiveLicense) {
     282                            $('.save-changes').addClass('disabled');
     283                        } else {
     284                            $('.save-changes').removeClass('disabled');
     285                        }
     286                    };
     287
     288                    updateSaveButtonState();
     289
     290                    $('input[name="scheduling_enable"]').change(function(){
     291                        updateSaveButtonState();
     292                    });
     293
    272294
    273295                    window.pmxeValidateSchedulingForm = function () {
     
    427449                            if (!$(this).data('iunderstand') && schedulingEnable) {
    428450                                $('#no-subscription').slideDown();
    429                                 $(this).find('.save-text').html('<?php echo _e('I Understand');?>');
     451                                $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
    430452                                $(this).find('.save-text').css('left', '100px');
    431453                                $(this).data('iunderstand', 1);
     
    491513                    });
    492514
    493                     <?php if($post['scheduling_timezone'] == 'UTC') {
     515                    <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    494516                    ?>
    495517                    var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    496518
    497                     if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
     519                    if ($('#timezone').find("option:contains('" + timeZone + "')").length != 0) {
    498520                        $('#timezone').trigger("chosen:updated");
    499521                        $('#timezone').val(timeZone);
    500522                        $('#timezone').trigger("chosen:updated");
    501                     }else{
     523                    } else {
    502524                        var parts = timeZone.split('/');
    503                         var lastPart = parts[parts.length-1];
    504                         var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
     525                        var lastPart = parts[parts.length - 1];
     526                        var opt = $('#timezone').find("option:contains('" + lastPart + "')");
    505527
    506528                        $('#timezone').val(opt.val());
     
    538560                            var license = $('#add-subscription-field').val();
    539561                            $.ajax({
    540                                 url: ajaxurl + '?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     562                                url: ajaxurl + '?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    541563                                type: "POST",
    542564                                data: {
     
    580602                                        setTimeout(function () {
    581603                                            $('#add-subscription-field').animate({width: '140px'}, 225);
    582                                             $('#add-subscription-field').animate({left: '-155px'}, 225);
     604                                            $('#add-subscription-field').animate({left: '-152px'}, 225);
    583605                                        }, 300);
    584606
     
    636658    <?php require __DIR__ . '/../src/Scheduling/views/CommonJs.php'; ?>
    637659    <div id="post-preview" class="wpallexport-preview wpallexport-scheduling-dialog">
    638         <p class="wpallexport-preview-title"><strong>Scheduling Options</strong></p>
     660        <p class="wpallexport-preview-title"><strong>Scheduling Options for Export ID
     661                #<?php echo intval($export_id); ?></strong></p>
    639662        <div class="wpallexport-preview-content" style="max-height: 700px; overflow: visible;">
    640663
     
    642665                <label>
    643666                    <input type="radio" name="scheduling_enable"
    644                            value="0" <?php if ((isset($post['scheduling_enable']) && $post['scheduling_enable'] == 0) || !isset($post['scheduling_enable'])) { ?> checked="checked" <?php } ?>/>
     667                           value="0" <?php if ((isset($schedulingExportOptions['scheduling_enable']) && $schedulingExportOptions['scheduling_enable'] == 0) || !isset($schedulingExportOptions['scheduling_enable'])) { ?> checked="checked" <?php } ?>/>
    645668                    <h4 style="display: inline-block;"><?php esc_html_e('Do Not Schedule'); ?></h4>
    646669                </label>
     
    649672                <label>
    650673                    <input type="radio" name="scheduling_enable"
    651                            value="1" <?php if ($post['scheduling_enable'] == 1) { ?> checked="checked" <?php } ?>/>
     674                           value="1" <?php if ($schedulingExportOptions['scheduling_enable'] == 1) { ?> checked="checked" <?php } ?>/>
    652675                    <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    653676                        <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    654                                                             <?php include __DIR__ . '/../src/Scheduling/views/ConnectionIcon.php'; ?>
    655                                                         </span>
    656                         <?php if($post['scheduling_enable'] == 1) { ?>
     677                                                        <?php include __DIR__ . '/../src/Scheduling/views/ConnectionIcon.php'; ?>
     678                                                    </span>
     679                        <?php if($schedulingExportOptions['scheduling_enable'] == 1) { ?>
    657680                            <?php if (!$scheduling->checkConnection()) { ?>
    658681                                <span class="wpai-license" style="margin-left: 8px; font-weight: normal; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?>"><span class="unable-to-connect">Unable to connect, please contact support.</span></span>
     
    669692                </div>
    670693                <div id="automatic-scheduling"
    671                      style="margin-left: 21px; <?php if ($post['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
     694                     style="margin-left: 21px; <?php if ($schedulingExportOptions['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
    672695                    <div>
    673696                        <div class="input">
    674697                            <label style="color: rgb(68,68,68);">
    675698                                <input
    676                                         type="radio" <?php if (isset($post['scheduling_run_on']) && $post['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
     699                                        type="radio" <?php if (isset($schedulingExportOptions['scheduling_run_on']) && $schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
    677700                                        name="scheduling_run_on" value="weekly"
    678701                                        checked="checked"/> <?php esc_html_e('Every week on...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    680703                        </div>
    681704                        <input type="hidden" style="width: 500px;" name="scheduling_weekly_days"
    682                                value="<?php echo esc_attr($post['scheduling_weekly_days']); ?>" id="weekly_days"/>
     705                               value="<?php echo esc_attr($schedulingExportOptions['scheduling_weekly_days']); ?>"
     706                               id="weekly_days"/>
    683707                        <?php
    684                         if (isset($post['scheduling_weekly_days'])) {
    685                             $weeklyArray = explode(',', $post['scheduling_weekly_days']);
     708                        if (isset($schedulingExportOptions['scheduling_weekly_days'])) {
     709                            $weeklyArray = explode(',', $schedulingExportOptions['scheduling_weekly_days']);
    686710                        } else {
    687711                            $weeklyArray = array();
     
    689713                        ?>
    690714                        <ul class="days-of-week" id="weekly"
    691                             style="<?php if ($post['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
     715                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
    692716                            <li data-day="0" <?php if (in_array('0', $weeklyArray)) { ?> class="selected" <?php } ?>>
    693717                                Mon
     
    718742                            <label style="color: rgb(68,68,68); margin-top: 5px;">
    719743                                <input
    720                                         type="radio" <?php if (isset($post['scheduling_run_on']) && $post['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
     744                                        type="radio" <?php if (isset($schedulingExportOptions['scheduling_run_on']) && $schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
    721745                                        name="scheduling_run_on"
    722746                                        value="monthly"/> <?php esc_html_e('Every month on the first...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    724748                        </div>
    725749                        <input type="hidden" name="scheduling_monthly_days"
    726                                value="<?php if(isset($post['scheduling_monthly_days'])) echo esc_attr($post['scheduling_monthly_days']); ?>" id="monthly_days"/>
     750                               value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>"
     751                               id="monthly_days"/>
    727752                        <?php
    728                         if (isset($post['scheduling_monthly_days'])) {
    729                             $monthlyArray = explode(',', $post['scheduling_monthly_days']);
     753                        if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     754                            $monthlyArray = explode(',', $schedulingExportOptions['scheduling_monthly_days']);
    730755                        } else {
    731756                            $monthlyArray = array();
     
    733758                        ?>
    734759                        <ul class="days-of-week" id="monthly"
    735                             style="<?php if ($post['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
     760                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
    736761                            <li data-day="0" <?php if (in_array('0', $monthlyArray)) { ?> class="selected" <?php } ?>>
    737762                                Mon
     
    765790
    766791                        <div id="times" style="margin-bottom: 10px;">
    767                             <?php if (isset($post['scheduling_times']) && is_array($post['scheduling_times'])) {
    768                                 foreach ($post['scheduling_times'] as $time) { ?>
     792                            <?php if (isset($schedulingExportOptions['scheduling_times']) && is_array($schedulingExportOptions['scheduling_times'])) {
     793                                foreach ($schedulingExportOptions['scheduling_times'] as $time) { ?>
    769794
    770795                                    <?php if ($time) { ?>
     
    781806
    782807                            $timezoneValue = false;
    783                             if ($post['scheduling_timezone']) {
    784                                 $timezoneValue = $post['scheduling_timezone'];
     808                            if ($schedulingExportOptions['scheduling_timezone']) {
     809                                $timezoneValue = $schedulingExportOptions['scheduling_timezone'];
    785810                            }
    786811
     
    832857                                <p><?php esc_html_e('Have a license?'); ?>
    833858                                    <a href="#"
    834                                        id="add-subscription"><?php esc_html_e('Register this site.'); ?></a> <?php _e('Questions?'); ?>
     859                                       id="add-subscription"><?php esc_html_e('Register this site.'); ?></a> <?php esc_html_e('Questions?'); ?>
    835860                                    <a href="#" class="help_scheduling">Read more.</a>
    836861                                </p>
  • wp-all-export/trunk/actions/wp_ajax_wpae_filtering_count.php

    r2654009 r2830466  
    131131
    132132            $exportQuery = eval('return new WP_Query(array(' . PMXE_Plugin::$session->get('wp_query') . ', \'offset\' => 0, \'posts_per_page\' => 10 ));');
     133
     134            // Clear LIKE, NOT LIKE, and 's' percent placeholders for request and orderby.
     135            global $wpdb;
     136            $exportQuery->request = $wpdb->remove_placeholder_escape($exportQuery->request);
     137
     138            foreach( $exportQuery->query_vars['search_orderby_title'] as $key => $value ){
     139                $exportQuery->query_vars['search_orderby_title'][$key] = $wpdb->remove_placeholder_escape($value);
     140            }
     141
    133142            if (!empty($exportQuery->found_posts)) {
    134143                $foundRecords = $exportQuery->found_posts;
  • wp-all-export/trunk/config/options.php

    r2267563 r2830466  
    55 */
    66$config = array(
    7     "info_api_url" => "http://www.wpallimport.com",
     7    "info_api_url" => "https://www.wpallimport.com",
    88    "dismiss" => 0,
    99    "dismiss_manage_top" => 0,
  • wp-all-export/trunk/libraries/XmlExportCustomRecord.php

    r2654009 r2830466  
    3636        }
    3737
    38         public static function prepare_data($record, $exportOptions, $xmlWriter = false, $implode_delimiter, $preview) {
     38        public static function prepare_data($record, $exportOptions, $xmlWriter, $implode_delimiter, $preview) {
    3939            $article = array();
    4040
  • wp-all-export/trunk/libraries/XmlExportMediaGallery.php

    r2121544 r2830466  
    283283            case 'image_title':
    284284                $field_options = json_decode($options['cc_options'][$ID], true);
    285                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     285                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    286286                {                   
    287287                    $templateOptions['set_image_meta_title'] = 1;               
     
    297297            case 'image_caption':
    298298                $field_options = json_decode($options['cc_options'][$ID], true);
    299                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     299                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    300300                {
    301301                    $templateOptions['set_image_meta_caption'] = 1;             
     
    311311            case 'image_description':
    312312                $field_options = json_decode($options['cc_options'][$ID], true);
    313                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     313                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    314314                {
    315315                    $templateOptions['set_image_meta_description'] = 1;             
     
    325325            case 'image_alt':
    326326                $field_options = json_decode($options['cc_options'][$ID], true);
    327                 if ( (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
     327                if ( isset($field_options['is_export_featured']) && (int) $field_options['is_export_featured'] == (int) self::$is_include_feature_meta && (int) $field_options['is_export_attached'] == (int) self::$is_include_gallery_meta )
    328328                {
    329329                    $templateOptions['set_image_meta_alt'] = 1;         
  • wp-all-export/trunk/readme.txt

    r2811263 r2830466  
    33Requires at least: 5.0
    44Tested up to: 6.1
    5 Stable tag: 1.3.7
     5Stable tag: 1.3.8
    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
     
    8686[Export WordPress Users to CSV/XML](https://wordpress.org/plugins/export-wp-users-xml-csv/)
    8787
     88= Related Tutorials =
     89[How to Export WooCommerce Products to Google Merchant Center](https://www.wpallimport.com/documentation/how-to-export-woocommerce-products-to-google-merchant-center/)
     90
    8891== Premium Support ==
    8992Upgrade to the Pro edition of WP All Export for premium support.
     
    99102
    100103== Changelog ==
     104
     105= 1.3.8 =
     106* improvement: only contact Scheduling service if a Scheduling license is set
     107* bug fix: enable use of 's', 'LIKE' and 'NOT LIKE' in WP_Query exports
    101108
    102109= 1.3.7 =
  • wp-all-export/trunk/src/App/Service/ScheduledExport.php

    r2654009 r2830466  
    33namespace Wpae\App\Service;
    44
     5
     6use Wpae\App\Service\Addons\AddonNotFoundException;
    57
    68class ScheduledExport
     
    2729            return new JsonResponse(array(
    2830                'status' => 403,
    29                 'message' => sprintf(esc_html__('Export #%s already triggered. Request skipped.', 'wp_all_export_plugin'), $export->id)
     31                'message' => sprintf('Export #%s already triggered. Request skipped.', $export->id)
    3032            ));
    3133        }
     
    7072            ));
    7173        } elseif ((int)$export->triggered and !(int)$export->processing) {
    72             $response = $export->set(array('canceled' => 0))->execute($logger, true);
    73 
     74            try {
     75                $response = $export->set(array('canceled' => 0))->execute($logger, true);
     76            } catch (AddonNotFoundException $e) {
     77                die($e->getMessage());
     78            }
    7479            if (!(int)$export->triggered and !(int)$export->processing) {
    7580
  • wp-all-export/trunk/src/Scheduling/Scheduling.php

    r2615815 r2830466  
    8484    public function handleScheduling($id, $post)
    8585    {
     86
     87        if (!$this->checkLicense()) {
     88            return false;
     89        }
     90
    8691        $schedulingEnabled = $post['scheduling_enable'];
    8792   
     
    213218    }
    214219
     220    public function updateApiKey($elementId, $newKey) {
     221
     222        $remoteSchedule = $this->getSchedule($elementId);
     223
     224        if ($remoteSchedule) {
     225            $this->schedulingApi->updateScheduleKey($remoteSchedule->id, $newKey);
     226        }
     227    }
     228
    215229    /**
    216230     * TODO: Uglier but simpler method, if this gets in the way, extract to a class
  • wp-all-export/trunk/src/Scheduling/SchedulingApi.php

    r2307882 r2830466  
    148148    }
    149149
     150    public function updateScheduleKey($remoteScheduleId, $newKey)
     151    {
     152        wp_remote_request(
     153            $this->getApiUrl('schedules/' . $remoteScheduleId . '/key'),
     154            array(
     155                'method' => 'POST',
     156                'headers' => $this->getHeaders(),
     157                'body' => json_encode(['key' => $newKey])
     158
     159            )
     160        );
     161    }
     162
    150163    private function getHeaders()
    151164    {
  • wp-all-export/trunk/src/Scheduling/views/CommonJs.php

    r1826194 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<script type="text/javascript">
    27    (function ($) {
  • wp-all-export/trunk/src/Scheduling/views/ConnectionIcon.php

    r2738627 r2830466  
    11<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
    25$scheduling = \Wpae\Scheduling\Scheduling::create();
    36?>
    47<span class="wpai-no-license" <?php if ($scheduling->checkLicense()) { ?> style="display: none;" <?php } ?> >
    58
    6     <a href="#" style="z-index: 1000; margin-top: -4px; margin-left: 0;" class="wpallexport-help help_scheduling"
     9    <a href="#" style="z-index: 1000;" class="wpallexport-help help_scheduling"
    710       title="Automatic Scheduling is a paid service from Soflyy. Click for more info.">
    811
     
    1013</span>
    1114
     15<?php if ($scheduling->checkLicense()) { ?>
     16    <span class="wpai-license">
     17        <?php if ( $scheduling->checkConnection() ) {
     18            ?>
     19            <span class="wpallexport-help" title="Connection to WP All Export servers is stable and confirmed"
     20                  style="background-image: none; width: 20px; height: 20px;">
     21            <img src="<?php echo esc_url(PMXE_ROOT_URL); ?>/static/img/s-check.png" style="width: 16px;"/>
     22            </span>
     23            <?php
     24        } else  { ?>
     25            <img src="<?php echo esc_url(PMXE_ROOT_URL); ?>/static/img/s-exclamation.png" style="width: 16px;"/>
    1226
    13 <span class="wpai-license" <?php if (!$scheduling->checkLicense()) { ?> style="display: none;" <?php } ?> >
    14     <?php if ( $scheduling->checkConnection() ) {
     27            <?php
     28        }
    1529        ?>
    16         <span class="wpallexport-help" title="Connection to WP All Export servers is stable and confirmed"
    17               style="background-image: none; width: 20px; height: 20px;;">
    18         <img src="<?php echo PMXE_ROOT_URL; ?>/static/img/s-check.png" style="width: 16px;"/>
    1930    </span>
    20         <?php
    21     } else  { ?>
    22         <img src="<?php echo PMXE_ROOT_URL; ?>/static/img/s-exclamation.png" style="width: 16px;"/>
     31<?php
     32}
    2333
    24         <?php
    25     }
    26     ?>
    27 </span>
     34?>
  • wp-all-export/trunk/src/Scheduling/views/ManualScheduling.php

    r2654009 r2830466  
    33    <label>
    44        <input type="radio" name="scheduling_enable"
    5                value="2" <?php if ($post['scheduling_enable'] == 2) { ?> checked="checked" <?php } ?>/>
     5               value="2"/>
    66        <h4 style="margin-top: 0;display: inline-block;"><?php esc_html_e('Manual Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?></h4>
    77    </label>
    88    <div style="margin-left: 26px; margin-bottom: 10px; font-size: 13px;"><?php esc_html_e('Run this export using cron jobs.'); ?></div>
    9     <div style="<?php if ($post['scheduling_enable'] != 2) { ?> display: none; <?php } ?>" class="manual-scheduling">
     9    <div style="display: none;" class="manual-scheduling">
    1010
    1111        <div class="wpallexport-free-edition-notice" style="margin: 15px 0; width: 90%; padding-left: 10px; padding-right: 10px;">
  • wp-all-export/trunk/src/Scheduling/views/SaveSchedulingButton.php

    r2654009 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<div class="wpae-save-button button button-primary button-hero wpallexport-large-button"
    2      style="position: relative; width: 285px; margin-left: 5px;">
    3     <svg width="30" height="30" viewBox="0 0 1792 1792"
    4          xmlns="http://www.w3.org/2000/svg"
    5          style="fill: white; display: none;">
    6         <path
    7                 d="M1671 566q0 40-28 68l-724 724-136 136q-28 28-68 28t-68-28l-136-136-362-362q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 295 656-657q28-28 68-28t68 28l136 136q28 28 28 68z"
    8                 fill="white"/>
    9     </svg>
    10     <div class="easing-spinner" style="display: none;">
    11         <div class="double-bounce1"></div>
    12         <div class="double-bounce2"></div>
    13     </div>
     7     style="position: relative; width: 285px; margin-left: 5px; ">
     8
    149    <div class="save-text"
    15          style="display: block; position:absolute; <?php if($this->isWizard) {?> left: 70px; <?php } else { ?> left: 60px; <?php } ?> top:0; user-select: none;">
    16         <?php if($this->isWizard) {?>
    17             <?php esc_html_e('Confirm & Run Export', 'wp_all_export_plugin'); ?>
     10         style=" user-select: none; display: flex; align-content: center; justify-content: center;">
     11        <?php if($this->isWizard || (isset($post['enable_real_time_exports']) && $post['enable_real_time_exports'])) {?>
     12            <?php esc_html_e('Save & Run Export', 'wp_all_export_plugin'); ?>
    1813        <?php } else { ?>
    1914            <?php esc_html_e('Save Export Configuration', 'wp_all_export_plugin'); ?>
  • wp-all-export/trunk/src/Scheduling/views/SchedulingHelp.php

    r2654009 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<div id="wp-all-export-scheduling-help-inner" class="wp_all_export_scheduling_help">
    27
  • wp-all-export/trunk/src/Scheduling/views/SchedulingOptions.php

    r2654009 r2830466  
    11<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5
    26$scheduling = \Wpae\Scheduling\Scheduling::create();
    37$schedulingExportOptions = $export->options;
     
    377381                        if (!$(this).data('iunderstand') && schedulingEnable) {
    378382                            $('#no-subscription').slideDown();
    379                             $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
     383                            $(this).find('.save-text').html('<?php echo esc_html('I Understand');?>');
    380384                            $(this).find('.save-text').css('left', '100px');
    381385                            $(this).data('iunderstand', 1);
     
    420424                    formData.push({name: 'scheduling_enable', value: $('input[name="scheduling_enable"]:checked').val()});
    421425
    422                     $button.find('.easing-spinner').toggle();
    423 
    424426                    $.ajax({
    425427                        type: 'POST',
     
    427429                        data: formData,
    428430                        success: function (response) {
    429                             $button.find('.easing-spinner').toggle();
    430                             $button.find('.save-text').html(initialValue);
    431                             $button.find('svg').show();
    432 
    433                             setTimeout(function(){
    434                                 var submitEvent = $.Event('wpae-scheduling-options-form:submit');
    435                                 $(document).trigger(submitEvent);
    436                             }, 1000);
     431
     432                            var submitEvent = $.Event('wpae-scheduling-options-form:submit');
     433                            $(document).trigger(submitEvent);
    437434
    438435                        },
    439436                        error: function () {
    440                             $button.find('.easing-spinner').toggle();
    441                             $button.find('.save-text').html(initialValue);
    442437                        }
    443438                    });
     
    456451                            if (!$(this).data('iunderstand') && schedulingEnable) {
    457452                                $('#no-subscription').slideDown();
    458                                 $(this).find('.save-text').html('<?php esc_html_e('I Understand');?>');
     453                                $(this).find('.save-text').html('<?php echo esc_html('I Understand');?>');
    459454                                $(this).find('.save-text').css('left', '100px');
    460455                                $(this).data('iunderstand', 1);
     
    527522                <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    528523                ?>
    529                 var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    530 
    531                 if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
    532                     $('#timezone').trigger("chosen:updated");
    533                     $('#timezone').val(timeZone);
    534                     $('#timezone').trigger("chosen:updated");
    535                 }else{
    536                     var parts = timeZone.split('/');
    537                     var lastPart = parts[parts.length-1];
    538                     var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
    539 
    540                     $('#timezone').val(opt.val());
    541                     $('#timezone').trigger("chosen:updated");
    542                 }
     524                    var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
     525
     526                    if($('#timezone').find("option:contains('"+ timeZone +"')").length != 0){
     527                        $('#timezone').trigger("chosen:updated");
     528                        $('#timezone').val(timeZone);
     529                        $('#timezone').trigger("chosen:updated");
     530                    }else{
     531                        var parts = timeZone.split('/');
     532                        var lastPart = parts[parts.length-1];
     533                        var opt = $('#timezone').find("option:contains('"+ lastPart +"')");
     534
     535                        $('#timezone').val(opt.val());
     536                        $('#timezone').trigger("chosen:updated");
     537                    }
    543538
    544539                <?php
     
    573568                        var license = $('#add-subscription-field').val();
    574569                        $.ajax({
    575                             url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     570                            url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    576571                            type:"POST",
    577572                            data: {
     
    654649</script>
    655650<?php require __DIR__.'/CommonJs.php'; ?>
    656 <div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed"
    657      style="margin-top: -10px; margin-bottom: 10px;">
     651<div class="wpallexport-collapsed wpallexport-section wpallexport-file-options closed wpallexport-scheduling" style="margin-top: -10px; margin-bottom: 10px;">
    658652    <div id="scheduling-form">
    659653
     
    675669                    <div>
    676670                        <label>
    677                             <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
     671                        <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
    678672
    679673                            <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    680                                 <span class="connection-icon" style="margin-left: 8px;">
     674                                <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    681675                                                            <?php include_once('ConnectionIcon.php'); ?>
    682676                                                        </span>
    683                                 <?php if (!$scheduling->checkConnection()) { ?>
    684                                     <span class="wpai-license" style="margin-left: 8px; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?> color: #f2b03d;  ">Unable to connect, please contact support.</span>
     677                                <?php if($schedulingExportOptions['scheduling_enable'] == 1) { ?>
     678                                    <?php if (!$scheduling->checkConnection()) { ?>
     679                                        <span class="wpai-license" style="margin-left: 8px; font-weight: normal; <?php if(!$hasActiveLicense) { ?> display: none; <?php }?>"><span class="unable-to-connect">Unable to connect, please contact support.</span></span>
     680                                    <?php } ?>
    685681                                <?php } ?>
    686682                            </h4>
     
    746742                                </label>
    747743                            </div>
    748                             <input type="hidden" name="scheduling_monthly_days" value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo $schedulingExportOptions['scheduling_monthly_days']; ?>" id="monthly_days"/>
     744                            <input type="hidden" name="scheduling_monthly_days" value="<?php if (isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>" id="monthly_days"/>
    749745                            <?php
    750746                            if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     
    819815                                <div class="button-container">
    820816
    821                                     <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=515704&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=automatic-scheduling" target="_blank" id="subscribe-button">
     817                                    <a href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=515704" target="_blank" id="subscribe-button">
    822818                                        <div class="button button-primary button-hero wpallexport-large-button button-subscribe"
    823819                                             style="background-image: none; width: 140px; text-align: center; position: absolute; z-index: 4;">
  • wp-all-export/trunk/src/Scheduling/views/SchedulingUI.php

    r2738627 r2830466  
     1<?php
     2if(!defined('ABSPATH')) {
     3    die();
     4}
     5?>
    16<style type="text/css">
    27    .days-of-week {
     
    202207<?php
    203208$scheduling = \Wpae\Scheduling\Scheduling::create();
    204 $post = $export->options;
     209$schedulingExportOptions = $export->options;
    205210$hasActiveLicense = $scheduling->checkLicense();
    206211$cron_job_key = PMXE_Plugin::getInstance()->getOption('cron_job_key');
     
    417422                });
    418423
    419                 <?php if($post['scheduling_timezone'] == 'UTC') {
     424                <?php if($schedulingExportOptions['scheduling_timezone'] == 'UTC') {
    420425                ?>
    421426                var timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
     
    463468                        var license = $('#add-subscription-field').val();
    464469                        $.ajax({
    465                             url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo wp_create_nonce("wp_all_export_secure");?>',
     470                            url:ajaxurl+'?action=wpae_api&q=schedulingLicense/saveSchedulingLicense&security=<?php echo esc_js(wp_create_nonce("wp_all_export_secure"));?>',
    466471                            type:"POST",
    467472                            data: {
     
    474479                                if(response.success) {
    475480                                    hasActiveLicense = true;
    476                                     $('.wpae-save-button').slideDown().css('display','block');
     481                                    $('.wpae-save-button').removeClass('disabled');
    477482                                    $('#subscribe-button .easing-spinner').hide();
    478483                                    $('#subscribe-button svg.success').show();
     
    500505                                    setTimeout(function () {
    501506                                        $('#add-subscription-field').animate({width:'140px'}, 225);
    502                                         $('#add-subscription-field').animate({left:'-155px'}, 225);
     507                                        $('#add-subscription-field').animate({left:'-152px'}, 225);
    503508                                    }, 300);
    504509
     
    551556                <div style="margin-bottom: 20px;">
    552557                    <label>
    553                         <input type="radio" name="scheduling_enable" value="0" <?php if($post['scheduling_enable'] == 0) { ?> checked="checked" <?php } ?>/>
     558                        <input type="radio" name="scheduling_enable" value="0" <?php if($schedulingExportOptions['scheduling_enable'] == 0) { ?> checked="checked" <?php } ?>/>
    554559                        <h4 style="display: inline-block;"><?php esc_html_e('Do Not Schedule'); ?></h4>
    555560                    </label>
     
    557562                <div>
    558563                    <label>
    559                         <input type="radio" name="scheduling_enable" value="1" <?php if($post['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
     564                        <input type="radio" name="scheduling_enable" value="1" <?php if($schedulingExportOptions['scheduling_enable'] == 1) {?> checked="checked" <?php }?>/>
    560565                        <h4 style="margin: 0; display: inline-flex; align-items: center;"><?php esc_html_e('Automatic Scheduling', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    561                             <span class="connection-icon" style="margin-left: 8px;">
     566                            <span class="connection-icon" style="margin-left: 8px; height: 16px;">
    562567                                                            <?php include_once('ConnectionIcon.php'); ?>
    563568                                                        </span>
     
    579584                </div>
    580585                <div id="automatic-scheduling"
    581                      style="margin-left: 21px; <?php if ($post['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
     586                     style="margin-left: 21px; <?php if ($schedulingExportOptions['scheduling_enable'] != 1) { ?> display: none; <?php } ?>">
    582587                    <div>
    583588                        <div class="input">
    584589                            <label style="color: rgb(68,68,68);">
    585590                                <input
    586                                     type="radio" <?php if ($post['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
     591                                    type="radio" <?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> checked="checked" <?php } ?>
    587592                                    name="scheduling_run_on" value="weekly"
    588593                                    checked="checked"/> <?php esc_html_e('Every week on...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
     
    590595                        </div>
    591596                        <input type="hidden" style="width: 500px;" name="scheduling_weekly_days"
    592                                value="<?php echo esc_attr($post['scheduling_weekly_days']); ?>" id="weekly_days"/>
     597                               value="<?php echo esc_attr($schedulingExportOptions['scheduling_weekly_days']); ?>" id="weekly_days"/>
    593598                        <?php
    594                         if (isset($post['scheduling_weekly_days'])) {
    595                             $weeklyArray = explode(',', $post['scheduling_weekly_days']);
     599                        if (isset($schedulingExportOptions['scheduling_weekly_days'])) {
     600                            $weeklyArray = explode(',', $schedulingExportOptions['scheduling_weekly_days']);
    596601                        } else {
    597602                            $weeklyArray = array();
    598603                        }
    599604                        ?>
    600                         <ul class="days-of-week" id="weekly" style="<?php if ($post['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
     605                        <ul class="days-of-week" id="weekly" style="<?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> display: none; <?php } ?>">
    601606                            <li data-day="0" <?php if (in_array('0', $weeklyArray)) { ?> class="selected" <?php } ?>>
    602607                                Mon
     
    627632                            <label style="color: rgb(68,68,68);">
    628633                                <input
    629                                     type="radio" <?php if ($post['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
     634                                    type="radio" <?php if ($schedulingExportOptions['scheduling_run_on'] == 'monthly') { ?> checked="checked" <?php } ?>
    630635                                    name="scheduling_run_on"
    631636                                    value="monthly"/> <?php esc_html_e('Every month on the first...', PMXE_Plugin::LANGUAGE_DOMAIN); ?>
    632637                            </label>
    633638                        </div>
    634                         <input type="hidden" name="scheduling_monthly_days" value="<?php if(isset($post['scheduling_monthly_days'])) echo esc_attr($post['scheduling_monthly_days']); ?>" id="monthly_days"/>
     639                        <input type="hidden" name="scheduling_monthly_days" value="<?php if(isset($schedulingExportOptions['scheduling_monthly_days'])) echo esc_attr($schedulingExportOptions['scheduling_monthly_days']); ?>" id="monthly_days"/>
    635640                        <?php
    636                         if (isset($post['scheduling_monthly_days'])) {
    637                             $monthlyArray = explode(',', $post['scheduling_monthly_days']);
     641                        if (isset($schedulingExportOptions['scheduling_monthly_days'])) {
     642                            $monthlyArray = explode(',', $schedulingExportOptions['scheduling_monthly_days']);
    638643                        } else {
    639644                            $monthlyArray = array();
     
    641646                        ?>
    642647                        <ul class="days-of-week" id="monthly"
    643                             style="<?php if ($post['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
     648                            style="<?php if ($schedulingExportOptions['scheduling_run_on'] != 'monthly') { ?> display: none; <?php } ?>">
    644649                            <li data-day="0" <?php if (in_array('0', $monthlyArray)) { ?> class="selected" <?php } ?>>
    645650                                Mon
     
    673678
    674679                        <div id="times" style="margin-bottom: 10px;">
    675                             <?php if (is_array($post['scheduling_times'])) {
    676                                 foreach ($post['scheduling_times'] as $time) { ?>
     680                            <?php if (is_array($schedulingExportOptions['scheduling_times'])) {
     681                                foreach ($schedulingExportOptions['scheduling_times'] as $time) { ?>
    677682
    678683                                    <?php if ($time) { ?>
     
    689694
    690695                            $timezoneValue = false;
    691                             if ($post['scheduling_timezone']) {
    692                                 $timezoneValue = $post['scheduling_timezone'];
     696                            if ($schedulingExportOptions['scheduling_timezone']) {
     697                                $timezoneValue = $schedulingExportOptions['scheduling_timezone'];
    693698                            }
    694699
     
    749754</div>
    750755
    751 <div class="wpae-save-button button button-primary button-hero wpallexport-large-button wpae-export-complete-save-button" id="save-scheduling-button"
    752      style="position: relative; width: 285px; <?php if($hasActiveLicense) { echo 'display: block;';} else { echo "display: none;";}?> margin:auto; background-image: none; margin-top: 25px;">
     756<div class="wpae-save-button button button-primary button-hero wpallexport-large-button wpae-export-complete-save-button <?php if(!$hasActiveLicense) { echo 'disabled'; }?>"
     757     style="position: relative; width: 285px; display: block; margin:auto; background-image: none; margin-top: 25px;">
    753758    <svg width="30" height="30" viewBox="0 0 1792 1792"
    754759         xmlns="http://www.w3.org/2000/svg"
  • wp-all-export/trunk/static/css/admin.css

    r2738627 r2830466  
    3737    overflow: auto;
    3838}
     39
     40.wpallexport-plugin .wpallexport-step-4 .wpallexport-free-edition-notice a.upgrade_link {
     41    font-size: 1.3em !important;
     42}
     43
    3944.wpallexport-plugin .wp_all_export_custom_xml_help p,
    4045.wpallexport-plugin .wp_all_export_scheduling_help p
     
    148153    text-decoration: none;
    149154}
     155
     156.wpallexport-plugin .connection-icon .help_scheduling {
     157    margin: 0;
     158    position: initial;
     159}
     160
    150161.wpallexport-plugin .wpallexport-free-edition-notice{
    151162    display: block;
     
    45004511
    45014512
     4513.wpae-shake {
     4514    -webkit-animation: wpae_shake 0.4s 1 linear;
     4515    -moz-animation: wpae_shake 0.4s 1 linear;
     4516    -o-animation: wpae_shake 0.4s 1 linear;
     4517}
     4518@-webkit-keyframes wpae_shake {
     4519    0% { -webkit-transform: translate(30px); }
     4520    20% { -webkit-transform: translate(-30px); }
     4521    40% { -webkit-transform: translate(15px); }
     4522    60% { -webkit-transform: translate(-15px); }
     4523    80% { -webkit-transform: translate(8px); }
     4524    100% { -webkit-transform: translate(0px); }
     4525}
     4526@-moz-keyframes wpae_shake {
     4527    0% { -moz-transform: translate(30px); }
     4528    20% { -moz-transform: translate(-30px); }
     4529    40% { -moz-transform: translate(15px); }
     4530    60% { -moz-transform: translate(-15px); }
     4531    80% { -moz-transform: translate(8px); }
     4532    100% { -moz-transform: translate(0px); }
     4533}
     4534@-o-keyframes wpae_shake {
     4535    0% { -o-transform: translate(30px); }
     4536    20% { -o-transform: translate(-30px); }
     4537    40% { -o-transform: translate(15px); }
     4538    60% { -o-transform: translate(-15px); }
     4539    80% { -o-transform: translate(8px); }
     4540    100% { -o-origin-transform: translate(0px); }
     4541}
     4542
     4543.wpae-shake-small {
     4544    -webkit-animation: wpae_shake_small 0.4s 1 linear;
     4545    -moz-animation: wpae_shake_small 0.4s 1 linear;
     4546    -o-animation: wpae_shake_small 0.4s 1 linear;
     4547}
     4548@-webkit-keyframes wpae_shake_small {
     4549    0% { -webkit-transform: translate(10px); }
     4550    20% { -webkit-transform: translate(-10px); }
     4551    40% { -webkit-transform: translate(5px); }
     4552    60% { -webkit-transform: translate(-5px); }
     4553    80% { -webkit-transform: translate(3px); }
     4554    100% { -webkit-transform: translate(0px); }
     4555}
     4556@-moz-keyframes wpae_shake_small {
     4557    0% { -moz-transform: translate(10px); }
     4558    20% { -moz-transform: translate(-10px); }
     4559    40% { -moz-transform: translate(5px); }
     4560    60% { -moz-transform: translate(-5px); }
     4561    80% { -moz-transform: translate(3px); }
     4562    100% { -moz-transform: translate(0px); }
     4563}
     4564@-o-keyframes wpae_shake_small {
     4565    0% { -o-transform: translate(10px); }
     4566    20% { -o-transform: translate(-10px); }
     4567    40% { -o-transform: translate(5px); }
     4568    60% { -o-transform: translate(-5px); }
     4569    80% { -o-transform: translate(3px); }
     4570    100% { -o-origin-transform: translate(0px); }
     4571}
  • wp-all-export/trunk/static/js/admin.js

    r2738627 r2830466  
    385385
    386386
    387 
    388     // swither show/hide logic
     387    $('input#enable_real_time_exports').click(function(e){
     388        $('.wpallexport-free-edition-notice.php-rte-upgrade').slideDown();
     389
     390
     391        $('input#enable_real_time_exports').addClass('wpae-shake-small');
     392        setTimeout(function(){
     393            $('input#enable_real_time_exports').prop('checked', false);
     394            $('input#enable_real_time_exports').removeClass('wpae-shake-small');
     395
     396            return false;
     397        },600);
     398
     399        e.preventDefault();
     400        return false;
     401
     402    });
     403
     404    $('input#export_only_new_stuff').click(function(e){
     405        $('.wpallexport-free-edition-notice.only-export-posts-once').slideDown();
     406
     407        $('input#export_only_new_stuff').addClass('wpae-shake-small');
     408        setTimeout(function(){
     409            $('input#export_only_new_stuff').prop('checked', false);
     410            $('input#export_only_new_stuff').removeClass('wpae-shake-small');
     411
     412            return false;
     413        },600);
     414
     415        e.preventDefault();
     416        return false;
     417
     418    });
     419
     420    $('input#export_only_modified_stuff').click(function(e){
     421        $('.wpallexport-free-edition-notice.only-export-modified-posts').slideDown();
     422
     423        $('input#export_only_modified_stuff').addClass('wpae-shake-small');
     424        setTimeout(function(){
     425            $('input#export_only_modified_stuff').prop('checked', false);
     426            $('input#export_only_modified_stuff').removeClass('wpae-shake-small');
     427
     428            return false;
     429        },600);
     430
     431        e.preventDefault();
     432        return false;
     433
     434    });
     435
     436    $('input#allow_client_mode').click(function(e){
     437        $('.wpallexport-free-edition-notice.client-mode-notice').slideDown();
     438
     439        $('input#allow_client_mode').addClass('wpae-shake-small');
     440        setTimeout(function(){
     441            $('input#allow_client_mode').prop('checked', false);
     442            $('input#allow_client_mode').removeClass('wpae-shake-small');
     443
     444            return false;
     445        },600);
     446
     447        e.preventDefault();
     448        return false;
     449
     450    });
     451
     452
     453
     454
     455
     456    // swither show/hide logic
    389457    $('input.switcher-horizontal').change('change', function (e) {
    390458
     
    694762        var postType = $('input[name=cpt]').length ? $('input[name=cpt]').val() : $('input[name=selected_post_type]').val();
    695763
    696         var $export_only_new_stuff = $('input[name=export_only_new_stuff]').val();
    697         if ($('#export_only_new_stuff').length){
    698             $export_only_new_stuff = $('#export_only_new_stuff').is(':checked') ? 1 : 0;
    699         }
     764
    700765
    701766        var $export_only_modified_stuff = $('input[name=export_only_modified_stuff]').val();
     
    713778                'is_confirm_screen' : $('.wpallexport-step-4').length,
    714779                'is_template_screen' : $('.wpallexport-step-3').length,
    715                 'export_only_new_stuff' : $export_only_new_stuff,
     780                'export_only_new_stuff' : 0,
    716781                'export_only_modified_stuff' : $export_only_modified_stuff,
    717782                'export_type' : $('input[name=export_type]').val(),
     
    23552420
    23562421    }
    2357     $('#export_only_new_stuff').click(function(){
    2358         $(this).attr('disabled','disabled');
    2359         $('label[for=export_only_new_stuff]').addClass('loading');
    2360         liveFiltering(null, function(){
    2361             $('label[for=export_only_new_stuff]').removeClass('loading');
    2362             $('#export_only_new_stuff').removeAttr('disabled');
    2363         });
    2364     });
    2365     $('#export_only_modified_stuff').click(function(){
    2366         $(this).attr('disabled','disabled');
    2367         $('label[for=export_only_modified_stuff]').addClass('loading');
    2368         liveFiltering(null, function(){
    2369             $('label[for=export_only_modified_stuff]').removeClass('loading');
    2370             $('#export_only_modified_stuff').removeAttr('disabled');
    2371         });
    2372     });
     2422
    23732423    // [ \Step 3 ( export options ) ]
    23742424
  • wp-all-export/trunk/views/admin/export/options.php

    r2654009 r2830466  
    3636                <?php do_action('pmxe_options_header', $this->isWizard, $post); ?>
    3737               
    38                 <div class="ajax-console">                 
     38                <div class="ajax-console">
    3939                    <?php if ($this->errors->get_error_codes()): ?>
    4040                        <?php $this->error() ?>
  • wp-all-export/trunk/views/admin/export/options/settings.php

    r2738627 r2830466  
    1313                <table class="form-table" style="max-width:none;">
    1414                    <tr>
    15                         <td colspan="3">                                                                                                   
     15                        <td colspan="3">
     16
    1617                            <div class="input" style="margin:5px 0px;">
    1718                                <label for="records_per_request"><?php esc_html_e('In each iteration, process', 'wp_all_export_plugin');?> <input type="text" name="records_per_iteration" class="wp_all_export_sub_input" style="width: 40px;" value="<?php echo esc_attr($post['records_per_iteration']) ?>" /> <?php esc_html_e('records', 'wp_all_export_plugin'); ?></label>
    1819                                <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('WP All Export must be able to process this many records in less than your server\'s timeout settings. If your export fails before completion, to troubleshoot you should lower this number.', 'wp_all_export_plugin'); ?>">?</a>
    1920                            </div>
    20                             <div class="input" style="margin:5px 0px;">
     21
     22                            <?php
     23                            $cpt_initial = $post['cpt'];
     24                            $cpt_name = is_array($post['cpt']) ? reset($post['cpt']) : $post['cpt'];
     25                            if ('advanced' !== $post['export_type']) {
     26                                if ($cpt_name !== 'taxonomies') {
     27
     28                                    if ($cpt_name === 'users') {
     29                                        $cpt_name = 'user';
     30                                    }
     31
     32                                    $display_verb = 'created';
     33                                    $display_cpt_name = $cpt_name;
     34                                    $tooltip_cpt_name = strtolower(wp_all_export_get_cpt_name($cpt_initial));
     35
     36                                    if ($display_cpt_name === 'shop_order') {
     37                                        $display_cpt_name = 'WooCommerce Order';
     38                                        $display_verb = 'completed';
     39                                    }
     40
     41                                    if ($display_cpt_name === 'shop_customer') {
     42                                        $display_cpt_name = 'WooCommerce Customer';
     43                                        $display_verb = 'created';
     44                                    }
     45
     46                                    if ($display_cpt_name === 'custom_wpae-gf-addon') {
     47                                        $display_cpt_name = 'Gravity Forms Entry';
     48                                    }
     49
     50                                    if ($display_cpt_name === 'comments') {
     51                                        $display_cpt_name = 'comment';
     52                                    }
     53                                }
     54                            }
     55
     56                            ?>
     57                            <div class="input">
     58
     59                                <input type="hidden" id="wpae-post-name" value="<?php echo $display_cpt_name; ?>" />
     60                                <input type="hidden" name="enable_real_time_exports" value="0"/>
     61                                <input type="checkbox"
     62                                       id="enable_real_time_exports" <?php if ((isset($post['xml_template_type']) && $post['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) || $cpt_name === 'shop_customer') { ?> disabled="disabled" <?php } ?>
     63                                       name="enable_real_time_exports"
     64                                       value="1"  />
     65                                <label for="enable_real_time_exports"><?php esc_html_e('Export each ' . esc_html($display_cpt_name) . ' in real time as they are ' . esc_html($display_verb), 'wp_all_export_plugin') ?></label>
     66                                <span>
     67                                            <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;"
     68                                                <?php
     69                                                if (isset($post['xml_template_type']) && $post['xml_template_type'] == XmlExportEngine::EXPORT_TYPE_GOOLE_MERCHANTS) { ?>
     70                                                    title="<?php esc_html_e('This feature it not available for Google Merchants Exports.', 'wp_all_export_plugin'); ?>"
     71                                                <?php } else if ($cpt_name === 'shop_customer')
     72                                                {
     73                                                    ?>
     74
     75                                                    title="<?php esc_html_e('This feature it not available for Customer Exports.', 'wp_all_export_plugin'); ?>"
     76                                                <?php } else { ?>
     77                                               title="<?php esc_html_e('This will export ' . esc_html(strtolower($tooltip_cpt_name)) . ' one by one, in real time, as they are ' . esc_html($display_verb) . '.'); ?> <br/><br/><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>">
     78                                            <?php } ?>>?</a>
     79                                </span>
     80
     81                                <div class="wpallexport-free-edition-notice php-rte-upgrade" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     82                                    <a class="upgrade_link" target="_blank" href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=real-time-exports"><?php esc_html_e('Upgrade to the Pro edition of WP All Export to export each '. $display_cpt_name .' in real time.','wp_all_export_plugin');?></a>
     83                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     84                                </div>
     85                            </div>
     86
     87
     88
     89                            <div class="input" style="margin:5px 0px;">
    2190                                <input type="hidden" name="export_only_new_stuff" value="0" />
    22                                 <input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" <?php echo $post['export_only_new_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
    23                                 <label for="export_only_new_stuff" disabled="disabled"><?php printf(esc_html__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt']))); ?></label>
     91                                <input type="checkbox" id="export_only_new_stuff" name="export_only_new_stuff" value="1" />
     92                                <label for="export_only_new_stuff"><?php printf(esc_html__('Only export %s once', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt']))); ?></label>
    2493                                <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have not been previously exported.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
    25                             </div>
     94
     95                                <div class="wpallexport-free-edition-notice only-export-posts-once" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     96                                    <a class="upgrade_link" target="_blank"
     97                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=export-only-new-stuff">
     98                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     99                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to only export '.  $noun .' once.','wp_all_export_plugin');?></a>
     100                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     101                                </div>
     102                            </div>
    26103                            <div class="input" style="margin:5px 0px;">
    27104                                <input type="hidden" name="export_only_modified_stuff" value="0" />
    28                                 <input type="checkbox" id="export_only_modified_stuff" name="export_only_modified_stuff" value="1" <?php echo $post['export_only_modified_stuff'] ? 'checked="checked"': '' ?> disabled="disabled"/>
     105                                <input type="checkbox" id="export_only_modified_stuff" name="export_only_modified_stuff" value="1" <?php echo $post['export_only_modified_stuff'] ? 'checked="checked"': '' ?> <?php if (is_array($post['cpt']) && $post['cpt'][0] === 'users') {?> disabled="disabled" <?php }?> />
    29106                                <label for="export_only_modified_stuff" disabled="disabled"><?php printf(esc_html__('Only export %s that have been modified since last export', 'wp_all_export_plugin'), empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'], 2, $post))); ?></label>
    30                                 <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have been modified since last export run.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
    31                             </div>
     107
     108                                <?php
     109                                if(is_array($post['cpt']) && $post['cpt'][0] === 'users') {
     110                                    ?>
     111                                    <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('This feature is not available for user exports.', 'wp_all_export_plugin'); ?>">?</a>
     112
     113                                    <?php
     114                                } else {
     115                                ?>
     116                                    <a href="#help" class="wpallexport-help" style="position: relative; top: -2px;" title="<?php esc_html_e('If re-run, this export will only include records that have been modified since last export run.<br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>', 'wp_all_export_plugin'); ?>">?</a>
     117                                <?php
     118                                }
     119                                ?>
     120                                <div class="wpallexport-free-edition-notice only-export-modified-posts" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     121                                    <a class="upgrade_link" target="_blank"
     122                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=export-only-modified-stuff">
     123                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     124                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to only export '.  $noun .' that have been modified since last export.','wp_all_export_plugin');?></a>
     125                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     126                                </div>
     127
     128                            </div>
    32129
    33130                            <div class="input" style="margin:5px 0px;">
     
    55152                            <div class="input" style="margin:5px 0px;">
    56153                                <input type="hidden" name="allow_client_mode" value="0"/>
    57                                 <input type="checkbox" disabled="disabled" id="allow_client_mode" name="allow_client_mode"
     154                                <input type="checkbox" id="allow_client_mode" name="allow_client_mode"
    58155                                       value="1" <?php echo (isset($post['allow_client_mode']) && $post['allow_client_mode']) ? 'checked="checked"' : '' ?> />
    59156                                <label for="allow_client_mode"><?php esc_html_e('Allow non-admins to run this export in Client Mode', 'wp_all_export_plugin') ?></label>
     
    61158                                    <a href="#help" class="wpallexport-help" style="position: relative; top: 0;" title="<?php esc_html_e('When enabled, users with access to Client Mode will be able to run this export and download the export file. Go to All Export > Settings to give users access to Client Mode. <br><br><strong>Upgrade to the Pro edition of WP All Export to use this option.</strong>'); ?>">?</a>
    62159                                </span>
     160
     161                                <div class="wpallexport-free-edition-notice client-mode-notice" style="margin: 15px 0; padding: 20px; width: 600px; display: none;">
     162                                    <a class="upgrade_link" target="_blank"
     163                                       href="https://www.wpallimport.com/checkout/?edd_action=add_to_cart&download_id=2707173&edd_options%5Bprice_id%5D=1&utm_source=export-plugin-free&utm_medium=upgrade-notice&utm_campaign=client-mode">
     164                                        <?php $noun = empty($post['cpt']) ? __('records', 'wp_all_export_plugin') : esc_html(wp_all_export_get_cpt_name($post['cpt'])); ?>
     165                                        <?php esc_html_e('Upgrade to the Pro edition of WP All Export to allow non-admins to run this export in Client Mode.','wp_all_export_plugin');?></a>
     166                                    <p><?php esc_html_e('If you already own it, remove the free edition and install the Pro edition.', 'wp_all_export_plugin'); ?></p>
     167                                </div>
    63168                            </div>
    64169                            <br>
  • wp-all-export/trunk/views/admin/manage/index.php

    r2738627 r2830466  
    242242                                                // Disable scheduling options for ACF exports if ACF Export Add-On isn't enabled
    243243                                            } else if (
    244                                                 ((!in_array('comments', $item['options']['cpt']) || !in_array('shop_review', $item['options']['cpt'])) && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive()) ||
     244                                                (isset($item['options']['cpt']) && (!in_array('comments', $item['options']['cpt']) || !in_array('shop_review', $item['options']['cpt'])) && isset($item['options']['cc_type']) && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive()) ||
    245245                                                ($item['options']['export_type'] == 'advanced' && $item['options']['wp_query_selector'] != 'wp_comment_query' && in_array('acf', $item['options']['cc_type']) && !$addons->isAcfAddonActive())
    246246                                            ) {
  • wp-all-export/trunk/views/admin/settings/index.php

    r2654009 r2830466  
    44}
    55?>
    6 <style type="text/css">
    7     .wpae-shake {
    8         -webkit-animation: wpae_shake 0.4s 1 linear;
    9         -moz-animation: wpae_shake 0.4s 1 linear;
    10         -o-animation: wpae_shake 0.4s 1 linear;
    11     }
    12     @-webkit-keyframes wpae_shake {
    13         0% { -webkit-transform: translate(30px); }
    14         20% { -webkit-transform: translate(-30px); }
    15         40% { -webkit-transform: translate(15px); }
    16         60% { -webkit-transform: translate(-15px); }
    17         80% { -webkit-transform: translate(8px); }
    18         100% { -webkit-transform: translate(0px); }
    19     }
    20     @-moz-keyframes wpae_shake {
    21         0% { -moz-transform: translate(30px); }
    22         20% { -moz-transform: translate(-30px); }
    23         40% { -moz-transform: translate(15px); }
    24         60% { -moz-transform: translate(-15px); }
    25         80% { -moz-transform: translate(8px); }
    26         100% { -moz-transform: translate(0px); }
    27     }
    28     @-o-keyframes wpae_shake {
    29         0% { -o-transform: translate(30px); }
    30         20% { -o-transform: translate(-30px); }
    31         40% { -o-transform: translate(15px); }
    32         60% { -o-transform: translate(-15px); }
    33         80% { -o-transform: translate(8px); }
    34         100% { -o-origin-transform: translate(0px); }
    35     }
    36 </style>
    376
    387<form class="settings" method="post" action="<?php echo esc_url($this->baseUrl); ?>" enctype="multipart/form-data">
  • wp-all-export/trunk/wp-all-export.php

    r2740070 r2830466  
    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.7
     6Version: 1.3.8
    77Author: Soflyy
    88*/
     
    6060    define('PMXE_PREFIX', 'pmxe_');
    6161
    62     define('PMXE_VERSION', '1.3.7');
     62    define('PMXE_VERSION', '1.3.8');
    6363
    6464    define('PMXE_ASSETS_VERSION', '-1.0.2');
Note: See TracChangeset for help on using the changeset viewer.