Version Description
- Email templates loads also the attachment in Mail options when they are selected thanks to Joel Frankwick
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.13.1 |
Comparing to | |
See all releases |
Code changes from version 1.13 to 1.13.1
- classes/email-options.php +5 -2
- classes/email-templates.php +10 -2
- import-users-from-csv-with-meta.php +1 -1
- readme.txt +4 -1
classes/email-options.php
CHANGED
@@ -55,7 +55,7 @@ class ACUI_Email_Options{
|
|
55 |
<?php if( $enable_email_templates && wp_count_posts( 'acui_email_template' )->publish > 0 ): ?>
|
56 |
<h3><?php _e( 'Load custom email from email templates', 'import-users-from-csv-with-meta' ); ?></h3>
|
57 |
<?php wp_dropdown_pages( array( 'id' => 'email_template_selected', 'post_type' => 'acui_email_template', 'selected' => $template_id ) ); ?>
|
58 |
-
<input id="load_email_template" class="button-primary" type="button" value="<?php _e( "Load subject and
|
59 |
<?php endif; ?>
|
60 |
|
61 |
<h3><?php _e( 'Customize the email that can be sent when importing users', 'import-users-from-csv-with-meta' ); ?></h3>
|
@@ -106,10 +106,13 @@ class ACUI_Email_Options{
|
|
106 |
};
|
107 |
|
108 |
$.post( ajaxurl, data, function( response ) {
|
109 |
-
console.log( response );
|
110 |
var response = JSON.parse( response );
|
111 |
$( '#title' ).val( response.title );
|
112 |
tinyMCE.get( 'body_mail' ).setContent( response.content );
|
|
|
|
|
|
|
|
|
113 |
$( '#template_id' ).val( response.id );
|
114 |
$( '#save_mail_template_options' ).click();
|
115 |
});
|
55 |
<?php if( $enable_email_templates && wp_count_posts( 'acui_email_template' )->publish > 0 ): ?>
|
56 |
<h3><?php _e( 'Load custom email from email templates', 'import-users-from-csv-with-meta' ); ?></h3>
|
57 |
<?php wp_dropdown_pages( array( 'id' => 'email_template_selected', 'post_type' => 'acui_email_template', 'selected' => $template_id ) ); ?>
|
58 |
+
<input id="load_email_template" class="button-primary" type="button" value="<?php _e( "Load subject, content and attachment from this email template", 'import-users-from-csv-with-meta' ); ?>"/>
|
59 |
<?php endif; ?>
|
60 |
|
61 |
<h3><?php _e( 'Customize the email that can be sent when importing users', 'import-users-from-csv-with-meta' ); ?></h3>
|
106 |
};
|
107 |
|
108 |
$.post( ajaxurl, data, function( response ) {
|
|
|
109 |
var response = JSON.parse( response );
|
110 |
$( '#title' ).val( response.title );
|
111 |
tinyMCE.get( 'body_mail' ).setContent( response.content );
|
112 |
+
$( '#email_template_attachment_id' ).val( response.attachment_id );
|
113 |
+
if( response.attachment_url != '' ){
|
114 |
+
$( '#email_template_attachment_file' ).val( response.attachment_url );
|
115 |
+
}
|
116 |
$( '#template_id' ).val( response.id );
|
117 |
$( '#save_mail_template_options' ).click();
|
118 |
});
|
classes/email-templates.php
CHANGED
@@ -96,8 +96,16 @@ class ACUI_Email_Template{
|
|
96 |
function email_template_selected(){
|
97 |
check_ajax_referer( 'codection-security', 'security' );
|
98 |
$email_template = get_post( intval( $_POST['email_template_selected'] ) );
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
die();
|
102 |
}
|
103 |
|
96 |
function email_template_selected(){
|
97 |
check_ajax_referer( 'codection-security', 'security' );
|
98 |
$email_template = get_post( intval( $_POST['email_template_selected'] ) );
|
99 |
+
$attachment_id = get_post_meta( $email_template->ID, 'email_template_attachment_id', true );
|
100 |
+
|
101 |
+
echo json_encode( array(
|
102 |
+
'id' => $email_template->ID,
|
103 |
+
'title' => $email_template->post_title,
|
104 |
+
'content' => wpautop( $email_template->post_content ),
|
105 |
+
'attachment_id' => $attachment_id,
|
106 |
+
'attachment_url' => wp_get_attachment_url( $attachment_id ),
|
107 |
+
) );
|
108 |
+
|
109 |
die();
|
110 |
}
|
111 |
|
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.13
|
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.13.1
|
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.1
|
7 |
-
Stable tag: 1.13
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -74,6 +74,9 @@ Plugin will automatically detect:
|
|
74 |
|
75 |
== Changelog ==
|
76 |
|
|
|
|
|
|
|
77 |
= 1.13 =
|
78 |
* Now you can delete users that are not in the CSV file, not only when you are doing an import based on a cron task, but also when you do it from the dashboard or with the shortcode in the frontend thanks to mojosolo.com
|
79 |
* Documentation improved
|
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.1
|
7 |
+
Stable tag: 1.13.1
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
74 |
|
75 |
== Changelog ==
|
76 |
|
77 |
+
= 1.13.1 =
|
78 |
+
* Email templates loads also the attachment in Mail options when they are selected thanks to Joel Frankwick
|
79 |
+
|
80 |
= 1.13 =
|
81 |
* Now you can delete users that are not in the CSV file, not only when you are doing an import based on a cron task, but also when you do it from the dashboard or with the shortcode in the frontend thanks to mojosolo.com
|
82 |
* Documentation improved
|