Import users from CSV with meta - Version 1.17.1.3

Version Description

  • Fixed bug in mail templates when wp_editor is disabled
  • Included action links
Download this release

Release Info

Developer carazo
Plugin Icon 128x128 Import users from CSV with meta
Version 1.17.1.3
Comparing to
See all releases

Code changes from version 1.17.1.1 to 1.17.1.3

assets/email-template-attachment-admin.js CHANGED
@@ -50,7 +50,12 @@
50
  $.post( ajaxurl, data, function( response ) {
51
  var response = JSON.parse( response );
52
  $( '#title' ).val( response.title );
53
- tinyMCE.get( 'body_mail' ).setContent( response.content );
 
 
 
 
 
54
  $( '#email_template_attachment_id' ).val( response.attachment_id );
55
  if( response.attachment_url != '' ){
56
  $( '#email_template_attachment_file' ).val( response.attachment_url );
50
  $.post( ajaxurl, data, function( response ) {
51
  var response = JSON.parse( response );
52
  $( '#title' ).val( response.title );
53
+
54
+ if( typeof( tinyMCE ) === "undefined" )
55
+ $( 'body_mail' ).val( response.content );
56
+ else
57
+ tinyMCE.get( 'body_mail' ).setContent( response.content );
58
+
59
  $( '#email_template_attachment_id' ).val( response.attachment_id );
60
  if( response.attachment_url != '' ){
61
  $( '#email_template_attachment_file' ).val( response.attachment_url );
classes/email-options.php CHANGED
@@ -100,7 +100,7 @@ class ACUI_Email_Options{
100
 
101
  <h3><?php _e( 'Customize the email that can be sent when importing users', 'import-users-from-csv-with-meta' ); ?></h3>
102
 
103
- <p><?php _e( 'Mail subject :', 'import-users-from-csv-with-meta' ); ?><input name="subject_mail" size="100" value="<?php echo $subject_mail; ?>" id="title" autocomplete="off" type="text"></p>
104
 
105
  <?php if( $disable_wp_editor ): ?>
106
  <p><textarea name='body_mail' style="width:100%;" rows="20"><?php echo $body_mail; ?></textarea></p>
100
 
101
  <h3><?php _e( 'Customize the email that can be sent when importing users', 'import-users-from-csv-with-meta' ); ?></h3>
102
 
103
+ <p><?php _e( 'Mail subject:', 'import-users-from-csv-with-meta' ); ?><input name="subject_mail" size="100" value="<?php echo $subject_mail; ?>" id="title" autocomplete="off" type="text"></p>
104
 
105
  <?php if( $disable_wp_editor ): ?>
106
  <p><textarea name='body_mail' style="width:100%;" rows="20"><?php echo $body_mail; ?></textarea></p>
classes/import.php CHANGED
@@ -720,7 +720,7 @@ class ACUI_Import{
720
 
721
  if( !$is_frontend ): ?>
722
  <br/>
723
- <p><?php _e( 'Process finished you can go', 'import-users-from-csv-with-meta' ); ?> <a href="<?php echo get_admin_url( null, 'users.php' ); ?>"><?php _e( 'here to see results', 'import-users-from-csv-with-meta' ); ?></a></p>
724
  <?php endif; ?>
725
 
726
  <?php
720
 
721
  if( !$is_frontend ): ?>
722
  <br/>
723
+ <p><?php printf( __( 'Process finished you can go <a href="%s">here to see results</a> or you can do <a href="%s">a new import</a>.', 'import-users-from-csv-with-meta' ), get_admin_url( null, 'users.php' ), get_admin_url( null, 'tools.php?page=acui&tab=homepage' ) ); ?></p>
724
  <?php endif; ?>
725
 
726
  <?php
classes/multisite.php CHANGED
@@ -35,10 +35,12 @@ class ACUI_Multisite{
35
  if( $pos === FALSE )
36
  return;
37
 
 
 
 
38
  if( is_array( $role ) )
39
  $role = reset( $role );
40
 
41
- // blogs that appears in the CSV
42
  $user_blogs_csv = explode( ',', $row[ $pos ] );
43
  $user_blogs_csv = array_filter( $user_blogs_csv, function( $value ){ return $value !== ''; } );
44
 
35
  if( $pos === FALSE )
36
  return;
37
 
38
+ if( empty( $role ) )
39
+ $role = 'subscriber';
40
+
41
  if( is_array( $role ) )
42
  $role = reset( $role );
43
 
 
44
  $user_blogs_csv = explode( ',', $row[ $pos ] );
45
  $user_blogs_csv = array_filter( $user_blogs_csv, function( $value ){ return $value !== ''; } );
46
 
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.17.1.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
@@ -86,6 +86,7 @@ class ImportExportUsersCustomers{
86
  public function loader(){
87
  add_action( "admin_menu", array( $this, 'menu' ) );
88
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 10, 1 );
 
89
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
90
  add_action( 'wp_ajax_acui_delete_attachment', array( $this, 'delete_attachment' ) );
91
  add_action( 'wp_ajax_acui_bulk_delete_attachment', array( $this, 'bulk_delete_attachment' ) );
@@ -137,6 +138,16 @@ class ImportExportUsersCustomers{
137
  wp_enqueue_script( 'datatable', '//cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js' );
138
  }
139
 
 
 
 
 
 
 
 
 
 
 
140
  function plugin_row_meta( $links, $file ){
141
  if ( strpos( $file, basename( __FILE__ ) ) !== false ) {
142
  $new_links = array(
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.17.1.3
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
86
  public function loader(){
87
  add_action( "admin_menu", array( $this, 'menu' ) );
88
  add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 10, 1 );
89
+ add_filter( 'plugin_action_links', array( $this, 'action_links' ), 10, 2 );
90
  add_filter( 'plugin_row_meta', array( $this, 'plugin_row_meta' ), 10, 2 );
91
  add_action( 'wp_ajax_acui_delete_attachment', array( $this, 'delete_attachment' ) );
92
  add_action( 'wp_ajax_acui_bulk_delete_attachment', array( $this, 'bulk_delete_attachment' ) );
138
  wp_enqueue_script( 'datatable', '//cdn.datatables.net/1.10.22/js/jquery.dataTables.min.js' );
139
  }
140
 
141
+ function action_links( $links, $file ) {
142
+ if ($file == 'import-users-from-csv-with-meta/import-users-from-csv-with-meta.php') {
143
+ $links[] = sprintf( __( '<a href="%s">Export</a>', 'import-users-from-csv-with-meta' ), get_admin_url( null, 'tools.php?page=acui&tab=export' ) );
144
+ $links[] = sprintf( __( '<a href="%s">Import</a>', 'import-users-from-csv-with-meta' ), get_admin_url( null, 'tools.php?page=acui&tab=homepage' ) );
145
+ return array_reverse( $links );
146
+ }
147
+
148
+ return $links;
149
+ }
150
+
151
  function plugin_row_meta( $links, $file ){
152
  if ( strpos( $file, basename( __FILE__ ) ) !== false ) {
153
  $new_links = array(
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.6
7
- Stable tag: 1.17.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -103,6 +103,13 @@ Plugin will automatically detect:
103
 
104
  == Changelog ==
105
 
 
 
 
 
 
 
 
106
  = 1.17.1.1 =
107
  * In multisite, user is added to current blog with role subscriber if user choose to no update roles but the user does not exist there
108
 
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.6
7
+ Stable tag: 1.17.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
103
 
104
  == Changelog ==
105
 
106
+ = 1.17.1.3 =
107
+ * Fixed bug in mail templates when wp_editor is disabled
108
+ * Included action links
109
+
110
+ = 1.17.1.2 =
111
+ * In multisite, default role is subscriber if this is not set
112
+
113
  = 1.17.1.1 =
114
  * In multisite, user is added to current blog with role subscriber if user choose to no update roles but the user does not exist there
115