Version Description
- improvement: compatibility with PHP 7.x
Download this release
Release Info
Developer | soflyy |
Plugin | Export WordPress data to XML/CSV |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.1.1
- readme.txt +4 -1
- wp-all-export.php +13 -21
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Contributors: soflyy, wpallimport
|
3 |
Requires at least: 4.1
|
4 |
Tested up to: 4.7
|
5 |
-
Stable tag: 1.1.
|
6 |
Tags: wordpress csv export, wordpress xml export, xml, csv, datafeed, export, 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
|
7 |
|
8 |
WP All Export is an extremely powerful exporter that makes it easy to export any XML or CSV file from WordPress.
|
@@ -78,6 +78,9 @@ Either: -
|
|
78 |
|
79 |
== Changelog ==
|
80 |
|
|
|
|
|
|
|
81 |
= 1.1.0 =
|
82 |
* improvement: added ACF fields to 'migrate' & 'add all fields' features
|
83 |
* improvement: added new filter 'wp_all_export_field_name'
|
2 |
Contributors: soflyy, wpallimport
|
3 |
Requires at least: 4.1
|
4 |
Tested up to: 4.7
|
5 |
+
Stable tag: 1.1.1
|
6 |
Tags: wordpress csv export, wordpress xml export, xml, csv, datafeed, export, 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
|
7 |
|
8 |
WP All Export is an extremely powerful exporter that makes it easy to export any XML or CSV file from WordPress.
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 1.1.1 =
|
82 |
+
* improvement: compatibility with PHP 7.x
|
83 |
+
|
84 |
= 1.1.0 =
|
85 |
* improvement: added ACF fields to 'migrate' & 'add all fields' features
|
86 |
* improvement: added new filter 'wp_all_export_field_name'
|
wp-all-export.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP All Export
|
4 |
Plugin URI: http://www.wpallimport.com/export/
|
5 |
Description: 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.1.
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
@@ -52,7 +52,7 @@ else {
|
|
52 |
*/
|
53 |
define('PMXE_PREFIX', 'pmxe_');
|
54 |
|
55 |
-
define('PMXE_VERSION', '1.1.
|
56 |
|
57 |
define('PMXE_EDITION', 'free');
|
58 |
|
@@ -234,11 +234,8 @@ else {
|
|
234 |
*/
|
235 |
protected function __construct() {
|
236 |
|
237 |
-
//
|
238 |
-
|
239 |
-
spl_autoload_register('__autoload');
|
240 |
-
}
|
241 |
-
spl_autoload_register(array($this, '__autoload'));
|
242 |
|
243 |
// register helpers
|
244 |
if (is_dir(self::ROOT_DIR . '/helpers')) foreach (PMXE_Helper::safe_glob(self::ROOT_DIR . '/helpers/*.php', PMXE_Helper::GLOB_RECURSE | PMXE_Helper::GLOB_PATH) as $filePath) {
|
@@ -254,7 +251,7 @@ else {
|
|
254 |
|
255 |
update_option($option_name, $this->options);
|
256 |
$this->options = get_option(get_class($this) . '_Options');
|
257 |
-
register_activation_hook(self::FILE, array($this, '
|
258 |
|
259 |
// register action handlers
|
260 |
if (is_dir(self::ROOT_DIR . '/actions')) if (is_dir(self::ROOT_DIR . '/actions')) foreach (PMXE_Helper::safe_glob(self::ROOT_DIR . '/actions/*.php', PMXE_Helper::GLOB_RECURSE | PMXE_Helper::GLOB_PATH) as $filePath) {
|
@@ -289,8 +286,8 @@ else {
|
|
289 |
}
|
290 |
|
291 |
// register admin page pre-dispatcher
|
292 |
-
add_action('admin_init', array($this, '
|
293 |
-
add_action('admin_init', array($this, '
|
294 |
add_action('init', array($this, 'init'));
|
295 |
}
|
296 |
|
@@ -301,7 +298,7 @@ else {
|
|
301 |
/**
|
302 |
* pre-dispatching logic for admin page controllers
|
303 |
*/
|
304 |
-
public function
|
305 |
|
306 |
// create history folder
|
307 |
$uploads = wp_upload_dir();
|
@@ -337,12 +334,7 @@ else {
|
|
337 |
$action = strtolower($input->getpost('action', 'index'));
|
338 |
|
339 |
// capitalize prefix and first letters of class name parts
|
340 |
-
|
341 |
-
$controllerName = preg_replace_callback('%(^' . preg_quote(self::PREFIX, '%') . '|_).%', array($this, "replace_callback"),str_replace('-', '_', $page));
|
342 |
-
}
|
343 |
-
else{
|
344 |
-
$controllerName = preg_replace('%(^' . preg_quote(self::PREFIX, '%') . '|_).%e', 'strtoupper("$0")', str_replace('-', '_', $page));
|
345 |
-
}
|
346 |
$actionName = str_replace('-', '_', $action);
|
347 |
if (method_exists($controllerName, $actionName)) {
|
348 |
|
@@ -397,7 +389,7 @@ else {
|
|
397 |
*/
|
398 |
public function shortcodeDispatcher($args, $content, $tag) {
|
399 |
|
400 |
-
$controllerName = self::PREFIX .
|
401 |
$controller = new $controllerName();
|
402 |
if ( ! $controller instanceof PMXE_Controller) {
|
403 |
throw new Exception("Shortcode `$tag` matches to a wrong controller type.");
|
@@ -453,7 +445,7 @@ else {
|
|
453 |
* @param string $className
|
454 |
* @return bool
|
455 |
*/
|
456 |
-
public function
|
457 |
$is_prefix = false;
|
458 |
$filePath = str_replace('_', '/', preg_replace('%^' . preg_quote(self::PREFIX, '%') . '%', '', strtolower($className), 1, $is_prefix)) . '.php';
|
459 |
if ( ! $is_prefix) { // also check file with original letter case
|
@@ -540,7 +532,7 @@ else {
|
|
540 |
/**
|
541 |
* Plugin activation logic
|
542 |
*/
|
543 |
-
public function
|
544 |
// uncaught exception doesn't prevent plugin from being activated, therefore replace it with fatal error so it does
|
545 |
set_exception_handler(create_function('$e', 'trigger_error($e->getMessage(), E_USER_ERROR);'));
|
546 |
|
@@ -589,7 +581,7 @@ else {
|
|
589 |
load_plugin_textdomain( 'wp_all_export_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
|
590 |
}
|
591 |
|
592 |
-
public function
|
593 |
|
594 |
global $wpdb;
|
595 |
|
3 |
Plugin Name: WP All Export
|
4 |
Plugin URI: http://www.wpallimport.com/export/
|
5 |
Description: 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.1.1
|
7 |
Author: Soflyy
|
8 |
*/
|
9 |
|
52 |
*/
|
53 |
define('PMXE_PREFIX', 'pmxe_');
|
54 |
|
55 |
+
define('PMXE_VERSION', '1.1.1');
|
56 |
|
57 |
define('PMXE_EDITION', 'free');
|
58 |
|
234 |
*/
|
235 |
protected function __construct() {
|
236 |
|
237 |
+
// register autoloading method
|
238 |
+
spl_autoload_register(array($this, 'autoload'));
|
|
|
|
|
|
|
239 |
|
240 |
// register helpers
|
241 |
if (is_dir(self::ROOT_DIR . '/helpers')) foreach (PMXE_Helper::safe_glob(self::ROOT_DIR . '/helpers/*.php', PMXE_Helper::GLOB_RECURSE | PMXE_Helper::GLOB_PATH) as $filePath) {
|
251 |
|
252 |
update_option($option_name, $this->options);
|
253 |
$this->options = get_option(get_class($this) . '_Options');
|
254 |
+
register_activation_hook(self::FILE, array($this, 'activation'));
|
255 |
|
256 |
// register action handlers
|
257 |
if (is_dir(self::ROOT_DIR . '/actions')) if (is_dir(self::ROOT_DIR . '/actions')) foreach (PMXE_Helper::safe_glob(self::ROOT_DIR . '/actions/*.php', PMXE_Helper::GLOB_RECURSE | PMXE_Helper::GLOB_PATH) as $filePath) {
|
286 |
}
|
287 |
|
288 |
// register admin page pre-dispatcher
|
289 |
+
add_action('admin_init', array($this, 'adminInit'));
|
290 |
+
add_action('admin_init', array($this, 'fix_db_schema'));
|
291 |
add_action('init', array($this, 'init'));
|
292 |
}
|
293 |
|
298 |
/**
|
299 |
* pre-dispatching logic for admin page controllers
|
300 |
*/
|
301 |
+
public function adminInit() {
|
302 |
|
303 |
// create history folder
|
304 |
$uploads = wp_upload_dir();
|
334 |
$action = strtolower($input->getpost('action', 'index'));
|
335 |
|
336 |
// capitalize prefix and first letters of class name parts
|
337 |
+
$controllerName = preg_replace_callback('%(^' . preg_quote(self::PREFIX, '%') . '|_).%', array($this, "replace_callback"),str_replace('-', '_', $page));
|
|
|
|
|
|
|
|
|
|
|
338 |
$actionName = str_replace('-', '_', $action);
|
339 |
if (method_exists($controllerName, $actionName)) {
|
340 |
|
389 |
*/
|
390 |
public function shortcodeDispatcher($args, $content, $tag) {
|
391 |
|
392 |
+
$controllerName = self::PREFIX . preg_replace_callback('%(^|_).%', array($this, "replace_callback"), $tag);// capitalize first letters of class name parts and add prefix
|
393 |
$controller = new $controllerName();
|
394 |
if ( ! $controller instanceof PMXE_Controller) {
|
395 |
throw new Exception("Shortcode `$tag` matches to a wrong controller type.");
|
445 |
* @param string $className
|
446 |
* @return bool
|
447 |
*/
|
448 |
+
public function autoload($className) {
|
449 |
$is_prefix = false;
|
450 |
$filePath = str_replace('_', '/', preg_replace('%^' . preg_quote(self::PREFIX, '%') . '%', '', strtolower($className), 1, $is_prefix)) . '.php';
|
451 |
if ( ! $is_prefix) { // also check file with original letter case
|
532 |
/**
|
533 |
* Plugin activation logic
|
534 |
*/
|
535 |
+
public function activation() {
|
536 |
// uncaught exception doesn't prevent plugin from being activated, therefore replace it with fatal error so it does
|
537 |
set_exception_handler(create_function('$e', 'trigger_error($e->getMessage(), E_USER_ERROR);'));
|
538 |
|
581 |
load_plugin_textdomain( 'wp_all_export_plugin', false, dirname( plugin_basename( __FILE__ ) ) . "/i18n/languages" );
|
582 |
}
|
583 |
|
584 |
+
public function fix_db_schema(){
|
585 |
|
586 |
global $wpdb;
|
587 |
|