Version Description
- Now you can import list of elements using :: as separator and it can also be done in BuddyPress profile fields thanks to Jon Eiseman
- Fixes in SMTP settings
- SMTP settings now is a new tab
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.10.5 |
Comparing to | |
See all releases |
Code changes from version 1.10.4 to 1.10.5
- import-users-from-csv-with-meta.php +13 -3
- importer.php +21 -2
- readme.txt +6 -1
- smtp.php +7 -12
import-users-from-csv-with-meta.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Import users from CSV with meta
|
|
4 |
Plugin URI: http://www.codection.com
|
5 |
Description: This plugins allows to import users using CSV files to WP database automatically
|
6 |
Author: codection
|
7 |
-
Version: 1.10.
|
8 |
Author URI: http://codection.com
|
9 |
Text Domain: import-users-from-csv-with-meta
|
10 |
Domain Path: /languages
|
@@ -104,7 +104,6 @@ function acui_delete_options(){
|
|
104 |
|
105 |
function acui_menu() {
|
106 |
add_submenu_page( 'tools.php', __( 'Insert users massively (CSV)', 'import-users-from-csv-with-meta' ), __( 'Import users from CSV', 'import-users-from-csv-with-meta' ), 'create_users', 'acui', 'acui_options' );
|
107 |
-
add_submenu_page( NULL, __( 'SMTP Configuration', 'import-users-from-csv-with-meta' ), __( 'SMTP Configuration', 'import-users-from-csv-with-meta' ), 'create_users', 'acui-smtp', 'acui_smtp' );
|
108 |
}
|
109 |
|
110 |
function acui_plugin_row_meta( $links, $file ){
|
@@ -209,7 +208,18 @@ function acui_check_options(){
|
|
209 |
}
|
210 |
|
211 |
function acui_admin_tabs( $current = 'homepage' ) {
|
212 |
-
$tabs = array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
echo '<div id="icon-themes" class="icon32"><br></div>';
|
214 |
echo '<h2 class="nav-tab-wrapper">';
|
215 |
foreach( $tabs as $tab => $name ){
|
4 |
Plugin URI: http://www.codection.com
|
5 |
Description: This plugins allows to import users using CSV files to WP database automatically
|
6 |
Author: codection
|
7 |
+
Version: 1.10.5
|
8 |
Author URI: http://codection.com
|
9 |
Text Domain: import-users-from-csv-with-meta
|
10 |
Domain Path: /languages
|
104 |
|
105 |
function acui_menu() {
|
106 |
add_submenu_page( 'tools.php', __( 'Insert users massively (CSV)', 'import-users-from-csv-with-meta' ), __( 'Import users from CSV', 'import-users-from-csv-with-meta' ), 'create_users', 'acui', 'acui_options' );
|
|
|
107 |
}
|
108 |
|
109 |
function acui_plugin_row_meta( $links, $file ){
|
208 |
}
|
209 |
|
210 |
function acui_admin_tabs( $current = 'homepage' ) {
|
211 |
+
$tabs = array(
|
212 |
+
'homepage' => __( 'Import users from CSV', 'import-users-from-csv-with-meta' ),
|
213 |
+
'columns' => __( 'Customs columns loaded', 'import-users-from-csv-with-meta' ),
|
214 |
+
'mail-options' => __( 'Mail options', 'import-users-from-csv-with-meta' ),
|
215 |
+
'smtp-settings' => __( 'SMTP settings', 'import-users-from-csv-with-meta' ),
|
216 |
+
'doc' => __( 'Documentation', 'import-users-from-csv-with-meta' ),
|
217 |
+
'cron' => __( 'Cron import', 'import-users-from-csv-with-meta' ),
|
218 |
+
'donate' => __( 'Donate', 'import-users-from-csv-with-meta' ),
|
219 |
+
'shop' => __( 'Shop', 'import-users-from-csv-with-meta' ),
|
220 |
+
'help' => __( 'Hire an expert', 'import-users-from-csv-with-meta' )
|
221 |
+
);
|
222 |
+
|
223 |
echo '<div id="icon-themes" class="icon32"><br></div>';
|
224 |
echo '<h2 class="nav-tab-wrapper">';
|
225 |
foreach( $tabs as $tab => $name ){
|
importer.php
CHANGED
@@ -82,7 +82,11 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false
|
|
82 |
|
83 |
for($i = 0; $i < count($data); $i++){
|
84 |
$data[$i] = acui_string_conversion( $data[$i] );
|
85 |
-
|
|
|
|
|
|
|
|
|
86 |
}
|
87 |
|
88 |
if($row == 0):
|
@@ -365,8 +369,12 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false
|
|
365 |
$styles = "background-color:red; color:white;";
|
366 |
|
367 |
echo "<tr style='$styles' ><td>" . ($row - 1) . "</td>";
|
368 |
-
foreach ($data as $element)
|
|
|
|
|
|
|
369 |
echo "<td>$element</td>";
|
|
|
370 |
|
371 |
echo "</tr>\n";
|
372 |
|
@@ -897,6 +905,11 @@ function acui_options()
|
|
897 |
<td><?php _e( "Plugin can now import serialized data. You have to use the serialized string directly in the CSV cell in order the plugin will be able to understand it as an serialized data instead as any other string.", 'import-users-from-csv-with-meta' ); ?>
|
898 |
</td>
|
899 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
900 |
<tr valign="top">
|
901 |
<th scope="row"><?php _e( 'WordPress default profile data', 'import-users-from-csv-with-meta' ); ?></th>
|
902 |
<td><?php _e( "You can use those labels if you want to set data adapted to the WordPress default user columns (the ones who use the function", 'import-users-from-csv-with-meta' ); ?> <a href="http://codex.wordpress.org/Function_Reference/wp_update_user">wp_update_user</a>)
|
@@ -1044,6 +1057,12 @@ function acui_options()
|
|
1044 |
|
1045 |
<?php break; ?>
|
1046 |
|
|
|
|
|
|
|
|
|
|
|
|
|
1047 |
<?php case 'cron':
|
1048 |
|
1049 |
$cron_activated = get_option( "acui_cron_activated");
|
82 |
|
83 |
for($i = 0; $i < count($data); $i++){
|
84 |
$data[$i] = acui_string_conversion( $data[$i] );
|
85 |
+
|
86 |
+
if( is_serialized( $data[$i] ) ) // serialized
|
87 |
+
$data[$i] = maybe_unserialize( $data[$i] );
|
88 |
+
elseif( strpos( $data[$i], "::" ) !== false ) // list of items
|
89 |
+
$data[$i] = explode( "::", $data[$i] );
|
90 |
}
|
91 |
|
92 |
if($row == 0):
|
369 |
$styles = "background-color:red; color:white;";
|
370 |
|
371 |
echo "<tr style='$styles' ><td>" . ($row - 1) . "</td>";
|
372 |
+
foreach ($data as $element){
|
373 |
+
if( is_array( $element ) )
|
374 |
+
$element = implode ( ',' , $element );
|
375 |
+
|
376 |
echo "<td>$element</td>";
|
377 |
+
}
|
378 |
|
379 |
echo "</tr>\n";
|
380 |
|
905 |
<td><?php _e( "Plugin can now import serialized data. You have to use the serialized string directly in the CSV cell in order the plugin will be able to understand it as an serialized data instead as any other string.", 'import-users-from-csv-with-meta' ); ?>
|
906 |
</td>
|
907 |
</tr>
|
908 |
+
<tr valign="top">
|
909 |
+
<th scope="row"><?php _e( "Lists", 'import-users-from-csv-with-meta' ); ?></th>
|
910 |
+
<td><?php _e( "Plugin can now import lists an array. Use this separator:", 'import-users-from-csv-with-meta'); ?> <strong>::</strong> <?php _e("two colons, inside the cell in order to split the string in a list of items.", 'import-users-from-csv-with-meta' ); ?>
|
911 |
+
</td>
|
912 |
+
</tr>
|
913 |
<tr valign="top">
|
914 |
<th scope="row"><?php _e( 'WordPress default profile data', 'import-users-from-csv-with-meta' ); ?></th>
|
915 |
<td><?php _e( "You can use those labels if you want to set data adapted to the WordPress default user columns (the ones who use the function", 'import-users-from-csv-with-meta' ); ?> <a href="http://codex.wordpress.org/Function_Reference/wp_update_user">wp_update_user</a>)
|
1057 |
|
1058 |
<?php break; ?>
|
1059 |
|
1060 |
+
<?php case 'smtp-settings': ?>
|
1061 |
+
|
1062 |
+
<?php acui_smtp(); ?>
|
1063 |
+
|
1064 |
+
<?php break; ?>
|
1065 |
+
|
1066 |
<?php case 'cron':
|
1067 |
|
1068 |
$cron_activated = get_option( "acui_cron_activated");
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://paypal.me/codection
|
|
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: 4.7.2
|
7 |
-
Stable tag: 1.10.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -70,6 +70,11 @@ Plugin will automatically detect:
|
|
70 |
|
71 |
== Changelog ==
|
72 |
|
|
|
|
|
|
|
|
|
|
|
73 |
= 1.10.4 =
|
74 |
* Now you can assign BuddyPress groups and assign roles in import thanks to TNTP (tntp.org)
|
75 |
* Import optimization
|
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: 4.7.2
|
7 |
+
Stable tag: 1.10.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
70 |
|
71 |
== Changelog ==
|
72 |
|
73 |
+
= 1.10.5 =
|
74 |
+
* Now you can import list of elements using :: as separator and it can also be done in BuddyPress profile fields thanks to Jon Eiseman
|
75 |
+
* Fixes in SMTP settings
|
76 |
+
* SMTP settings now is a new tab
|
77 |
+
|
78 |
= 1.10.4 =
|
79 |
* Now you can assign BuddyPress groups and assign roles in import thanks to TNTP (tntp.org)
|
80 |
* Import optimization
|
smtp.php
CHANGED
@@ -23,8 +23,7 @@ function acui_smtp() {
|
|
23 |
global $acui_smtp_options, $phpmailer;
|
24 |
|
25 |
// Send a test mail if necessary
|
26 |
-
if
|
27 |
-
|
28 |
check_admin_referer('test-email');
|
29 |
|
30 |
if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
|
@@ -97,13 +96,12 @@ function acui_smtp() {
|
|
97 |
remove_action( 'phpmailer_init', 'acui_mailer_init' );
|
98 |
}
|
99 |
|
100 |
-
if
|
101 |
check_admin_referer('email-config');
|
102 |
|
103 |
foreach ($acui_smtp_options as $name => $val) {
|
104 |
update_option( $name, $_POST[ $name ] );
|
105 |
}
|
106 |
-
|
107 |
}
|
108 |
|
109 |
// in version 1.8.7 we include this new option, we fill it in a smart way
|
@@ -113,6 +111,7 @@ function acui_smtp() {
|
|
113 |
else
|
114 |
update_option( "acui_settings", "plugin" );
|
115 |
}
|
|
|
116 |
?>
|
117 |
|
118 |
<div class="wrap">
|
@@ -224,16 +223,12 @@ function acui_smtp() {
|
|
224 |
</tr>
|
225 |
</table>
|
226 |
|
227 |
-
<p class="submit"><input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" /></p>
|
228 |
-
<input type="hidden" name="action" value="update" />
|
229 |
-
</p>
|
230 |
-
|
231 |
-
<input type="hidden" name="option_page" value="acui-smtp">
|
232 |
</form>
|
233 |
|
234 |
<h3><?php _e('Send a Test Email', 'acui'); ?></h3>
|
235 |
|
236 |
-
<form method="POST" action="
|
237 |
<?php wp_nonce_field('test-email'); ?>
|
238 |
<table class="optiontable form-table">
|
239 |
<tr valign="top">
|
@@ -258,12 +253,12 @@ jQuery( document ).ready( function( $ ){
|
|
258 |
});
|
259 |
|
260 |
function disableControls(){
|
261 |
-
$("#acui_smtp_options :input").not(":input[type=submit]").prop("disabled", true);
|
262 |
$("[name='acui_settings']").prop("disabled", false);
|
263 |
}
|
264 |
|
265 |
function enableControls(){
|
266 |
-
$("#acui_smtp_options :input").not(":input[type=submit]").prop("disabled", false);
|
267 |
}
|
268 |
|
269 |
<?php if( get_option( "acui_settings" ) == "wordpress" ): ?>
|
23 |
global $acui_smtp_options, $phpmailer;
|
24 |
|
25 |
// Send a test mail if necessary
|
26 |
+
if( isset( $_POST['acui_smpt_action'] ) && $_POST['acui_smpt_action'] == __('Send Test', 'acui') && isset( $_POST['to'] ) ){
|
|
|
27 |
check_admin_referer('test-email');
|
28 |
|
29 |
if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
|
96 |
remove_action( 'phpmailer_init', 'acui_mailer_init' );
|
97 |
}
|
98 |
|
99 |
+
if( isset( $_POST['acui_settings'] ) && !empty( $_POST['acui_settings'] ) ) {
|
100 |
check_admin_referer('email-config');
|
101 |
|
102 |
foreach ($acui_smtp_options as $name => $val) {
|
103 |
update_option( $name, $_POST[ $name ] );
|
104 |
}
|
|
|
105 |
}
|
106 |
|
107 |
// in version 1.8.7 we include this new option, we fill it in a smart way
|
111 |
else
|
112 |
update_option( "acui_settings", "plugin" );
|
113 |
}
|
114 |
+
|
115 |
?>
|
116 |
|
117 |
<div class="wrap">
|
223 |
</tr>
|
224 |
</table>
|
225 |
|
226 |
+
<p class="submit"><input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e('Save Changes'); ?>" /></p>
|
|
|
|
|
|
|
|
|
227 |
</form>
|
228 |
|
229 |
<h3><?php _e('Send a Test Email', 'acui'); ?></h3>
|
230 |
|
231 |
+
<form method="POST" action="">
|
232 |
<?php wp_nonce_field('test-email'); ?>
|
233 |
<table class="optiontable form-table">
|
234 |
<tr valign="top">
|
253 |
});
|
254 |
|
255 |
function disableControls(){
|
256 |
+
$("#acui_smtp_options :input").not(":input[type=submit],:input[type=hidden]").prop("disabled", true);
|
257 |
$("[name='acui_settings']").prop("disabled", false);
|
258 |
}
|
259 |
|
260 |
function enableControls(){
|
261 |
+
$("#acui_smtp_options :input").not(":input[type=submit],:input[type=hidden]").prop("disabled", false);
|
262 |
}
|
263 |
|
264 |
<?php if( get_option( "acui_settings" ) == "wordpress" ): ?>
|