Version Description
- Export checkbox included to avoid conversion to date format to prevent problem with some data converted that should not be converted
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.15.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.15.6.1 to 1.15.6.2
- classes/export.php +10 -2
- import-users-from-csv-with-meta.php +1 -1
- importer.php +1 -1
- readme.txt +4 -2
classes/export.php
CHANGED
@@ -51,6 +51,13 @@ class ACUI_Exporter{
|
|
51 |
</select>
|
52 |
</td>
|
53 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
<tr valign="top">
|
55 |
<th scope="row"><?php _e( 'Datetime format', 'import-users-from-csv-with-meta' ); ?></th>
|
56 |
<td>
|
@@ -86,7 +93,7 @@ class ACUI_Exporter{
|
|
86 |
|
87 |
if( is_array( $value ) )
|
88 |
return serialize( $value );
|
89 |
-
elseif( in_array( $key, $non_date_keys ) ){
|
90 |
return $value;
|
91 |
}
|
92 |
elseif( strtotime( $value ) && !is_integer( $value ) && strlen( $value ) > 3 ){ // dates in datetime format
|
@@ -114,7 +121,8 @@ class ACUI_Exporter{
|
|
114 |
$from = sanitize_text_field( $_POST['from'] );
|
115 |
$to = sanitize_text_field( $_POST['to'] );
|
116 |
$delimiter = sanitize_text_field( $_POST['delimiter'] );
|
117 |
-
$
|
|
|
118 |
|
119 |
switch ( $delimiter ) {
|
120 |
case 'COMMA':
|
51 |
</select>
|
52 |
</td>
|
53 |
</tr>
|
54 |
+
<tr valign="top">
|
55 |
+
<th scope="row"><?php _e( 'Convert timestamp data to date format', 'import-users-from-csv-with-meta' ); ?></th>
|
56 |
+
<td>
|
57 |
+
<input type="checkbox" name="convert_timestamp" value="1" checked="checked">
|
58 |
+
<span class="description"><?php _e( 'If you have problems and you get some value exported as a date that should not be converted to date, please deactivate this option. If this option is not activated, datetime format will be ignored.', 'import-users-from-csv-with-meta' ); ?></span>
|
59 |
+
</td>
|
60 |
+
</tr>
|
61 |
<tr valign="top">
|
62 |
<th scope="row"><?php _e( 'Datetime format', 'import-users-from-csv-with-meta' ); ?></th>
|
63 |
<td>
|
93 |
|
94 |
if( is_array( $value ) )
|
95 |
return serialize( $value );
|
96 |
+
elseif( in_array( $key, $non_date_keys ) || empty( $datetime_format ) ){
|
97 |
return $value;
|
98 |
}
|
99 |
elseif( strtotime( $value ) && !is_integer( $value ) && strlen( $value ) > 3 ){ // dates in datetime format
|
121 |
$from = sanitize_text_field( $_POST['from'] );
|
122 |
$to = sanitize_text_field( $_POST['to'] );
|
123 |
$delimiter = sanitize_text_field( $_POST['delimiter'] );
|
124 |
+
$convert_timestamp = isset( $_POST['convert_timestamp'] ) && !empty( $_POST['convert_timestamp'] );
|
125 |
+
$datetime_format = ( $convert_timestamp ) ? sanitize_text_field( $_POST['datetime_format'] ) : '';
|
126 |
|
127 |
switch ( $delimiter ) {
|
128 |
case 'COMMA':
|
import-users-from-csv-with-meta.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
-
Version: 1.15.6.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
+
Version: 1.15.6.2
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
importer.php
CHANGED
@@ -349,7 +349,7 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
|
|
349 |
$user_object = new WP_User( $user_id );
|
350 |
|
351 |
if( $created || $update_roles_existing_users != 'no' ){
|
352 |
-
if(!( in_array("administrator", acui_get_roles($user_id), FALSE) || is_multisite() && is_super_admin( $user_id ) )){
|
353 |
|
354 |
if( $update_roles_existing_users == 'yes' || $created ){
|
355 |
$default_roles = $user_object->roles;
|
349 |
$user_object = new WP_User( $user_id );
|
350 |
|
351 |
if( $created || $update_roles_existing_users != 'no' ){
|
352 |
+
if( !( in_array("administrator", acui_get_roles($user_id), FALSE) || is_multisite() && is_super_admin( $user_id ) )){
|
353 |
|
354 |
if( $update_roles_existing_users == 'yes' || $created ){
|
355 |
$default_roles = $user_object->roles;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://codection.com/go/donate-import-users-from-csv-with-meta/
|
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.4.1
|
7 |
-
Stable tag: 1.15.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,9 +99,11 @@ Plugin will automatically detect:
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
102 |
= 1.15.6.1 =
|
103 |
* ACF addon now append values instead of replacing it
|
104 |
-
* Created a new variable for managing data that should not be updated using the standard WordPress function
|
105 |
|
106 |
= 1.15.6 =
|
107 |
* ACF compatibility included
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.4.1
|
7 |
+
Stable tag: 1.15.6.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 1.15.6.2 =
|
103 |
+
* Export checkbox included to avoid conversion to date format to prevent problem with some data converted that should not be converted
|
104 |
+
|
105 |
= 1.15.6.1 =
|
106 |
* ACF addon now append values instead of replacing it
|
|
|
107 |
|
108 |
= 1.15.6 =
|
109 |
* ACF compatibility included
|