updating version to 0.9.3

git-svn-id: https://plugins.svn.wordpress.org/send-email-from-admin/trunk@1281126 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
kojak711 2015-11-06 14:02:32 +00:00
parent 9b0ef25022
commit c1ee5e7c1d
3 changed files with 128 additions and 89 deletions

View File

@ -1,6 +1,3 @@
#sefa-wrapper {
width: 70%;
}
#sefa-wrapper h1 {
font-size: 2.8em;
font-weight: 200;
@ -15,14 +12,34 @@
margin-right: 10px;
font-size: 1.2em;
}
#sefa-wrapper div.error,
#sefa-wrapper div.error ul li {
list-style: initial;
margin-left: 20px;
margin-bottom: 0;
}
#sefa-wrapper div.updated {
padding: 10px;
margin-bottom: 5px;
}
#sefa-form td {
#sefa-form .form-table {
margin-top: 0;
}
#sefa-form .form-table tr:first-child th {
padding-top: 5px;
}
#sefa-form .form-table tr:first-child td {
padding-top: 0;
}
#sefa-form .form-table th {
width: auto;
min-width: 100px;
}
#sefa-form .form-table td {
vertical-align: text-top;
}
#sefa-form .form-table tr:last-child td {
padding: 0 10px;
}
#sefa-form input[type=text],
#sefa-form input[type=email],
#sefa-form textarea,
@ -56,6 +73,11 @@
display: block;
}
}
@media screen and (max-width: 850px) {
#sefa-wrapper .postbox {
margin-right: 10px;
}
}
@media screen and (max-width: 500px) {
#sefa-wrapper h1 {
font-size: 2em;

View File

@ -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, email attachment
Requires at least: 4.0
Tested up to: 4.3.1
Stable tag: 0.9.2
Stable tag: 0.9.3
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@ -43,6 +43,10 @@ Yes. You can upload and attach one attachment to the email message.
== Changelog ==
= 0.9.3 =
* added links
* minor css changes
= 0.9.2 =
* minor code cleanup
* added HTML5 'required' attribute to form fields

View File

@ -3,7 +3,7 @@
Plugin Name: Send Email From Admin
Plugin URI:
Description: Easily send a simple custom email with an attachment from the WordPress administration screen. Tools -> Send Email.
Version: 0.9.2
Version: 0.9.3
Author: kojak711
Domain Path: /languages
Text Domain: sefa
@ -29,7 +29,7 @@ if ( ! defined( 'ABSPATH' ) ) {
}
define( 'SEFA_PLUGIN_DIR_URL', plugin_dir_url( __FILE__ ) );
define( 'SEFA_PLUGIN_VER', '0.9.2' );
define( 'SEFA_PLUGIN_VER', '0.9.3' );
/**
* Add our sub menu in the Tools menu
@ -156,87 +156,100 @@ function sefa_plugin_main() {
?>
<div class="wrap" id="sefa-wrapper">
<h1><?php _e( 'Send Email From Admin', 'sefa' ); ?></h1>
<?php // print_r($_POST); ?>
<form method="POST" id="sefa-form" enctype="multipart/form-data">
<?php wp_nonce_field( 'sefa_send_email', 'sefa-form-nonce' ); ?>
<table cellpadding="0" border="0" class="form-table">
<?php
if ( !empty($errors) || $send_mail_message ) {
echo '<tr><td colspan="2" id="sefa-messages">';
if ( !empty($errors) ) {
echo '<div id="message" class="error">';
foreach ($errors as $error) {
echo "$error<br />";
}
echo "</div>\n";
}
if ( $send_mail_message ) {
echo $send_mail_message;
}
echo "</td></tr>\n";
}
?>
<tr>
<th scope=”row”>From:</th>
<td><input type="text" disabled value="<?php echo "$from_name &lt;$from_email&gt;"; ?>" required><div class="note"><?php _e( 'These can be changed in Settings->General.', 'sefa' ); ?></div></td>
</tr>
<tr>
<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) ); ?>" required><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">
<option value="">-- <?php _e( 'user list', 'sefa' ); ?> --</option>
<?php
$users = get_users( 'orderby=user_email' );
foreach ( $users as $user ) {
if ( $user->first_name && $user->last_name ) {
$user_fullname = ' (' . $user->first_name . ' ' . $user->last_name . ')';
} else {
$user_fullname = '';
}
echo '<option value="' . esc_html( $user->user_email ) . '">' . esc_html( $user->user_email ) . esc_html( $user_fullname) . '</option>';
};
?>
</select>
</td>
</tr>
<tr>
<th scope=”row”></th>
<td>
<div class="sefa-radio-wrap">
<input type="radio" class="radio" name="sefa_group_email" value="no" id="no" required>
<label for="no"><?php _e( 'Send each recipient an individual email', 'sefa' ); ?></label>
</div>
&nbsp;&nbsp;
<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'; ?> required>
<label for="yes"><?php _e( 'Send a group email to all recipients', 'sefa' ); ?></label>
</div>
</td>
</tr>
<tr>
<th scope=”row”><label for="sefa-subject">Subject:</label></th>
<td><input type="text" id="sefa-subject" name="sefa_subject" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_subject) );?>" required></td>
</tr>
<tr>
<th scope=”row”><label for="sefa_body">Message:</label></th>
<td align="left">
<?php
$settings = array( "editor_height" => "200" );
wp_editor( sefa_plugin_issetor($sefa_body), "sefa_body", $settings );
?>
</td>
</tr>
<tr>
<th scope=”row”><label for="attachment">Attachment:</label></th>
<td><input type="file" id="attachment" name="attachment"></td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" value="<?php _e( 'Send Email', 'sefa' ); ?>" name="submit" class="button button-primary">
</td>
</tr>
</table>
</form>
<?php
if ( !empty($errors) ) {
echo '<div class="error"><ul>';
foreach ($errors as $error) {
echo "<li>$error</li>";
}
echo "</ul></div>\n";
}
if ( $send_mail_message ) {
echo $send_mail_message;
}
?>
<div id="poststuff">
<div id="post-body" class="metabox-holder columns-2">
<div id="post-body-content">
<form method="POST" id="sefa-form" enctype="multipart/form-data">
<?php wp_nonce_field( 'sefa_send_email', 'sefa-form-nonce' ); ?>
<table cellpadding="0" border="0" class="form-table">
<tr>
<th scope=”row”>From:</th>
<td><input type="text" disabled value="<?php echo "$from_name &lt;$from_email&gt;"; ?>" required><div class="note"><?php _e( 'These can be changed in Settings->General.', 'sefa' ); ?></div></td>
</tr>
<tr>
<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) ); ?>" required><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">
<option value="">-- <?php _e( 'user list', 'sefa' ); ?> --</option>
<?php
$users = get_users( 'orderby=user_email' );
foreach ( $users as $user ) {
if ( $user->first_name && $user->last_name ) {
$user_fullname = ' (' . $user->first_name . ' ' . $user->last_name . ')';
} else {
$user_fullname = '';
}
echo '<option value="' . esc_html( $user->user_email ) . '">' . esc_html( $user->user_email ) . esc_html( $user_fullname) . '</option>';
};
?>
</select>
</td>
</tr>
<tr>
<th scope=”row”></th>
<td>
<div class="sefa-radio-wrap">
<input type="radio" class="radio" name="sefa_group_email" value="no" id="no"<?php if ( isset($sefa_group_email) && $sefa_group_email === 'no' ) echo ' checked'; ?> required>
<label for="no"><?php _e( 'Send each recipient an individual email', 'sefa' ); ?></label>
</div>
&nbsp;&nbsp;
<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'; ?> required>
<label for="yes"><?php _e( 'Send a group email to all recipients', 'sefa' ); ?></label>
</div>
</td>
</tr>
<tr>
<th scope=”row”><label for="sefa-subject">Subject:</label></th>
<td><input type="text" id="sefa-subject" name="sefa_subject" value="<?php echo esc_attr( sefa_plugin_issetor($sefa_subject) );?>" required></td>
</tr>
<tr>
<th scope=”row”><label for="sefa_body">Message:</label></th>
<td align="left">
<?php
$settings = array( "editor_height" => "200" );
wp_editor( sefa_plugin_issetor($sefa_body), "sefa_body", $settings );
?>
</td>
</tr>
<tr>
<th scope=”row”><label for="attachment">Attachment:</label></th>
<td><input type="file" id="attachment" name="attachment"></td>
</tr>
<tr>
<td colspan="2" align="right">
<input type="submit" value="<?php _e( 'Send Email', 'sefa' ); ?>" name="submit" class="button button-primary">
</td>
</tr>
</table>
</form>
</div>
<div id="postbox-container-1" class="postbox-container">
<div class="postbox">
<h3><span>Like this plugin?</span></h3>
<div class="inside">
<ul>
<li><a href="https://wordpress.org/support/view/plugin-reviews/send-email-from-admin?filter=5" target="_blank">Rate it on WordPress.org</a></li>
<li><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=8HHLL6WRX9Z68" target="_blank">Donate to the developer</a></li>
</ul>
</div> <!-- .inside -->
</div>
</div>
<div class="clear"></div>
</div>
</div>
</div>
<?php
}