PluginProbe
Friends / 2.7.9
Friends v2.7.9
4.3.2 4.3.1 4.3.0 4.2.2 4.2.1 4.2.0 4.1.0 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.0 2.9.1 All 88 releases
friends / templates / admin / notification-manager.php

notification-manager.php in Friends 2.7.9, at templates/admin/notification-manager.php

70 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template contains the notification manager.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 if ( $args['no_new_post_notification'] ) : ?>
10 <p class="description"><?php esc_html_e( 'You have generally disabled new post notifications for yourself.', 'friends' ); ?> <a href="<?php echo esc_url( $args['friends_settings_url'] ); ?>"><?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( '(Edit)' ); ?></a></p>
11 <?php endif; ?>
12
13 <p class="description">
14 <?php
15 if ( $args['active_keywords'] ) {
16 echo esc_html(
17 sprintf(
18 // translators: %1$s is the number of active keywords, %2$s is the list of those keywords.
19 _n( 'There is %1$s active keyword: %2$s', 'There are %1$s active keywords: %2$s', count( $args['active_keywords'] ), 'friends' ),
20 count( $args['active_keywords'] ),
21 esc_html( implode( ', ', $args['active_keywords'] ) )
22 )
23 );
24 } else {
25 esc_html_e( 'No notification keywords have been specified.', 'friends' );
26 }
27 ?>
28 <a href="<?php echo esc_url( $args['friends_settings_url'] ); ?>"><?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( '(Edit)' ); ?></a>
29 </p>
30
31 <form method="post">
32 <?php wp_nonce_field( 'notification-manager' ); ?>
33 <table class="wp-list-table widefat fixed striped" style="margin-top: 2em; margin-bottom: 2em; margin-right: 1em">
34 <thead>
35 <tr>
36 <th class="column-primary column-friend"><?php esc_html_e( 'Friend', 'friends' ); ?></th>
37 <th class="column-friends-page-feeds"><?php esc_html_e( 'Show on friends page', 'friends' ); ?></th>
38 <th class="column-email-notification"><?php esc_html_e( 'E-Mail Notification', 'friends' ); ?></th>
39 <th class="column-email-notification"><?php esc_html_e( 'Keyword Notification', 'friends' ); ?></th>
40 <?php do_action( 'friends_notification_manager_header' ); ?>
41 </tr>
42 </thead>
43 <tbody>
44 <?php foreach ( $args['friend_users'] as $friend_user ) : ?>
45 <tr>
46 <td class="column-friend">
47 <a href="<?php echo esc_url( Friends\Admin::get_edit_friend_link( $friend_user->user_login ) ); ?>"><?php echo esc_html( $friend_user->display_name ); ?></a>
48 <input type="hidden" name="friend_listed[]" value="<?php echo esc_attr( $friend_user->user_login ); ?>" />
49 </td>
50 <td class="column-friends-page-feeds">
51 <input name="show_on_friends_page[<?php echo esc_attr( $friend_user->user_login ); ?>]" type="checkbox" id="show_on_friends_page" value="1" <?php checked( '1', ! in_array( $friend_user->user_login, $args['hide_from_friends_page'] ) ); ?> />
52 </td>
53 <td class="column-email-notification">
54 <input name="new_post_notification[<?php echo esc_attr( $friend_user->user_login ); ?>]" type="checkbox" id="friends_new_post_notification" value="1" <?php checked( '1', ! get_user_option( 'friends_no_new_post_notification_' . $friend_user->user_login ) ); ?> <?php echo $args['no_new_post_notification'] ? 'disabled="disabled"' : ''; ?>
55 />
56 </td>
57 <td class="column-keyword-notification">
58 <input name="keyword_notification[<?php echo esc_attr( $friend_user->user_login ); ?>]" type="checkbox" id="friends_keyword_notification" value="1" <?php checked( '1', ! get_user_option( 'friends_no_keyword_notification_' . $friend_user->user_login ) ); ?> <?php echo $args['no_keyword_notification'] ? 'disabled="disabled"' : ''; ?>
59 />
60 </td>
61 <?php do_action( 'friends_notification_manager_row', $friend_user ); ?>
62 </tr>
63 <?php endforeach; ?>
64 </tbody>
65 </table>
66 <p class="submit">
67 <input type="submit" id="submit" class="button button-primary" value="<?php /* phpcs:ignore WordPress.WP.I18n.MissingArgDomain */ esc_html_e( 'Save Changes' ); ?>">
68 </p>
69 </form>
70