PluginProbe
Friends / 2.8.1
Friends v2.8.1
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 / unfriend.php

unfriend.php in Friends 2.8.1, at templates/admin/unfriend.php

85 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * This template shows the Unfriend page.
4 *
5 * @version 1.0
6 * @package Friends
7 */
8
9 $heading = sprintf(
10 // translators: %s is a username.
11 _x( 'Unfriend %s', 'heading', 'friends' ),
12 $args['friend']->user_login
13 );
14
15 $button_text = sprintf(
16 // translators: %s is a username.
17 _x( 'Delete %s', 'action', 'friends' ),
18 $args['friend']->user_login
19 );
20 if ( is_multisite() ) {
21 $button_text = sprintf(
22 // translators: %s is a username.
23 _x( 'Remove %s', 'action', 'friends' ),
24 $args['friend']->user_login
25 );
26 }
27 $numfeeds = count( $args['friend']->get_active_feeds() );
28
29 ?>
30 <div class="wrap">
31 <h3><?php echo esc_html( $heading ); ?></h3>
32 <form method="post">
33 <?php wp_nonce_field( 'unfriend-' . $args['friend']->user_login ); ?>
34 <p><?php esc_html_e( 'Since friends correspond to WordPress users, unfriending a user means to delete the user.', 'friends' ); ?></p>
35 <h4>
36 <?php
37 echo get_avatar( $args['friend']->user_login, 24 );
38 echo ' ';
39 echo esc_html( $args['friend']->user_login );
40 ?>
41 </h4>
42 <ul class="ul-disc">
43 <li>
44 <a href="<?php echo esc_url( $args['friend']->get_local_friends_page_url() ); ?>">
45 <?php
46 echo esc_html(
47 sprintf(
48 /* translators: %s: Number of posts. */
49 _n( '%s post', '%s posts', $args['friend_posts'] ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain
50 number_format_i18n( $args['friend_posts'] )
51 )
52 );
53 ?>
54 </li>
55 <li>
56 <a href="<?php echo esc_url( self_admin_url( 'admin.php?page=edit-friend-feeds&user=' . $args['friend']->user_login ) ); ?>">
57 <?php
58 echo esc_html(
59 sprintf(
60 /* translators: %s is the number of feeds */
61 _n( '%s feed', '%s feeds', $numfeeds, 'friends' ),
62 number_format_i18n( $numfeeds )
63 )
64 );
65 ?>
66 </a>
67 </li>
68 </ul>
69 <p class="description">
70 <?php
71 esc_html_e( 'This will delete all cached posts, feeds, and other metadata for this user on this site.', 'friends' );
72 if ( is_multisite() ) {
73 echo ' ';
74 esc_html_e( 'Since this is a multisite install, the user will only be removed from this site.', 'friends' );
75 }
76 ?>
77 </p>
78
79 <p class="submit">
80 <input type="submit" id="submit" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
81 </p>
82
83 </form>
84 </div>
85