PluginProbe
Friends / 2.7.5
Friends v2.7.5
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.7.5, at templates/admin/unfriend.php

86 lines 2.3 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 $numposts = count( $args['friend']->get_all_post_ids() );
28 $numfeeds = count( $args['friend']->get_active_feeds() );
29
30 ?>
31 <div class="wrap">
32 <h3><?php echo esc_html( $heading ); ?></h3>
33 <form method="post">
34 <?php wp_nonce_field( 'unfriend-' . $args['friend']->user_login ); ?>
35 <p><?php esc_html_e( 'Since friends correspond to WordPress users, unfriending a user means to delete the user.', 'friends' ); ?></p>
36 <h4>
37 <?php
38 echo get_avatar( $args['friend']->user_login, 24 );
39 echo ' ';
40 echo esc_html( $args['friend']->user_login );
41 ?>
42 </h4>
43 <ul class="ul-disc">
44 <li>
45 <a href="<?php echo esc_url( $args['friend']->get_local_friends_page_url() ); ?>">
46 <?php
47 echo esc_html(
48 sprintf(
49 /* translators: %s: Number of posts. */
50 _n( '%s post', '%s posts', $numposts ), // phpcs:ignore WordPress.WP.I18n.MissingArgDomain
51 number_format_i18n( $numposts )
52 )
53 );
54 ?>
55 </li>
56 <li>
57 <a href="<?php echo esc_url( self_admin_url( 'admin.php?page=edit-friend-feeds&user=' . $args['friend']->user_login ) ); ?>">
58 <?php
59 echo esc_html(
60 sprintf(
61 /* translators: %s is the number of feeds */
62 _n( '%s feed', '%s feeds', $numfeeds, 'friends' ),
63 number_format_i18n( $numfeeds )
64 )
65 );
66 ?>
67 </a>
68 </li>
69 </ul>
70 <p class="description">
71 <?php
72 esc_html_e( 'This will delete all cached posts, feeds, and other metadata for this user on this site.', 'friends' );
73 if ( is_multisite() ) {
74 echo ' ';
75 esc_html_e( 'Since this is a multisite install, the user will only be removed from this site.', 'friends' );
76 }
77 ?>
78 </p>
79
80 <p class="submit">
81 <input type="submit" id="submit" class="button button-primary" value="<?php echo esc_html( $button_text ); ?>">
82 </p>
83
84 </form>
85 </div>
86