Remove helper function swpm_plugin_issetor()
This commit is contained in:
parent
232a901b0c
commit
1251f097bc
@ -167,7 +167,7 @@ function swpm_plugin_main() {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope=”row”><label for="swpm-recipient-emails">To:</label></th>
|
<th scope=”row”><label for="swpm-recipient-emails">To:</label></th>
|
||||||
<td><input type="email" multiple id="swpm-recipient-emails" name="email_to" value="<?php echo esc_attr( swpm_plugin_issetor($email_to) ); ?>" required><div class="note"><?php _e( 'To send to multiple recipients, enter each email address separated by a comma or choose from the user list below.', 'swpm' ); ?></div>
|
<td><input type="email" multiple id="swpm-recipient-emails" name="email_to" value="<?php echo esc_attr( $email_to ?? '' ); ?>" required><div class="note"><?php _e( 'To send to multiple recipients, enter each email address separated by a comma or choose from the user list below.', 'swpm' ); ?></div>
|
||||||
<select id="swpm-user-list">
|
<select id="swpm-user-list">
|
||||||
<option value="">-- <?php _e( 'user list', 'swpm' ); ?> --</option>
|
<option value="">-- <?php _e( 'user list', 'swpm' ); ?> --</option>
|
||||||
<?php
|
<?php
|
||||||
@ -200,14 +200,14 @@ function swpm_plugin_main() {
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope=”row”><label for="swpm-subject">Subject:</label></th>
|
<th scope=”row”><label for="swpm-subject">Subject:</label></th>
|
||||||
<td><input type="text" id="swpm-subject" name="email_subject" value="<?php echo esc_attr( swpm_plugin_issetor($email_subject) );?>" required></td>
|
<td><input type="text" id="swpm-subject" name="email_subject" value="<?php echo esc_attr( $email_subject ?? '' );?>" required></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope=”row”><label for="email_body">Message:</label></th>
|
<th scope=”row”><label for="email_body">Message:</label></th>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
<?php
|
<?php
|
||||||
$settings = array( "editor_height" => "200" );
|
$settings = array( "editor_height" => "200" );
|
||||||
wp_editor( swpm_plugin_issetor($email_body), "email_body", $settings );
|
wp_editor( $email_body ?? '', "email_body", $settings );
|
||||||
?>
|
?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -240,16 +240,3 @@ function swpm_plugin_main() {
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Helper function for form values
|
|
||||||
*
|
|
||||||
* @since 0.9
|
|
||||||
*
|
|
||||||
* @param string $var Var name to test isset
|
|
||||||
*
|
|
||||||
* @return string $var value if isset or ''
|
|
||||||
*/
|
|
||||||
function swpm_plugin_issetor(&$var) {
|
|
||||||
return isset($var) ? $var : '';
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user