Version Description
- improvement: choose WPML language in export options
- bug fix: export ACF message field
- bug fix: export product categories with AFC repeater fields
- bug fix: export duplicate images from gallery
- bug fix: export search
- bug fix: export product variation attribute names
- bug fix: migrating hierarchical posts and pages
Download this release
Release Info
Developer | soflyy |
Plugin | ![]() |
Version | 1.1.2 |
Comparing to | |
See all releases |
Code changes from version 1.1.1 to 1.1.2
- actions/admin_head.php +4 -0
- actions/pmxe_after_export.php +6 -2
- actions/wp_ajax_wpae_available_rules.php +3 -3
- actions/wp_ajax_wpae_filtering.php +1 -1
- actions/wp_ajax_wpae_filtering_count.php +19 -11
- actions/wp_ajax_wpae_preview.php +3 -1
- actions/wp_ajax_wpallexport.php +4 -0
- classes/wpallimport.php +2 -0
- controllers/admin/export.php +19 -6
- controllers/admin/manage.php +3 -3
- controllers/controller/admin.php +1 -1
- dist/app.js +27227 -0
actions/admin_head.php
CHANGED
@@ -15,6 +15,10 @@ function pmxe_admin_head(){
|
|
15 |
|
16 |
?>
|
17 |
<script type="text/javascript">
|
|
|
|
|
|
|
|
|
18 |
var export_action = '<?php echo $export_action; ?>';
|
19 |
var wp_all_export_security = '<?php echo $wp_all_export_ajax_nonce; ?>';
|
20 |
</script>
|
15 |
|
16 |
?>
|
17 |
<script type="text/javascript">
|
18 |
+
if(typeof GoogleMerchants != 'undefined') {
|
19 |
+
GoogleMerchants.constant('NONCE', '<?php echo $wp_all_export_ajax_nonce; ?>');
|
20 |
+
}
|
21 |
+
|
22 |
var export_action = '<?php echo $export_action; ?>';
|
23 |
var wp_all_export_security = '<?php echo $wp_all_export_ajax_nonce; ?>';
|
24 |
</script>
|
actions/pmxe_after_export.php
CHANGED
@@ -34,15 +34,19 @@ function pmxe_pmxe_after_export($export_id, $export)
|
|
34 |
|
35 |
$is_export_csv_headers = apply_filters('wp_all_export_is_csv_headers_enabled', true, $export->id);
|
36 |
|
|
|
|
|
|
|
|
|
37 |
// Remove headers row from CSV file
|
38 |
-
if (
|
39 |
|
40 |
$tmp_file = str_replace(basename($filepath), 'iteration_' . basename($filepath), $filepath);
|
41 |
copy($filepath, $tmp_file);
|
42 |
$in = fopen($tmp_file, 'r');
|
43 |
$out = fopen($filepath, 'w');
|
44 |
|
45 |
-
$headers = fgetcsv($in);
|
46 |
|
47 |
if (is_resource($in)) {
|
48 |
$lineNumber = 0;
|
34 |
|
35 |
$is_export_csv_headers = apply_filters('wp_all_export_is_csv_headers_enabled', true, $export->id);
|
36 |
|
37 |
+
if ( isset($export->options['include_header_row'])) {
|
38 |
+
$is_export_csv_headers = $export->options['include_header_row'];
|
39 |
+
}
|
40 |
+
|
41 |
// Remove headers row from CSV file
|
42 |
+
if ( empty($is_export_csv_headers) && @file_exists($filepath) && $export->options['export_to'] == 'csv' && $export->options['export_to_sheet'] == 'csv' ){
|
43 |
|
44 |
$tmp_file = str_replace(basename($filepath), 'iteration_' . basename($filepath), $filepath);
|
45 |
copy($filepath, $tmp_file);
|
46 |
$in = fopen($tmp_file, 'r');
|
47 |
$out = fopen($filepath, 'w');
|
48 |
|
49 |
+
$headers = fgetcsv($in, 0, XmlExportEngine::$exportOptions['delimiter']);
|
50 |
|
51 |
if (is_resource($in)) {
|
52 |
$lineNumber = 0;
|
actions/wp_ajax_wpae_available_rules.php
CHANGED
@@ -20,12 +20,12 @@ function pmxe_wp_ajax_wpae_available_rules(){
|
|
20 |
<select id="wp_all_export_rule">
|
21 |
<option value=""><?php _e('Select Rule', 'wp_all_export_plugin'); ?></option>
|
22 |
<?php
|
23 |
-
if (strpos($post['selected'], 'tx_') === 0){
|
24 |
?>
|
25 |
|
26 |
<!-- Taxonomies -->
|
27 |
-
<option value="in"><?php echo __('In', 'wp_all_export_plugin') . ' ' . ucwords(str_replace(array("tx_", "_"), array("", " "), $post['selected'])); ?></option>
|
28 |
-
<option value="not_in"><?php echo __('Not In', 'wp_all_export_plugin') . ' ' . ucwords(str_replace(array("tx_", "_"), array("", " "), $post['selected'])); ?></option>
|
29 |
|
30 |
<!-- Custom Fields -->
|
31 |
<!--option value="between">BETWEEN</option-->
|
20 |
<select id="wp_all_export_rule">
|
21 |
<option value=""><?php _e('Select Rule', 'wp_all_export_plugin'); ?></option>
|
22 |
<?php
|
23 |
+
if (strpos($post['selected'], 'tx_') === 0 || strpos($post['selected'], 'product_tx') === 0){
|
24 |
?>
|
25 |
|
26 |
<!-- Taxonomies -->
|
27 |
+
<option value="in"><?php echo __('In', 'wp_all_export_plugin') . ' ' . ucwords(str_replace(array("product_tx", "tx_", "_"), array("", "", " "), $post['selected'])); ?></option>
|
28 |
+
<option value="not_in"><?php echo __('Not In', 'wp_all_export_plugin') . ' ' . ucwords(str_replace(array("product_tx", "tx_", "_"), array("", "", " "), $post['selected'])); ?></option>
|
29 |
|
30 |
<!-- Custom Fields -->
|
31 |
<!--option value="between">BETWEEN</option-->
|
actions/wp_ajax_wpae_filtering.php
CHANGED
@@ -56,7 +56,7 @@ function pmxe_wp_ajax_wpae_filtering(){
|
|
56 |
if ( XmlExportEngine::$is_auto_generate_enabled ):
|
57 |
?>
|
58 |
<span class="wp_all_export_btn_with_note">
|
59 |
-
<a href="javascript:void(0);" class="back rad3 auto-generate-template" style="float:none; background: #425f9a; padding: 0 50px; margin-right: 10px; color: #fff; font-weight: normal;"><?php printf(__('Migrate %s', 'wp_all_export_plugin'), wp_all_export_get_cpt_name(array($post['cpt']), 2)); ?></a>
|
60 |
<span class="auto-generate-template"> </span>
|
61 |
</span>
|
62 |
<span class="wp_all_export_btn_with_note">
|
56 |
if ( XmlExportEngine::$is_auto_generate_enabled ):
|
57 |
?>
|
58 |
<span class="wp_all_export_btn_with_note">
|
59 |
+
<a href="javascript:void(0);" class="back rad3 auto-generate-template" style="float:none; background: #425f9a; padding: 0 50px; margin-right: 10px; color: #fff; font-weight: normal;"><?php printf(__('Migrate %s', 'wp_all_export_plugin'), wp_all_export_get_cpt_name(array($post['cpt']), 2, $post)); ?></a>
|
60 |
<span class="auto-generate-template"> </span>
|
61 |
</span>
|
62 |
<span class="wp_all_export_btn_with_note">
|
actions/wp_ajax_wpae_filtering_count.php
CHANGED
@@ -37,6 +37,14 @@ function pmxe_wp_ajax_wpae_filtering_count(){
|
|
37 |
{
|
38 |
XmlExportEngine::$exportOptions = $export->options + PMXE_Plugin::get_default_import_options();
|
39 |
XmlExportEngine::$exportOptions['export_only_new_stuff'] = $post['export_only_new_stuff'];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
}
|
41 |
|
42 |
XmlExportEngine::$is_user_export = ( 'users' == $post['cpt'] or 'shop_customer' == $post['cpt'] ) ? true : false;
|
@@ -149,17 +157,17 @@ function pmxe_wp_ajax_wpae_filtering_count(){
|
|
149 |
}
|
150 |
}
|
151 |
else
|
152 |
-
{
|
153 |
remove_all_actions('parse_query');
|
154 |
-
remove_all_actions('pre_get_posts');
|
155 |
-
remove_all_filters('posts_clauses');
|
156 |
|
157 |
$cpt = ($is_products_export) ? array('product', 'product_variation') : array($post['cpt']);
|
158 |
|
159 |
// get total custom post type records
|
160 |
$totalQuery = new WP_Query( array( 'post_type' => $cpt, 'post_status' => 'any', 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => 10 ));
|
161 |
if ( ! empty($totalQuery->found_posts)){
|
162 |
-
$total_records = $totalQuery->found_posts;
|
163 |
}
|
164 |
|
165 |
wp_reset_postdata();
|
@@ -167,12 +175,12 @@ function pmxe_wp_ajax_wpae_filtering_count(){
|
|
167 |
ob_start();
|
168 |
// get custom post type records depends on filters
|
169 |
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
|
170 |
-
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
|
171 |
-
|
172 |
$exportQuery = new WP_Query( array( 'post_type' => $cpt, 'post_status' => 'any', 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => 10 ));
|
173 |
-
if ( ! empty($exportQuery->found_posts))
|
174 |
{
|
175 |
-
$found_records = $exportQuery->found_posts;
|
176 |
}
|
177 |
|
178 |
if($is_products_export) {
|
@@ -183,9 +191,9 @@ function pmxe_wp_ajax_wpae_filtering_count(){
|
|
183 |
}
|
184 |
}
|
185 |
|
186 |
-
remove_filter('posts_join', 'wp_all_export_posts_join');
|
187 |
-
remove_filter('posts_where', 'wp_all_export_posts_where');
|
188 |
-
ob_end_clean();
|
189 |
}
|
190 |
}
|
191 |
|
37 |
{
|
38 |
XmlExportEngine::$exportOptions = $export->options + PMXE_Plugin::get_default_import_options();
|
39 |
XmlExportEngine::$exportOptions['export_only_new_stuff'] = $post['export_only_new_stuff'];
|
40 |
+
if (!empty($post['wpml_lang'])) XmlExportEngine::$exportOptions['wpml_lang'] = $post['wpml_lang'];
|
41 |
+
}
|
42 |
+
else{
|
43 |
+
XmlExportEngine::$exportOptions['wpml_lang'] = empty($post['wpml_lang']) ? 'all' : $post['wpml_lang'];
|
44 |
+
}
|
45 |
+
|
46 |
+
if (class_exists('SitePress') && !empty(XmlExportEngine::$exportOptions['wpml_lang'])){
|
47 |
+
do_action( 'wpml_switch_language', XmlExportEngine::$exportOptions['wpml_lang'] );
|
48 |
}
|
49 |
|
50 |
XmlExportEngine::$is_user_export = ( 'users' == $post['cpt'] or 'shop_customer' == $post['cpt'] ) ? true : false;
|
157 |
}
|
158 |
}
|
159 |
else
|
160 |
+
{
|
161 |
remove_all_actions('parse_query');
|
162 |
+
remove_all_actions('pre_get_posts');
|
163 |
+
remove_all_filters('posts_clauses');
|
164 |
|
165 |
$cpt = ($is_products_export) ? array('product', 'product_variation') : array($post['cpt']);
|
166 |
|
167 |
// get total custom post type records
|
168 |
$totalQuery = new WP_Query( array( 'post_type' => $cpt, 'post_status' => 'any', 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => 10 ));
|
169 |
if ( ! empty($totalQuery->found_posts)){
|
170 |
+
$total_records = $totalQuery->found_posts;
|
171 |
}
|
172 |
|
173 |
wp_reset_postdata();
|
175 |
ob_start();
|
176 |
// get custom post type records depends on filters
|
177 |
add_filter('posts_where', 'wp_all_export_posts_where', 10, 1);
|
178 |
+
add_filter('posts_join', 'wp_all_export_posts_join', 10, 1);
|
179 |
+
|
180 |
$exportQuery = new WP_Query( array( 'post_type' => $cpt, 'post_status' => 'any', 'orderby' => 'ID', 'order' => 'ASC', 'posts_per_page' => 10 ));
|
181 |
+
if ( ! empty($exportQuery->found_posts))
|
182 |
{
|
183 |
+
$found_records = $exportQuery->found_posts;
|
184 |
}
|
185 |
|
186 |
if($is_products_export) {
|
191 |
}
|
192 |
}
|
193 |
|
194 |
+
remove_filter('posts_join', 'wp_all_export_posts_join');
|
195 |
+
remove_filter('posts_where', 'wp_all_export_posts_where');
|
196 |
+
ob_end_clean();
|
197 |
}
|
198 |
}
|
199 |
|
actions/wp_ajax_wpae_preview.php
CHANGED
@@ -44,7 +44,9 @@ function pmxe_wp_ajax_wpae_preview(){
|
|
44 |
XmlExportEngine::$is_taxonomy_export = $exportOptions['is_taxonomy_export'];
|
45 |
XmlExportEngine::$exportID = $export_id;
|
46 |
|
47 |
-
|
|
|
|
|
48 |
|
49 |
if ( in_array(XmlExportEngine::$exportOptions['xml_template_type'], array('custom', 'XmlGoogleMerchants')) ){
|
50 |
|
44 |
XmlExportEngine::$is_taxonomy_export = $exportOptions['is_taxonomy_export'];
|
45 |
XmlExportEngine::$exportID = $export_id;
|
46 |
|
47 |
+
if ( class_exists('SitePress') && ! empty(XmlExportEngine::$exportOptions['wpml_lang'])){
|
48 |
+
do_action( 'wpml_switch_language', XmlExportEngine::$exportOptions['wpml_lang'] );
|
49 |
+
}
|
50 |
|
51 |
if ( in_array(XmlExportEngine::$exportOptions['xml_template_type'], array('custom', 'XmlGoogleMerchants')) ){
|
52 |
|
actions/wp_ajax_wpallexport.php
CHANGED
@@ -39,6 +39,10 @@ function pmxe_wp_ajax_wpallexport(){
|
|
39 |
XmlExportEngine::$exportID = $export_id;
|
40 |
XmlExportEngine::$exportRecord = $export;
|
41 |
|
|
|
|
|
|
|
|
|
42 |
$errors = new WP_Error();
|
43 |
$engine = new XmlExportEngine($exportOptions, $errors);
|
44 |
|
39 |
XmlExportEngine::$exportID = $export_id;
|
40 |
XmlExportEngine::$exportRecord = $export;
|
41 |
|
42 |
+
if ( class_exists('SitePress') && ! empty(XmlExportEngine::$exportOptions['wpml_lang'])){
|
43 |
+
do_action( 'wpml_switch_language', XmlExportEngine::$exportOptions['wpml_lang'] );
|
44 |
+
}
|
45 |
+
|
46 |
$errors = new WP_Error();
|
47 |
$engine = new XmlExportEngine($exportOptions, $errors);
|
48 |
|
classes/wpallimport.php
CHANGED
@@ -297,6 +297,8 @@ final class PMXE_Wpallimport
|
|
297 |
self::$templateOptions['matching_parent'] = 'first_is_parent_id';
|
298 |
//self::$templateOptions['single_product_id_first_is_parent_id'] = '{parent_id[1]}';
|
299 |
}
|
|
|
|
|
300 |
}
|
301 |
}
|
302 |
|
297 |
self::$templateOptions['matching_parent'] = 'first_is_parent_id';
|
298 |
//self::$templateOptions['single_product_id_first_is_parent_id'] = '{parent_id[1]}';
|
299 |
}
|
300 |
+
self::$templateOptions['create_new_records'] = 0;
|
301 |
+
self::$templateOptions['is_update_product_type'] = 0;
|
302 |
}
|
303 |
}
|
304 |
|
controllers/admin/export.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
|
8 |
class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
9 |
|
10 |
-
protected $isWizard = true; // indicates whether controller is in wizard mode (
|
11 |
|
12 |
protected function init() {
|
13 |
|
@@ -43,6 +43,7 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
43 |
/**
|
44 |
* Checks whether corresponding step of wizard is complete
|
45 |
* @param string $action
|
|
|
46 |
*/
|
47 |
protected function _step_ready($action) {
|
48 |
|
@@ -184,11 +185,14 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
184 |
|
185 |
$this->data['dismiss_warnings'] = 0;
|
186 |
if ($this->isWizard) {
|
|
|
187 |
$DefaultOptions = (PMXE_Plugin::$session->has_session() ? PMXE_Plugin::$session->get_clear_session_data() : array()) + $default;
|
188 |
$post = $this->input->post($DefaultOptions);
|
189 |
}
|
190 |
else{
|
|
|
191 |
$DefaultOptions = $this->data['export']->options + $default;
|
|
|
192 |
if (empty($this->data['export']->options['export_variations'])){
|
193 |
$DefaultOptions['export_variations'] = XmlExportEngine::VARIABLE_PRODUCTS_EXPORT_PARENT_AND_VARIATION;
|
194 |
}
|
@@ -233,11 +237,9 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
233 |
unset($template_options['wp_query_selector']);
|
234 |
$this->data['post'] = array_merge($post, $template_options);
|
235 |
PMXE_Plugin::$session->set('is_loaded_template', $load_template);
|
236 |
-
//PMXE_Plugin::$session->set('options', $template_options);
|
237 |
}
|
238 |
|
239 |
} elseif ($this->input->post('is_submitted')) {
|
240 |
-
|
241 |
check_admin_referer('template', '_wpnonce_template');
|
242 |
|
243 |
if ( empty($post['cc_type'][0]) && ! in_array($post['xml_template_type'], array('custom', 'XmlGoogleMerchants')) ){
|
@@ -289,9 +291,7 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
289 |
}
|
290 |
wp_redirect(add_query_arg(array('page' => 'pmxe-admin-manage', 'pmxe_nt' => urlencode(__('Options updated', 'pmxi_plugin'))) + array_intersect_key($_GET, array_flip($this->baseUrlParamNames)), admin_url('admin.php'))); die();
|
291 |
}
|
292 |
-
|
293 |
}
|
294 |
-
|
295 |
}
|
296 |
|
297 |
if ( empty($this->data['engine']) ){
|
@@ -307,6 +307,20 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
307 |
|
308 |
$this->data['available_fields_view'] = $this->data['engine']->render_new_field();
|
309 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
$this->render();
|
311 |
}
|
312 |
|
@@ -315,7 +329,6 @@ class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
|
315 |
*/
|
316 |
public function options()
|
317 |
{
|
318 |
-
|
319 |
$default = PMXE_Plugin::get_default_import_options();
|
320 |
|
321 |
if ($this->isWizard) {
|
7 |
|
8 |
class PMXE_Admin_Export extends PMXE_Controller_Admin {
|
9 |
|
10 |
+
protected $isWizard = true; // indicates whether controller is in wizard mode (otherwise it called to be delegated an edit action)
|
11 |
|
12 |
protected function init() {
|
13 |
|
43 |
/**
|
44 |
* Checks whether corresponding step of wizard is complete
|
45 |
* @param string $action
|
46 |
+
* @return bool
|
47 |
*/
|
48 |
protected function _step_ready($action) {
|
49 |
|
185 |
|
186 |
$this->data['dismiss_warnings'] = 0;
|
187 |
if ($this->isWizard) {
|
188 |
+
// New export
|
189 |
$DefaultOptions = (PMXE_Plugin::$session->has_session() ? PMXE_Plugin::$session->get_clear_session_data() : array()) + $default;
|
190 |
$post = $this->input->post($DefaultOptions);
|
191 |
}
|
192 |
else{
|
193 |
+
// Edit export
|
194 |
$DefaultOptions = $this->data['export']->options + $default;
|
195 |
+
|
196 |
if (empty($this->data['export']->options['export_variations'])){
|
197 |
$DefaultOptions['export_variations'] = XmlExportEngine::VARIABLE_PRODUCTS_EXPORT_PARENT_AND_VARIATION;
|
198 |
}
|
237 |
unset($template_options['wp_query_selector']);
|
238 |
$this->data['post'] = array_merge($post, $template_options);
|
239 |
PMXE_Plugin::$session->set('is_loaded_template', $load_template);
|
|
|
240 |
}
|
241 |
|
242 |
} elseif ($this->input->post('is_submitted')) {
|
|
|
243 |
check_admin_referer('template', '_wpnonce_template');
|
244 |
|
245 |
if ( empty($post['cc_type'][0]) && ! in_array($post['xml_template_type'], array('custom', 'XmlGoogleMerchants')) ){
|
291 |
}
|
292 |
wp_redirect(add_query_arg(array('page' => 'pmxe-admin-manage', 'pmxe_nt' => urlencode(__('Options updated', 'pmxi_plugin'))) + array_intersect_key($_GET, array_flip($this->baseUrlParamNames)), admin_url('admin.php'))); die();
|
293 |
}
|
|
|
294 |
}
|
|
|
295 |
}
|
296 |
|
297 |
if ( empty($this->data['engine']) ){
|
307 |
|
308 |
$this->data['available_fields_view'] = $this->data['engine']->render_new_field();
|
309 |
|
310 |
+
if (class_exists('SitePress')){
|
311 |
+
global $sitepress;
|
312 |
+
$langs = $sitepress->get_active_languages();
|
313 |
+
if ( ! empty($langs) ){
|
314 |
+
// prepare active languages list
|
315 |
+
$language_list = array('all' => 'All');
|
316 |
+
foreach ($langs as $code => $langInfo){
|
317 |
+
$language_list[$code] = "<img width='18' height='12' src='" . $sitepress->get_flag_url($code) . "' style='position:relative; top: 2px;'/> " . $langInfo['display_name'];
|
318 |
+
if ($code == $this->default_language) $language_list[$code] .= ' ( <strong>default</strong> )';
|
319 |
+
}
|
320 |
+
}
|
321 |
+
$this->data['wpml_options'] = $language_list;
|
322 |
+
}
|
323 |
+
|
324 |
$this->render();
|
325 |
}
|
326 |
|
329 |
*/
|
330 |
public function options()
|
331 |
{
|
|
|
332 |
$default = PMXE_Plugin::get_default_import_options();
|
333 |
|
334 |
if ($this->isWizard) {
|
controllers/admin/manage.php
CHANGED
@@ -30,7 +30,7 @@ class PMXE_Admin_Manage extends PMXE_Controller_Admin {
|
|
30 |
extract($get);
|
31 |
$this->data += $get;
|
32 |
|
33 |
-
if ( ! in_array($order_by, array('registered_on', 'id', '
|
34 |
$order_by = 'registered_on';
|
35 |
}
|
36 |
|
@@ -42,7 +42,7 @@ class PMXE_Admin_Manage extends PMXE_Controller_Admin {
|
|
42 |
$by = array('parent_id' => 0);
|
43 |
if ('' != $s) {
|
44 |
$like = '%' . preg_replace('%\s+%', '%', preg_replace('/[%?]/', '\\\\$0', $s)) . '%';
|
45 |
-
$by[] = array(array('
|
46 |
}
|
47 |
|
48 |
$this->data['list'] = $list->setColumns(
|
@@ -105,7 +105,7 @@ class PMXE_Admin_Manage extends PMXE_Controller_Admin {
|
|
105 |
|
106 |
if ( ! empty($item['options']['bundlepath']) )
|
107 |
{
|
108 |
-
$this->data['bundle_url'] = site_url() . '/wp-cron.php?export_hash=' . substr(md5($this->data['cron_job_key'] . $item['id']), 0, 16) . '&export_id=' . $item['id'] . '&action=get_bundle';
|
109 |
}
|
110 |
|
111 |
$this->render();
|
30 |
extract($get);
|
31 |
$this->data += $get;
|
32 |
|
33 |
+
if ( ! in_array($order_by, array('registered_on', 'id', 'friendly_name'))){
|
34 |
$order_by = 'registered_on';
|
35 |
}
|
36 |
|
42 |
$by = array('parent_id' => 0);
|
43 |
if ('' != $s) {
|
44 |
$like = '%' . preg_replace('%\s+%', '%', preg_replace('/[%?]/', '\\\\$0', $s)) . '%';
|
45 |
+
$by[] = array(array('friendly_name LIKE' => $like, 'registered_on LIKE' => $like), 'OR');
|
46 |
}
|
47 |
|
48 |
$this->data['list'] = $list->setColumns(
|
105 |
|
106 |
if ( ! empty($item['options']['bundlepath']) )
|
107 |
{
|
108 |
+
$this->data['bundle_url'] = site_url() . '/wp-cron.php?export_hash=' . substr(md5($this->data['cron_job_key'] . $item['id']), 0, 16) . '&export_id=' . $item['id'] . '&action=get_bundle&t=zip';
|
109 |
}
|
110 |
|
111 |
$this->render();
|
controllers/controller/admin.php
CHANGED
@@ -68,7 +68,7 @@ abstract class PMXE_Controller_Admin extends PMXE_Controller {
|
|
68 |
//wp_enqueue_script('jquery-ui-autocomplete', PMXE_ROOT_URL . '/static/js/jquery/ui.autocomplete.js', array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'));
|
69 |
wp_enqueue_script('jquery-tipsy', PMXE_ROOT_URL . '/static/js/jquery/jquery.tipsy.js', 'jquery');
|
70 |
wp_enqueue_script('jquery-pmxe-nestable', PMXE_ROOT_URL . '/static/js/jquery/jquery.mjs.pmxe_nestedSortable.js', array('jquery', 'jquery-ui-dialog', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-tabs', 'jquery-ui-progressbar'));
|
71 |
-
wp_enqueue_script('jquery-moment', PMXE_ROOT_URL . '/static/js/jquery/moment.js', 'jquery');
|
72 |
wp_enqueue_script('jquery-select2', PMXE_ROOT_URL . '/static/js/jquery/select2.min.js', 'jquery');
|
73 |
wp_enqueue_script('jquery-ddslick', PMXE_ROOT_URL . '/static/js/jquery/jquery.ddslick.min.js', 'jquery');
|
74 |
wp_enqueue_script('jquery-chosen', PMXE_ROOT_URL . '/static/js/jquery/chosen.jquery.min.js', 'jquery');
|
68 |
//wp_enqueue_script('jquery-ui-autocomplete', PMXE_ROOT_URL . '/static/js/jquery/ui.autocomplete.js', array('jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position'));
|
69 |
wp_enqueue_script('jquery-tipsy', PMXE_ROOT_URL . '/static/js/jquery/jquery.tipsy.js', 'jquery');
|
70 |
wp_enqueue_script('jquery-pmxe-nestable', PMXE_ROOT_URL . '/static/js/jquery/jquery.mjs.pmxe_nestedSortable.js', array('jquery', 'jquery-ui-dialog', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-tabs', 'jquery-ui-progressbar'));
|
71 |
+
wp_enqueue_script('jquery-moment', PMXE_ROOT_URL . '/static/js/jquery/moment.js', 'jquery', PMXE_VERSION);
|
72 |
wp_enqueue_script('jquery-select2', PMXE_ROOT_URL . '/static/js/jquery/select2.min.js', 'jquery');
|
73 |
wp_enqueue_script('jquery-ddslick', PMXE_ROOT_URL . '/static/js/jquery/jquery.ddslick.min.js', 'jquery');
|
74 |
wp_enqueue_script('jquery-chosen', PMXE_ROOT_URL . '/static/js/jquery/chosen.jquery.min.js', 'jquery');
|
dist/app.js
ADDED
@@ -0,0 +1,39220 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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