updated to 0.9.1
git-svn-id: https://plugins.svn.wordpress.org/send-email-from-admin/trunk@1276445 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
6ca9fd7958
commit
9c72e72b79
40
css/sefa.css
40
css/sefa.css
@ -2,39 +2,63 @@
|
|||||||
width: 70%;
|
width: 70%;
|
||||||
}
|
}
|
||||||
#sefa-wrapper h1 {
|
#sefa-wrapper h1 {
|
||||||
font-weight: 400;
|
font-size: 2.8em;
|
||||||
padding-top: 10px;
|
font-weight: 200;
|
||||||
|
margin-bottom: 26px;
|
||||||
|
}
|
||||||
|
#sefa-wrapper h1:before {
|
||||||
|
font-family: "dashicons";
|
||||||
|
content: "\f465";
|
||||||
|
top: 8px;
|
||||||
|
position: relative;
|
||||||
|
margin-right: 10px;
|
||||||
|
font-size: 1.2em;
|
||||||
}
|
}
|
||||||
#sefa-wrapper div.error,
|
#sefa-wrapper div.error,
|
||||||
#sefa-wrapper div.updated {
|
#sefa-wrapper div.updated {
|
||||||
margin: 0;
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
#sefa-form td {
|
#sefa-form td {
|
||||||
vertical-align: text-top;
|
vertical-align: text-top;
|
||||||
padding: 10px;
|
|
||||||
}
|
}
|
||||||
#sefa-form input[type=text],
|
#sefa-form input[type=text],
|
||||||
#sefa-form input[type=email],
|
#sefa-form input[type=email],
|
||||||
#sefa-form textarea,
|
#sefa-form textarea,
|
||||||
#sefa-form .wp-editor-wrap {
|
#sefa-form .wp-editor-wrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px
|
padding: 6px 10px
|
||||||
|
}
|
||||||
|
#sefa-form .sefa-radio-wrap {
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
#sefa-form .wp-editor-wrap {
|
#sefa-form .wp-editor-wrap {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
}
|
}
|
||||||
#sefa-form #sefa-user-list {
|
#sefa-form #sefa-user-list {
|
||||||
margin-top: 6px;
|
margin-top: 7px;
|
||||||
}
|
}
|
||||||
#sefa-form .note {
|
#sefa-form .note {
|
||||||
font-size: 11px;
|
font-size: 12px;
|
||||||
|
color: #888;
|
||||||
padding: 5px 0 0 1px;
|
padding: 5px 0 0 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 1200px) {
|
@media screen and (max-width: 1300px) {
|
||||||
#sefa-wrapper {
|
#sefa-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@media screen and (max-width: 900px) {
|
||||||
|
#sefa-form .sefa-radio-wrap {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media screen and (max-width: 500px) {
|
||||||
|
#sefa-wrapper h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
#sefa-wrapper h1:before {
|
||||||
|
top: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|||||||
Tags: email, send email, admin email, custom email, email tools
|
Tags: email, send email, admin email, custom email, email tools
|
||||||
Requires at least: 4.0
|
Requires at least: 4.0
|
||||||
Tested up to: 4.3.1
|
Tested up to: 4.3.1
|
||||||
Stable tag: 0.9
|
Stable tag: 0.9.1
|
||||||
License: GPLv2 or later
|
License: GPLv2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ Easily send a simple custom email with an attachment from the WordPress administ
|
|||||||
|
|
||||||
== Description ==
|
== Description ==
|
||||||
|
|
||||||
Send Email From Admin gives you the ability to easily send a custom HTML email from the WordPress administration screen. You can send to existing users or add your own recipients. You can send to multiple recipients and choose to send group emails or individual emails. Emails can also have attachments. A new menu item called 'Send Email' is added under the Tools menu.
|
Send Email From Admin gives you the ability to easily send a custom HTML email from the WordPress administration screen. You can send to existing users or add your own recipients. You can send to multiple recipients and choose to send group emails or individual emails. Emails can also have an attachment. A new menu item called 'Send Email' is added under the Tools menu.
|
||||||
|
|
||||||
== Installation ==
|
== Installation ==
|
||||||
|
|
||||||
@ -43,5 +43,10 @@ Yes. You can upload and attach one attachment to the email message.
|
|||||||
|
|
||||||
== Changelog ==
|
== Changelog ==
|
||||||
|
|
||||||
|
= 0.9.1 =
|
||||||
|
* css and html cleanup
|
||||||
|
* added mail dashicon
|
||||||
|
* uploaded file (attachment) is now deleted from server after email is sent
|
||||||
|
|
||||||
= 0.9 =
|
= 0.9 =
|
||||||
* Initial release
|
* Initial release
|
||||||
@ -62,8 +62,8 @@ function sefa_plugin_load_textdomain() {
|
|||||||
add_action('plugins_loaded', 'sefa_plugin_load_textdomain');
|
add_action('plugins_loaded', 'sefa_plugin_load_textdomain');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Our main function to display and
|
* Our main function to display and process our form
|
||||||
* process our form
|
*
|
||||||
* @since 0.9
|
* @since 0.9
|
||||||
*/
|
*/
|
||||||
function sefa_plugin_main() {
|
function sefa_plugin_main() {
|
||||||
@ -143,10 +143,15 @@ function sefa_plugin_main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete the uploaded file (attachment) from the server
|
||||||
|
if ( $attachment_path ) {
|
||||||
|
unlink($attachment_path);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div id="sefa-wrapper">
|
<div class="wrap" id="sefa-wrapper">
|
||||||
<h1><?php _e( 'Send Email From Admin', 'sefa' ); ?></h1>
|
<h1><?php _e( 'Send Email From Admin', 'sefa' ); ?></h1>
|
||||||
<?php // print_r($_POST); ?>
|
<?php // print_r($_POST); ?>
|
||||||
<form method="POST" id="sefa-form" enctype="multipart/form-data">
|
<form method="POST" id="sefa-form" enctype="multipart/form-data">
|
||||||
@ -156,7 +161,7 @@ function sefa_plugin_main() {
|
|||||||
if ( !empty($errors) || $send_mail_message ) {
|
if ( !empty($errors) || $send_mail_message ) {
|
||||||
echo '<tr><td colspan="2" id="sefa-messages">';
|
echo '<tr><td colspan="2" id="sefa-messages">';
|
||||||
if ( !empty($errors) ) {
|
if ( !empty($errors) ) {
|
||||||
echo '<div class="error">';
|
echo '<div id="message" class="error">';
|
||||||
foreach ($errors as $error) {
|
foreach ($errors as $error) {
|
||||||
echo "$error<br />";
|
echo "$error<br />";
|
||||||
}
|
}
|
||||||
@ -169,11 +174,11 @@ function sefa_plugin_main() {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td>From:</td>
|
<th scope=”row”>From:</th>
|
||||||
<td><input type="text" disabled value="<?php echo "$from_name <$from_email>"; ?>"><div class="note"><?php _e( 'These can be changed in Settings->General.', 'sefa' ); ?></div></td>
|
<td><input type="text" disabled value="<?php echo "$from_name <$from_email>"; ?>"><div class="note"><?php _e( 'These can be changed in Settings->General.', 'sefa' ); ?></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>To:</td>
|
<th scope=”row”><label for="sefa-recipient-emails">To:</label></th>
|
||||||
<td><input type="email" multiple id="sefa-recipient-emails" name="sefa_recipient_emails" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_recipient_emails) ); ?>"><div class="note"><?php _e( 'To send to multiple recipeints, enter each email address seperated by a comma or choose from the user list below.', 'sefa' ); ?></div>
|
<td><input type="email" multiple id="sefa-recipient-emails" name="sefa_recipient_emails" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_recipient_emails) ); ?>"><div class="note"><?php _e( 'To send to multiple recipeints, enter each email address seperated by a comma or choose from the user list below.', 'sefa' ); ?></div>
|
||||||
<select id="sefa-user-list">
|
<select id="sefa-user-list">
|
||||||
<option value="">-- <?php _e( 'user list', 'sefa' ); ?> --</option>
|
<option value="">-- <?php _e( 'user list', 'sefa' ); ?> --</option>
|
||||||
@ -192,21 +197,25 @@ function sefa_plugin_main() {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<th scope=”row”></th>
|
||||||
<td>
|
<td>
|
||||||
<input type="radio" class="radio" name="sefa_group_email" value="no" id="no" checked>
|
<div class="sefa-radio-wrap">
|
||||||
<label for="no"><?php _e( 'Send each recipient an individual email', 'sefa' ); ?></label>
|
<input type="radio" class="radio" name="sefa_group_email" value="no" id="no" checked>
|
||||||
|
<label for="no"><?php _e( 'Send each recipient an individual email', 'sefa' ); ?></label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sefa-radio-wrap">
|
||||||
<input type="radio" class="radio" name="sefa_group_email" value="yes" id="yes"<?php if ( isset($sefa_group_email) && $sefa_group_email === 'yes' ) echo ' checked'; ?>>
|
<input type="radio" class="radio" name="sefa_group_email" value="yes" id="yes"<?php if ( isset($sefa_group_email) && $sefa_group_email === 'yes' ) echo ' checked'; ?>>
|
||||||
<label for="yes"><?php _e( 'Send a group email to all recipients', 'sefa' ); ?></label>
|
<label for="yes"><?php _e( 'Send a group email to all recipients', 'sefa' ); ?></label>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Subject:</td>
|
<th scope=”row”><label for="sefa-subject">Subject:</label></th>
|
||||||
<td><input type="text" name="sefa_subject" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_subject) );?>"></td>
|
<td><input type="text" id="sefa-subject" name="sefa_subject" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_subject) );?>"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Message:</td>
|
<th scope=”row”><label for="sefa_body">Message:</label></th>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<?php
|
<?php
|
||||||
$settings = array( "editor_height" => "200" );
|
$settings = array( "editor_height" => "200" );
|
||||||
@ -215,8 +224,8 @@ function sefa_plugin_main() {
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Attachment:</td>
|
<th scope=”row”><label for="attachment">Attachment:</label></th>
|
||||||
<td><input type="file" name="attachment"></td>
|
<td><input type="file" id="attachment" name="attachment"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2" align="right">
|
<td colspan="2" align="right">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user