Version Description
- You can now export data from BuddyPress fields
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.15.9 |
Comparing to | |
See all releases |
Code changes from version 1.15.8.1 to 1.15.9
- classes/doc.php +1 -5
- classes/export.php +33 -0
- import-users-from-csv-with-meta.php +1 -1
- readme.txt +4 -1
classes/doc.php
CHANGED
@@ -79,11 +79,7 @@ class ACUI_Doc{
|
|
79 |
</tr>
|
80 |
|
81 |
<?php do_action( 'acui_documentation_after_plugins_activated' ); ?>
|
82 |
-
|
83 |
-
<tr valign="top">
|
84 |
-
<th scope="row"><?php _e( "Important notice", 'import-users-from-csv-with-meta' ); ?></th>
|
85 |
-
<td><?php _e( "You can upload as many files as you want, but all must have the same columns. If you upload another file, the columns will change to the form of last file uploaded.", 'import-users-from-csv-with-meta' ); ?></td>
|
86 |
-
</tr>
|
87 |
<tr valign="top">
|
88 |
<th scope="row"><?php _e( "Any question about it", 'import-users-from-csv-with-meta' ); ?></th>
|
89 |
<td>
|
79 |
</tr>
|
80 |
|
81 |
<?php do_action( 'acui_documentation_after_plugins_activated' ); ?>
|
82 |
+
|
|
|
|
|
|
|
|
|
83 |
<tr valign="top">
|
84 |
<th scope="row"><?php _e( "Any question about it", 'import-users-from-csv-with-meta' ); ?></th>
|
85 |
<td>
|
classes/export.php
CHANGED
@@ -164,6 +164,10 @@ class ACUI_Exporter{
|
|
164 |
$row[] = $key;
|
165 |
}
|
166 |
|
|
|
|
|
|
|
|
|
167 |
$data[] = $row;
|
168 |
$row = array();
|
169 |
|
@@ -183,6 +187,10 @@ class ACUI_Exporter{
|
|
183 |
$row[] = $this->prepare( $key, get_user_meta( $user, $key, true ), $datetime_format );
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
186 |
$data[] = $row;
|
187 |
$row = array();
|
188 |
}
|
@@ -232,6 +240,31 @@ class ACUI_Exporter{
|
|
232 |
return apply_filters( 'acui_export_get_user_meta_keys', $meta_keys );
|
233 |
}
|
234 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
function get_user_id_list( $role, $from, $to ){
|
236 |
$args = array( 'fields' => array( 'ID' ) );
|
237 |
|
164 |
$row[] = $key;
|
165 |
}
|
166 |
|
167 |
+
foreach ( $this->get_buddypress_fields() as $key ) {
|
168 |
+
$row[] = $key;
|
169 |
+
}
|
170 |
+
|
171 |
$data[] = $row;
|
172 |
$row = array();
|
173 |
|
187 |
$row[] = $this->prepare( $key, get_user_meta( $user, $key, true ), $datetime_format );
|
188 |
}
|
189 |
|
190 |
+
foreach ( $this->get_buddypress_fields() as $key ) {
|
191 |
+
$row[] = $this->prepare( $key, xprofile_get_field_data( $key, $user, 'comma' ), $datetime_format );
|
192 |
+
}
|
193 |
+
|
194 |
$data[] = $row;
|
195 |
$row = array();
|
196 |
}
|
240 |
return apply_filters( 'acui_export_get_user_meta_keys', $meta_keys );
|
241 |
}
|
242 |
|
243 |
+
function get_buddypress_fields(){
|
244 |
+
if( !is_plugin_active( 'buddypress/bp-loader.php' ) ){
|
245 |
+
return array();
|
246 |
+
}
|
247 |
+
|
248 |
+
if( !class_exists( "BP_XProfile_Group" ) ){
|
249 |
+
require_once( WP_PLUGIN_DIR . "/buddypress/bp-xprofile/classes/class-bp-xprofile-group.php" );
|
250 |
+
}
|
251 |
+
|
252 |
+
$buddypress_fields = array();
|
253 |
+
$profile_groups = BP_XProfile_Group::get( array( 'fetch_fields' => true ) );
|
254 |
+
|
255 |
+
if ( !empty( $profile_groups ) ) {
|
256 |
+
foreach ( $profile_groups as $profile_group ) {
|
257 |
+
if ( !empty( $profile_group->fields ) ) {
|
258 |
+
foreach ( $profile_group->fields as $field ) {
|
259 |
+
$buddypress_fields[] = $field->name;
|
260 |
+
}
|
261 |
+
}
|
262 |
+
}
|
263 |
+
}
|
264 |
+
|
265 |
+
return $buddypress_fields;
|
266 |
+
}
|
267 |
+
|
268 |
function get_user_id_list( $role, $from, $to ){
|
269 |
$args = array( 'fields' => array( 'ID' ) );
|
270 |
|
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.
|
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.9
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
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.5
|
7 |
-
Stable tag: 1.15.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,6 +99,9 @@ Plugin will automatically detect:
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
102 |
= 1.15.8.1 =
|
103 |
* Added shipping_phone as non date key to avoid datetime conversion
|
104 |
|
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.5
|
7 |
+
Stable tag: 1.15.9
|
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.9 =
|
103 |
+
* You can now export data from BuddyPress fields
|
104 |
+
|
105 |
= 1.15.8.1 =
|
106 |
* Added shipping_phone as non date key to avoid datetime conversion
|
107 |
|