| 1 |
<?php |
| 2 |
/** |
| 3 |
* This template contains the friend editor. |
| 4 |
* |
| 5 |
* @version 1.0 |
| 6 |
* @package Friends |
| 7 |
*/ |
| 8 |
|
| 9 |
?><form method="post"> |
| 10 |
<?php wp_nonce_field( 'edit-friend-notifications-' . $args['friend']->user_login ); ?> |
| 11 |
<table class="form-table"> |
| 12 |
<tbody> |
| 13 |
<?php if ( $args['friend']->can_refresh_feeds() ) : ?> |
| 14 |
<tr> |
| 15 |
<th scope="row"><?php esc_html_e( 'New Post Notification', 'friends' ); ?></th> |
| 16 |
<td> |
| 17 |
<?php if ( get_user_option( 'friends_no_new_post_notification' ) ) : ?> |
| 18 |
<span class="description"><?php esc_html_e( 'You have generally disabled new post notifications for yourself.', 'friends' ); ?> <a href="<?php echo esc_url( add_query_arg( '_wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), self_admin_url( 'admin.php?page=friends-settings' ) ) ); ?>"><?php esc_html_e( 'Change this setting', 'friends' ); ?></a></span> |
| 19 |
<?php else : ?> |
| 20 |
<fieldset> |
| 21 |
<label for="friends_new_post_notification"> |
| 22 |
<input name="friends_new_post_notification" type="checkbox" id="friends_new_post_notification" value="1" <?php checked( '1', ! get_user_option( 'friends_no_new_post_notification_' . $args['friend']->user_login ) ); ?> /> |
| 23 |
<?php esc_html_e( 'Send me an e-mail for posts of this friend', 'friends' ); ?> |
| 24 |
</label> |
| 25 |
</fieldset> |
| 26 |
<?php endif; ?> |
| 27 |
</td> |
| 28 |
</tr> |
| 29 |
<tr> |
| 30 |
<th scope="row"><?php esc_html_e( 'Keyword Notification', 'friends' ); ?></th> |
| 31 |
<td> |
| 32 |
<fieldset> |
| 33 |
<label for="friends_keyword_notification"> |
| 34 |
<input name="friends_keyword_notification" type="checkbox" id="friends_keyword_notification" value="1" <?php checked( '1', ! get_user_option( 'friends_no_keyword_notification_' . $args['friend']->user_login ) ); ?> /> |
| 35 |
<?php |
| 36 |
echo wp_kses_post( |
| 37 |
sprintf( |
| 38 |
// translators: %s is a URL. |
| 39 |
__( 'Send me an e-mail for posts of this friend if matches one of <a href="%s">my keywords</a>', 'friends' ), |
| 40 |
esc_url( add_query_arg( '_wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), self_admin_url( 'admin.php?page=friends-settings' ) ) ) |
| 41 |
) |
| 42 |
); |
| 43 |
?> |
| 44 |
</label> |
| 45 |
</fieldset> |
| 46 |
</td> |
| 47 |
</tr> |
| 48 |
<?php endif; ?> |
| 49 |
<?php do_action( 'friends_edit_friend_notifications_table_end', $args['friend'] ); ?> |
| 50 |
</tbody> |
| 51 |
</table> |
| 52 |
<?php do_action( 'friends_edit_friend_after_form', $args['friend'] ); ?> |
| 53 |
<p class="submit"> |
| 54 |
<input type="submit" id="submit" class="button button-primary" value="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Save Changes' ); ?>"> |
| 55 |
</p> |
| 56 |
</form> |
| 57 |
|