Version Description
- Included compatibility with WP User Avatar to import avatar images while the import is being executed, thanks to the support of cshaffstall.com
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.14.3.9 |
Comparing to | |
See all releases |
Code changes from version 1.14.3.8 to 1.14.3.9
- addons/wp-user-avatar.php +41 -0
- import-users-from-csv-with-meta.php +1 -1
- readme.txt +5 -2
addons/wp-user-avatar.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
if( is_plugin_active( 'wp-user-avatar/wp-user-avatar.php' ) ){
|
6 |
+
add_filter( 'acui_restricted_fields', 'acui_wpua_restricted_fields', 10, 1 );
|
7 |
+
add_action( 'acui_documentation_after_plugins_activated', 'acui_wpua_documentation_after_plugins_activated' );
|
8 |
+
add_action( 'post_acui_import_single_user', 'acui_wpua_post_import_single_user', 10, 3 );
|
9 |
+
}
|
10 |
+
|
11 |
+
function acui_wpua_restricted_fields( $acui_restricted_fields ){
|
12 |
+
return array_merge( $acui_restricted_fields, array( 'avatar_url' ) );
|
13 |
+
}
|
14 |
+
|
15 |
+
function acui_wpua_documentation_after_plugins_activated(){
|
16 |
+
?>
|
17 |
+
<tr valign="top">
|
18 |
+
<th scope="row"><?php _e( "WP Users Avatar is activated", 'import-users-from-csv-with-meta' ); ?></th>
|
19 |
+
<td>
|
20 |
+
<?php _e( "You can import user avatar and assign them to the users using the next format", 'import-users-from-csv-with-meta' ); ?>.
|
21 |
+
<ul style="list-style:disc outside none; margin-left:2em;">
|
22 |
+
<li><?php _e( "avatar_url as the column title", 'import-users-from-csv-with-meta' ); ?></li>
|
23 |
+
<li><?php _e( "The value of each cell will be the url to the image in your system", 'import-users-from-csv-with-meta' ); ?></li>
|
24 |
+
</ul>
|
25 |
+
</td>
|
26 |
+
</tr>
|
27 |
+
<?php
|
28 |
+
}
|
29 |
+
|
30 |
+
function acui_wpua_post_import_single_user( $headers, $row, $user_id ){
|
31 |
+
$pos = array_search( 'avatar_url', $headers );
|
32 |
+
|
33 |
+
if( $pos === FALSE )
|
34 |
+
return;
|
35 |
+
|
36 |
+
global $blog_id, $wpdb;
|
37 |
+
$avatar_url = $row[ $pos ];
|
38 |
+
|
39 |
+
$avatar_id = media_sideload_image( $avatar_url, 0, 'Avatar of user ' . $user_id, 'id' );
|
40 |
+
update_user_meta( $user_id, $wpdb->get_blog_prefix($blog_id).'user_avatar', "");
|
41 |
+
}
|
import-users-from-csv-with-meta.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Import users from CSV with meta
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: This plugins allows to import users using CSV files to WP database automatically
|
6 |
-
Version: 1.14.3.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
3 |
Plugin Name: Import users from CSV with meta
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: This plugins allows to import users using CSV files to WP database automatically
|
6 |
+
Version: 1.14.3.9
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: carazo, hornero
|
|
3 |
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.
|
7 |
-
Stable tag: 1.14.3.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -91,6 +91,9 @@ Plugin will automatically detect:
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
94 |
= 1.14.3.8 =
|
95 |
* user_login and show_admin_bar_front are included as WordPress core fields to avoid showing it as custom meta_keys thanks to
|
96 |
Michael Finkenberger
|
3 |
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.3
|
7 |
+
Stable tag: 1.14.3.9
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 1.14.3.9 =
|
95 |
+
* Included compatibility with WP User Avatar to import avatar images while the import is being executed, thanks to the support of cshaffstall.com
|
96 |
+
|
97 |
= 1.14.3.8 =
|
98 |
* user_login and show_admin_bar_front are included as WordPress core fields to avoid showing it as custom meta_keys thanks to
|
99 |
Michael Finkenberger
|