Version Description
- Notices fixed
- Some file deleted and some urls fixed
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.12.6.2 |
Comparing to | |
See all releases |
Code changes from version 1.12.6.1 to 1.12.6.2
- classes/email-templates.php +3 -0
- classes/homepage.php +2 -2
- email-templates.php +0 -166
- import-users-from-csv-with-meta.php +1 -1
- readme.txt +5 -1
classes/email-templates.php
CHANGED
@@ -142,6 +142,9 @@ class ACUI_Email_Template{
|
|
142 |
}
|
143 |
|
144 |
function save_post( $post_id ){
|
|
|
|
|
|
|
145 |
if( !wp_verify_nonce( $_POST['acui_email_template_attachment'], 'acui_email_template_attachment' ) ) {
|
146 |
return $post_id;
|
147 |
}
|
142 |
}
|
143 |
|
144 |
function save_post( $post_id ){
|
145 |
+
if( !isset( $_POST['acui_email_template_attachment'] ) )
|
146 |
+
return $post_id;
|
147 |
+
|
148 |
if( !wp_verify_nonce( $_POST['acui_email_template_attachment'], 'acui_email_template_attachment' ) ) {
|
149 |
return $post_id;
|
150 |
}
|
classes/homepage.php
CHANGED
@@ -257,13 +257,13 @@ class ACUI_Homepage{
|
|
257 |
<li><label>Además ahora un <a href="https://codection.com/25-de-descuento-en-el-mejor-hosting-en-espanol-con-webempresa/">25% de descuento</a>.</label></li>
|
258 |
</ul>
|
259 |
<a href="https://codection.com/25-de-descuento-en-el-mejor-hosting-en-espanol-con-webempresa/" target="_blank">
|
260 |
-
<img src="<?php echo
|
261 |
</a>
|
262 |
</div>
|
263 |
<?php else: ?>
|
264 |
<div class="sidebar_section" style="padding:0 !important;border:none !important;background:none !important;">
|
265 |
<a href="https://codection.com/how-to-transfer-your-website-to-inmotion-hosting/" target="_blank">
|
266 |
-
<img src="<?php echo
|
267 |
</a>
|
268 |
</div>
|
269 |
<?php endif; ?>
|
257 |
<li><label>Además ahora un <a href="https://codection.com/25-de-descuento-en-el-mejor-hosting-en-espanol-con-webempresa/">25% de descuento</a>.</label></li>
|
258 |
</ul>
|
259 |
<a href="https://codection.com/25-de-descuento-en-el-mejor-hosting-en-espanol-con-webempresa/" target="_blank">
|
260 |
+
<img src="<?php echo plugins_url(); ?>/import-users-from-csv-with-meta/assets/webempresa_logo.png">
|
261 |
</a>
|
262 |
</div>
|
263 |
<?php else: ?>
|
264 |
<div class="sidebar_section" style="padding:0 !important;border:none !important;background:none !important;">
|
265 |
<a href="https://codection.com/how-to-transfer-your-website-to-inmotion-hosting/" target="_blank">
|
266 |
+
<img src="<?php echo plugins_url(); ?>/import-users-from-csv-with-meta/assets/codection-inmotion.png">
|
267 |
</a>
|
268 |
</div>
|
269 |
<?php endif; ?>
|
email-templates.php
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
if ( ! defined( 'ABSPATH' ) ) exit;
|
4 |
-
|
5 |
-
class ACUI_Email_Template{
|
6 |
-
function __construct(){
|
7 |
-
add_action( 'init', array( $this, 'cpt_email_template' ), 0 );
|
8 |
-
add_action( 'edit_form_after_editor', array( $this, 'email_templates_edit_form_after_editor' ), 10, 1 );
|
9 |
-
add_action( 'wp_ajax_acui_refresh_enable_email_templates', array( $this, 'refresh_enable_email_templates' ) );
|
10 |
-
add_action( 'wp_ajax_acui_email_template_selected', array( $this, 'email_template_selected' ) );
|
11 |
-
add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
|
12 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'load_admin_scripts' ), 10, 1 );
|
13 |
-
add_action( 'save_post', array( $this, 'save_post' ) );
|
14 |
-
}
|
15 |
-
|
16 |
-
function cpt_email_template() {
|
17 |
-
if( !get_option( 'acui_enable_email_templates' ) )
|
18 |
-
return;
|
19 |
-
|
20 |
-
$labels = array(
|
21 |
-
'name' => _x( 'Email templates (Import Users From CSV With Meta)', 'Post Type General Name', 'import-users-from-csv-with-meta' ),
|
22 |
-
'singular_name' => _x( 'Email template (Import Users From CSV With Meta)', 'Post Type Singular Name', 'import-users-from-csv-with-meta' ),
|
23 |
-
'menu_name' => __( 'Email templates (Import Users)', 'import-users-from-csv-with-meta' ),
|
24 |
-
'name_admin_bar' => __( 'Email templates (Import Users From CSV With Meta)', 'import-users-from-csv-with-meta' ),
|
25 |
-
'archives' => __( 'Item Archives', 'import-users-from-csv-with-meta' ),
|
26 |
-
'attributes' => __( 'Item Attributes', 'import-users-from-csv-with-meta' ),
|
27 |
-
'parent_item_colon' => __( 'Parent Item:', 'import-users-from-csv-with-meta' ),
|
28 |
-
'all_items' => __( 'All email template', 'import-users-from-csv-with-meta' ),
|
29 |
-
'add_new_item' => __( 'Add new email template', 'import-users-from-csv-with-meta' ),
|
30 |
-
'add_new' => __( 'Add new email template', 'import-users-from-csv-with-meta' ),
|
31 |
-
'new_item' => __( 'New email template', 'import-users-from-csv-with-meta' ),
|
32 |
-
'edit_item' => __( 'Edit email template', 'import-users-from-csv-with-meta' ),
|
33 |
-
'update_item' => __( 'Update email template', 'import-users-from-csv-with-meta' ),
|
34 |
-
'view_item' => __( 'View email template', 'import-users-from-csv-with-meta' ),
|
35 |
-
'view_items' => __( 'View email templates', 'import-users-from-csv-with-meta' ),
|
36 |
-
'search_items' => __( 'Search email template', 'import-users-from-csv-with-meta' ),
|
37 |
-
'not_found' => __( 'Not found', 'import-users-from-csv-with-meta' ),
|
38 |
-
'not_found_in_trash' => __( 'Not found in Trash', 'import-users-from-csv-with-meta' ),
|
39 |
-
'featured_image' => __( 'Featured Image', 'import-users-from-csv-with-meta' ),
|
40 |
-
'set_featured_image' => __( 'Set featured image', 'import-users-from-csv-with-meta' ),
|
41 |
-
'remove_featured_image' => __( 'Remove featured image', 'import-users-from-csv-with-meta' ),
|
42 |
-
'use_featured_image' => __( 'Use as featured image', 'import-users-from-csv-with-meta' ),
|
43 |
-
'insert_into_item' => __( 'Insert into email template', 'import-users-from-csv-with-meta' ),
|
44 |
-
'uploaded_to_this_item' => __( 'Uploaded to this email template', 'import-users-from-csv-with-meta' ),
|
45 |
-
'items_list' => __( 'Items list', 'import-users-from-csv-with-meta' ),
|
46 |
-
'items_list_navigation' => __( 'Email template list navigation', 'import-users-from-csv-with-meta' ),
|
47 |
-
'filter_items_list' => __( 'Filter email template list', 'import-users-from-csv-with-meta' ),
|
48 |
-
);
|
49 |
-
$args = array(
|
50 |
-
'label' => __( 'Mail template (Import Users From CSV With Meta)', 'import-users-from-csv-with-meta' ),
|
51 |
-
'description' => __( 'Mail templates for Import Users From CSV With Meta', 'import-users-from-csv-with-meta' ),
|
52 |
-
'labels' => $labels,
|
53 |
-
'supports' => array( 'title', 'editor' ),
|
54 |
-
'hierarchical' => true,
|
55 |
-
'public' => false,
|
56 |
-
'show_ui' => true,
|
57 |
-
'show_in_menu' => true,
|
58 |
-
'menu_position' => 100,
|
59 |
-
'menu_icon' => 'dashicons-email',
|
60 |
-
'show_in_admin_bar' => true,
|
61 |
-
'show_in_nav_menus' => false,
|
62 |
-
'can_export' => true,
|
63 |
-
'has_archive' => false,
|
64 |
-
'exclude_from_search' => true,
|
65 |
-
'publicly_queryable' => false,
|
66 |
-
'rewrite' => false,
|
67 |
-
'capability_type' => 'page',
|
68 |
-
);
|
69 |
-
register_post_type( 'acui_email_template', $args );
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
public static function email_templates_edit_form_after_editor( $post = "" ){
|
74 |
-
if( !empty( $post ) && $post->post_type != 'acui_email_template' )
|
75 |
-
return;
|
76 |
-
?>
|
77 |
-
<p><?php _e( 'You can use', 'import-users-from-csv-with-meta' ); ?></p>
|
78 |
-
<ul style="list-style-type:disc; margin-left:2em;">
|
79 |
-
<li>**username** = <?php _e( 'username to login', 'import-users-from-csv-with-meta' ); ?></li>
|
80 |
-
<li>**password** = <?php _e( 'user password', 'import-users-from-csv-with-meta' ); ?></li>
|
81 |
-
<li>**loginurl** = <?php _e( 'current site login url', 'import-users-from-csv-with-meta' ); ?></li>
|
82 |
-
<li>**lostpasswordurl** = <?php _e( 'lost password url', 'import-users-from-csv-with-meta' ); ?></li>
|
83 |
-
<li>**passwordreseturl** = <?php _e( 'password reset url', 'import-users-from-csv-with-meta' ); ?></li>
|
84 |
-
<li>**email** = <?php _e( 'user email', 'import-users-from-csv-with-meta' ); ?></li>
|
85 |
-
<li><?php _e( "You can also use any WordPress user standard field or an own metadata, if you have used it in your CSV. For example, if you have a first_name column, you could use **first_name** or any other meta_data like **my_custom_meta**", 'import-users-from-csv-with-meta' ) ;?></li>
|
86 |
-
</ul>
|
87 |
-
<?php
|
88 |
-
}
|
89 |
-
|
90 |
-
function refresh_enable_email_templates(){
|
91 |
-
check_ajax_referer( 'codection-security', 'security' );
|
92 |
-
update_option( 'acui_enable_email_templates', ( $_POST[ 'enable' ] == "true" ) );
|
93 |
-
die();
|
94 |
-
}
|
95 |
-
|
96 |
-
function email_template_selected(){
|
97 |
-
check_ajax_referer( 'codection-security', 'security' );
|
98 |
-
$email_template = get_post( intval( $_POST['email_template_selected'] ) );
|
99 |
-
|
100 |
-
echo json_encode( array( 'id' => $email_template->ID, 'title' => $email_template->post_title, 'content' => wpautop( $email_template->post_content ) ) );
|
101 |
-
die();
|
102 |
-
}
|
103 |
-
|
104 |
-
function add_meta_boxes(){
|
105 |
-
add_meta_box( 'email_template_attachments',
|
106 |
-
__( 'Attachment', 'import-users-from-csv-with-meta' ),
|
107 |
-
array( $this, 'email_template_attachments' ),
|
108 |
-
'acui_email_template',
|
109 |
-
'side',
|
110 |
-
'core' );
|
111 |
-
}
|
112 |
-
|
113 |
-
function load_admin_scripts( $hook ) {
|
114 |
-
global $typenow;
|
115 |
-
|
116 |
-
|
117 |
-
if( $typenow == 'acui_email_template' || $hook == 'tools_page_acui' ) {
|
118 |
-
wp_enqueue_media();
|
119 |
-
wp_register_script( 'meta-box-image', plugins_url( 'assets/email-template-attachment-admin.js' , __FILE__ ), array( 'jquery' ) );
|
120 |
-
wp_localize_script( 'meta-box-image', 'meta_image',
|
121 |
-
array(
|
122 |
-
'title' => __( 'Choose or upload file', 'import-users-from-csv-with-meta' ),
|
123 |
-
'button' => __( 'Use this file', 'import-users-from-csv-with-meta' ),
|
124 |
-
)
|
125 |
-
);
|
126 |
-
wp_enqueue_script( 'meta-box-image' );
|
127 |
-
}
|
128 |
-
}
|
129 |
-
|
130 |
-
public function email_template_attachments( $post ){
|
131 |
-
$email_template_attachment_id = get_post_meta( $post->ID, 'email_template_attachment_id', true );
|
132 |
-
?>
|
133 |
-
<fieldset>
|
134 |
-
<div>
|
135 |
-
<label for="email_template_attachment_file"><?php _e( 'Field Label', 'import-users-from-csv-with-meta' )?></label><br>
|
136 |
-
<input type="url" class="large-text" name="email_template_attachment_file" id="email_template_attachment_file" value="<?php echo wp_get_attachment_url( $email_template_attachment_id ); ?>" readonly/><br>
|
137 |
-
<input type="hidden" name="email_template_attachment_id" id="email_template_attachment_id" value="<?php echo $email_template_attachment_id ?>"/>
|
138 |
-
<button type="button" class="button" id="acui_email_template_upload_button"><?php _e( 'Upload file', 'import-users-from-csv-with-meta' )?></button>
|
139 |
-
</div>
|
140 |
-
</fieldset>
|
141 |
-
<?php
|
142 |
-
wp_nonce_field( 'acui_email_template_attachment', 'acui_email_template_attachment' );
|
143 |
-
}
|
144 |
-
|
145 |
-
function save_post( $post_id ){
|
146 |
-
if( 'acui_email_template' != $_POST['post_type'] ) {
|
147 |
-
return $post_id;
|
148 |
-
}
|
149 |
-
|
150 |
-
if( !isset( $_POST['acui_email_template_attachment'] )){
|
151 |
-
return $post_id;
|
152 |
-
}
|
153 |
-
|
154 |
-
if( !wp_verify_nonce( $_POST['acui_email_template_attachment'], 'acui_email_template_attachment' ) ) {
|
155 |
-
return $post_id;
|
156 |
-
}
|
157 |
-
|
158 |
-
if( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
159 |
-
return $post_id;
|
160 |
-
}
|
161 |
-
|
162 |
-
update_post_meta( $post_id, 'email_template_attachment_id', intval( $_POST['email_template_attachment_id'] ) );
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
new ACUI_Email_Template();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.12.6.
|
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.12.6.2
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
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: 5.0.3
|
7 |
-
Stable tag: 1.12.6.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -74,6 +74,10 @@ Plugin will automatically detect:
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
|
|
77 |
= 1.12.6.1 =
|
78 |
* Plugin is now compatible with plugins that change login url, thanks to @2candela2 (https://wordpress.org/support/topic/make-it-compatible-with-plugins-that-change-login-url/)
|
79 |
|
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.0.3
|
7 |
+
Stable tag: 1.12.6.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.12.6.2 =
|
78 |
+
* Notices fixed
|
79 |
+
* Some file deleted and some urls fixed
|
80 |
+
|
81 |
= 1.12.6.1 =
|
82 |
* Plugin is now compatible with plugins that change login url, thanks to @2candela2 (https://wordpress.org/support/topic/make-it-compatible-with-plugins-that-change-login-url/)
|
83 |
|