Search Results for 'Hide Admin'
-
AuthorSearch Results
-
July 13, 2019 at 2:55 pm #306908
Topic: Admin link in profile menu
in forum How-to & Troubleshootingbeat sk
ParticipantHello again friends. 🙂
Now I have a question about buddypress profile menu. How can i make a link in the menu only for userroles? Something like “Go to administration” in the profile menu – Profile, Activity, Groups, Messages ? Is there a chance to add this only for user roles and admins? The website is built to hide we are using wordpress in front of people. Register and Login working on front-end and we want hide /wp-admin from others. Thank you for positive/negative feedback.
July 4, 2019 at 7:02 pm #306826In reply to: Create links to Buddypress pages
chris19731973
Participant<?php /** * Listing detail Page. * * @link https://pluginsware.com * @since 1.0.0 * * @package Advanced_Classifieds_And_Directory_Pro */ // Exit if accessed directly if ( ! defined( 'WPINC' ) ) { die; } /** * ACADP_Public_Listing Class. * * @since 1.0.0 */ class ACADP_Public_Listing { /** * Filter the post content. * * @since 1.5.4 * @param string $html The post thumbnail HTML. * @return string $html Filtered thumbnail HTML. */ public function post_thumbnail_html( $html ) { if ( is_singular( 'acadp_listings' ) ) { return ''; } return $html; } /** * Filter the post content. * * @since 1.0.0 * @param string $content Content of the current post. * @return string $content Modified Content. */ public function the_content( $content ) { if ( is_singular( 'acadp_listings' ) && in_the_loop() && is_main_query() ) { global $post; acadp_update_listing_views_count( $post->ID ); $general_settings = get_option( 'acadp_general_settings' ); $recaptcha_settings = get_option( 'acadp_recaptcha_settings' ); $registration_settings = get_option( 'acadp_registration_settings' ); $post_meta = get_post_meta( $post->ID ); $description = $content; $can_show_date = isset( $general_settings['display_options'] ) && in_array( 'date', $general_settings['display_options'] ) ? true : false; $can_show_user = isset( $general_settings['display_options'] ) && in_array( 'user', $general_settings['display_options'] ) ? true : false; $can_show_views = isset( $general_settings['display_options'] ) && in_array( 'views', $general_settings['display_options'] ) ? true : false; $can_show_contact_form = empty( $general_settings['has_contact_form'] ) ? false : true; $can_add_favourites = empty( $general_settings['has_favourites'] ) ? false : true; $can_report_abuse = empty( $general_settings['has_report_abuse'] ) ? false : true; $has_widgets = acadp_has_active_listing_widgets(); $has_sidebar = ! $has_widgets; // $login_url $current_page_url = get_permalink(); $login_url = acadp_get_user_login_page_link( $current_page_url ); // $location $has_location = empty( $general_settings['has_location'] ) ? false : true; $can_show_location = false; if ( $has_location ) { $location = wp_get_object_terms( $post->ID, 'acadp_locations' ); if ( ! empty( $location ) ) { $location = $location[0]; $can_show_location = true; } } // $category $has_category = false; $can_show_category = isset( $general_settings['display_options'] ) && in_array( 'category', $general_settings['display_options'] ) ? true : false; $can_show_category_desc = isset( $general_settings['display_options'] ) && in_array( 'category_desc', $general_settings['display_options'] ) ? true : false; $categories = wp_get_object_terms( $post->ID, 'acadp_categories' ); if ( empty( $categories ) ) { $can_show_category = false; } else { $category = $categories[0]; $has_category = true; } // $can_show_images $has_images = empty( $general_settings['has_images'] ) ? false : true; $can_show_images = false; if ( $has_images ) { $can_show_images = isset( $post_meta['images'] ) ? true : false; } // $can_show_video $has_video = empty( $general_settings['has_video'] ) ? false : true; $can_show_video = false; $video_url = ''; if ( $has_video ) { if ( ! empty( $post_meta['video'][0] ) ) { $video_url = acadp_parse_videos( $post_meta['video'][0] ); $can_show_video = empty( $video_url ) ? false : true; } } // $can_show_map $has_map = ! empty( $general_settings['has_map'] ) && empty( $post_meta['hide_map'][0] ) ? true : false; $can_show_map = false; if ( $can_show_location && $has_map ) { $can_show_map = ! empty( $post_meta['latitude'][0] ) && ! empty( $post_meta['longitude'][0] ) ? true : false; } // $can_show_price $has_price = empty( $general_settings['has_price'] ) ? false : true; $can_show_price = false; if ( $has_price && isset( $post_meta['price'] ) && $post_meta['price'][0] > 0 ) { $can_show_price = true; } // Get custom fields $fields = array(); $category_ids = array(); foreach ( $categories as $category ) { $category_ids[] = $category->term_id; } $custom_field_ids = acadp_get_custom_field_ids( $category_ids ); if ( ! empty( $custom_field_ids ) ) { $args = array( 'post_type' => 'acadp_fields', 'post_status' => 'publish', 'posts_per_page' => 500, 'post__in' => $custom_field_ids, 'no_found_rows' => true, 'update_post_term_cache' => false, 'meta_key' => 'order', 'orderby' => 'meta_value_num', 'order' => 'ASC' ); $acadp_query = new WP_Query( $args ); if ( $acadp_query->have_posts() ) { $fields = $acadp_query->posts; } } // Process output ob_start(); do_action( 'acadp_before_listing_content' ); include( acadp_get_template( "listing/acadp-public-listing-display.php" ) ); do_action( 'acadp_after_listing_content' ); $content = ob_get_clean(); } return $content; } /** * Add or Remove favourites. * * @since 1.0.0 */ public function ajax_callback_add_remove_favorites() { check_ajax_referer( 'acadp_ajax_nonce', 'security' ); $post_id = (int) $_POST['post_id']; $favourites = (array) get_user_meta( get_current_user_id(), 'acadp_favourites', true ); if ( in_array( $post_id, $favourites ) ) { if ( ( $key = array_search( $post_id, $favourites ) ) !== false ) { unset( $favourites[ $key ] ); } } else { $favourites[] = $post_id; } $favourites = array_filter( $favourites ); $favourites = array_values( $favourites ); delete_user_meta( get_current_user_id(), 'acadp_favourites' ); update_user_meta( get_current_user_id(), 'acadp_favourites', $favourites ); the_acadp_favourites_link( $post_id ); wp_die(); } /** * Report Abuse. * * @since 1.0.0 */ public function ajax_callback_report_abuse() { check_ajax_referer( 'acadp_ajax_nonce', 'security' ); $data = array( 'error' => 0 ); if ( acadp_is_human('report_abuse') ) { if ( acadp_email_admin_report_abuse() ) { $data['message'] = __( 'Your message sent successfully.', 'advanced-classifieds-and-directory-pro' ); } else { $data['error'] = 1; $data['message'] = __( 'Sorry! Please try again.', 'advanced-classifieds-and-directory-pro' ); } } else { $data['error'] = 1; $data['message'] = __( 'Invalid Captcha: Please try again.', 'advanced-classifieds-and-directory-pro' ); } echo wp_json_encode( $data ); wp_die(); } /** * Send contact email. * * @since 1.0.0 */ public function ajax_callback_send_contact_email() { check_ajax_referer( 'acadp_ajax_nonce', 'security' ); $data = array( 'error' => 0 ); if ( acadp_is_human('contact') ) { if ( acadp_email_listing_owner_listing_contact() ) { // Send a copy to admin( only if applicable ). acadp_email_admin_listing_contact(); $data['message'] = __( 'Your message sent successfully.', 'advanced-classifieds-and-directory-pro' ); } else { $data['error'] = 1; $data['message'] = __( 'Sorry! Please try again.', 'advanced-classifieds-and-directory-pro' ); } } else { $data['error'] = 1; $data['message'] = __( 'Invalid Captcha: Please try again.', 'advanced-classifieds-and-directory-pro' ); } echo wp_json_encode( $data ); wp_die(); } }May 23, 2019 at 12:55 am #306086Topic: Redirect to a custom tab
in forum How-to & Troubleshootingjennifersanchez
ParticipantHi.
Im using this code to hide the tabs in the profile’s visitor
function bpfr_hide_tabs() { global $bp; if( class_exists( 'bbPress' ) || bp_is_active ( 'groups' ) ) : if ( bp_is_user() && !is_super_admin() && !bp_is_my_profile() ) { bp_core_redirect( get_option('home') . '/members/' . bp_core_get_user(). '/reviews' ); bp_core_remove_nav_item( 'friends' ); bp_core_remove_nav_item( 'groups' ); bp_core_remove_nav_item( 'activity' ); } endif; } add_action( 'bp_setup_nav', 'bpfr_hide_tabs', 15 );but the line
bp_core_redirect( get_option('home') . '/members/' . bp_core_get_user( ). '/reviews' );dont works.
i tried with this('BP_DEFAULT_COMPONENT','reviews');but this dont works..Thanks very much!!
April 16, 2019 at 7:42 pm #304950In reply to: login/registration pages “not found”
Venutius
ModeratorIf you go to Appearance/Menus in WP Admin, you should be able to edit the menu and delete those links. While you are there, click on Page Options on the top right of the page and make sure BuddyPress is checked.
Note: it looks like you have multiple menus so you will have to select the correct menu to edit.
Then you should see the BuddyPress menu links meta-box and you will see there’s a login link you can add to the menu. That should sort out your BuddyPress login, same with Register.
I’ve got a site buddyuser dot com, I’ve created a beginners introduction to BuddyPress, you might want to take a look at that.
It’s possible to hide menu links that you don’t want the general public to know about. There’s a few plugins that do this but one I use is https://wordpress.org/plugins/nav-menu-roles/ this adds a handy checkbox to allow you to stipulate who can see that menu item.
April 8, 2019 at 7:18 pm #304530Topic: Hide User’s Private Messages from Admin(me)
in forum How-to & Troubleshootingthecomputergi
ParticipantHello,
I was wondering if there is a plugin, or bit of code I could remove or add to make it where there is no possible way for me to see user’s private messages. Right now I can use the Export Personal Data tool or go to their profiles and click messages. I want to disable both of these features permanently.
Thanks!April 4, 2019 at 12:16 pm #304339In reply to: how to combine activity tabs to one
Venutius
ModeratorHi there,
My suggestion is that you add a new menu item “All” and create a new set of queries for the page then make that page the default landing page for the profile activity page. Here’s my code to do this:
function bpex_set_member_default_nav() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) { return; } bp_core_new_nav_default( array( 'parent_slug' => buddypress()->activity->id, // other "activity" sub_nav slugs : personal favorites friends groups mentons 'subnav_slug' => 'all-activity', 'screen_function' => 'bp_activity_screen_all_activity' ) ); } add_action( 'bp_setup_nav', 'bpex_set_member_default_nav', 20 ); add_action( 'bp_setup_nav', 'bpex_just_me_tab', 50 ); add_action( 'bp_setup_admin_bar', 'bpex_admin_bar_add', 50 ); function bpex_just_me_tab() { if ( ! bp_is_user_profile() && ! bp_is_user_activity() && ! bp_is_user() ) { return; } global $bp; $user_id = bp_displayed_user_id(); bp_core_new_subnav_item( array( 'name' => _x( 'All', 'Profile activity screen sub nav', 'buddypress' ), 'slug' => 'all-activity', 'parent_url' => bp_core_get_user_domain( $user_id ) . 'activity/', 'parent_slug' => 'activity', 'screen_function' => 'bp_activity_screen_all_activity', 'position' => 10 ) ); } function bpex_admin_bar_add() { global $wp_admin_bar, $bp; if ( ! bp_use_wp_admin_bar() || defined( 'DOING_AJAX' ) ) { return false; } $user_id = get_current_user_id(); if ( ! $user_id || $user_id == 0 || ! is_numeric( $user_id ) ) { return; } // Personal. //$wp_admin_bar->remove_menu( 'my-account-activity-personal', 'my-account-activity' ); $wp_admin_bar->add_menu( array( 'parent' => 'my-account-activity', 'id' => 'my-account-activity-all-activity', 'title' => 'All', 'href' => bp_core_get_user_domain( $user_id ) . 'activity/all-activity/', 'position' => 10 ) ); } function bp_activity_screen_all_activity() { do_action( 'bp_activity_screen_all_activity' ); bp_core_load_template( apply_filters( 'bp_activity_template_all_activity', 'members/single/home' ) ); } function bp_activity_filter_all_activity_scope( $retval = array(), $filter = array() ) { // Determine the user_id. if ( ! empty( $filter['user_id'] ) ) { $user_id = $filter['user_id']; } else { $user_id = bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(); } // Should we show all items regardless of sitewide visibility? $show_hidden = array(); if ( ! empty( $user_id ) && $user_id !== bp_loggedin_user_id() ) { $show_hidden = array( 'column' => 'hide_sitewide', 'value' => 0 ); } // Determine groups of user. $groups = groups_get_user_groups( $user_id ); if ( empty( $groups['groups'] ) ) { $groups = array( 'groups' => 0 ); } // Determine the favorites. $favs = bp_activity_get_user_favorites( $user_id ); if ( empty( $favs ) ) { $favs = array( 0 ); } // Determine friends of user. $friends = friends_get_friend_user_ids( $user_id ); if ( empty( $friends ) ) { $friends = array( 0 ); } $retval = array( 'relation' => 'OR', array( 'relation' => 'AND', array( 'column' => 'user_id', 'compare' => 'IN', 'value' => (array) $friends ) ), array( 'relation' => 'AND', array( 'column' => 'component', 'value' => buddypress()->groups->id ), array( 'column' => 'item_id', 'compare' => 'IN', 'value' => (array) $groups['groups'] ) ), array( 'relation' => 'AND', array( 'column' => 'user_id', 'value' => $user_id ) ), array( 'relation' => 'AND', array( 'column' => 'id', 'compare' => 'IN', 'value' => (array) $favs ) ), array( 'relation' => 'AND', array( 'column' => 'content', 'compare' => 'LIKE', // Start search at @ symbol and stop search at closing tag delimiter. 'value' => '@' . bp_activity_get_user_mentionname( $user_id ) . '<' ) ), // We should only be able to view sitewide activity content for friends. array( 'column' => 'hide_sitewide', 'value' => 0 ), // Overrides. 'override' => array( 'filter' => array( 'user_id' => 0 ), 'show_hidden' => true ), ); return $retval; } add_filter( 'bp_activity_set_all-activity_scope_args', 'bp_activity_filter_all_activity_scope', 10, 2 );Once you have done that you would also want to overload the buddypress/bp-templates/your-template/members/single/activity.php to make sure this new page contains the post update form:
Change:
if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'just-me' ) ) ) bp_get_template_part( 'activity/post-form' );To:
if ( is_user_logged_in() && bp_is_my_profile() && ( !bp_current_action() || bp_is_current_action( 'all-activity' ) ) ) bp_get_template_part( 'activity/post-form' );Note: with this method there is a danger of duplicating activity since a friend posting to a group would show up in the groups search as well as the friends search etc. so you may want to adjust the $retval criteria.
Also you might want to add a post form for visiting users so they can leave a comment for the user, you could ad this:
function bpex_load_mention_me() { if ( get_current_user_id() != bp_displayed_user_id() ) { $_GET['r'] = bp_activity_get_user_mentionname( bp_displayed_user_id() ); bp_get_template_part( 'activity/post-form' ); } } add_action( 'bp_before_member_body', 'bpex_load_mention_me' );March 22, 2019 at 6:38 pm #303892In reply to: WordPress Dashboard
Venutius
ModeratorThe basic option is to set up a redirect for anyone but admin, that would involve adding some code to your functions.php. There’s probably plugins that d it, but it’s quite simple with code if you are happy with that.
That would not stop links from appearing in the WordPress admin-bar / toolbar. Would you still want to give them access to the BuddyPress menu options via the toolbar?
I’ve recently launched a BP specific Front End editor and I’ve included all the various hide admin code in that. You can choose to hide the admin-bar altogether or prune out the menu items you don’t want to display, such as the +New menu item.
March 12, 2019 at 6:10 pm #303497melodynest
ParticipantFirst time poster! Hello everyone 🙂
I am using: Marketplace One Social theme, WC Vendors, Woocommerce, BP Better messages (websocket upgrade).
Is there a way to make the ability to start conversations only for admin? I am designing a freelancer type website where I only want the Admin to be able to connect buyers and sellers into a private conversation after the purchase has been made (to avoid circumvention). I want vendors and subscribers to have access to their messages, just not the ability to start a new one.
I am thinking maybe CSS to hide compose features? Could that be the easiest solution?
Thanks in advance for any ideas!
February 19, 2019 at 11:12 am #302952In reply to: Deny access to admins profile not working
shanebp
Moderatorfunction bpfr_hide_admins_profile() { $admin_ids = array( 1, 22, 48 ); if( bp_is_user() ) { if ( in_array( bp_displayed_user_id(), $admin_ids ) && ! in_array( bp_loggedin_user_id(), $admin_ids ) ) { bp_core_redirect( site_url() ); } } } add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1 );February 19, 2019 at 4:24 am #302946In reply to: Deny access to admins profile not working
Kristian Yngve
ParticipantIt all works, thank you so much @shanebp!
so if there are more than one admin profiles, i can just use commas?
for eg:
function bpfr_hide_admins_profile() { if( bp_is_user() && bp_displayed_user_id() == 1,2,3 && bp_loggedin_user_id() != 1,2,3 ) { bp_core_redirect( site_url() ); } } add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1,2,3 );This to do like that correct?
February 18, 2019 at 10:44 pm #302945In reply to: Deny access to admins profile not working
shanebp
ModeratorI’m surprised that your code ever worked.
Try:
function bpfr_hide_admins_profile() { if( bp_is_user() && bp_displayed_user_id() == 1 && bp_loggedin_user_id() != 1 ) { bp_core_redirect( site_url() ); } } add_action( 'bp_ready', 'bpfr_hide_admins_profile', 1 );Of course – this assumes that there is only one site admin and the
user_idfor that admin is1.February 18, 2019 at 8:35 pm #302941Topic: Deny access to admins profile not working
in forum How-to & TroubleshootingKristian Yngve
ParticipantEven after removing all probably issues in my plugins, functions and bp-custim.php, I can’t seem to get the ‘Deny access to admins profile not working’ to work:
//deny access to admins profile. User is redirected to the homepage function bpfr_hide_admins_profile() { global $bp; if(bp_is_profile && $bp->displayed_user->id == 1 && $bp->loggedin_user->id != 1) : wp_redirect( home_url() ); exit; endif; } add_action( 'wp', 'bpfr_hide_admins_profile', 1 );I have everything up to date as much as possible.
Any ideas?
Have also tried:
bp_is_user()many thanks
February 18, 2019 at 8:19 pm #302939Topic: Regarding Profile Field Visibility
in forum How-to & Troubleshootingsitesfromash
ParticipantHi. I noticed that the three options which BuddyPress offers in regards to field visibility is “Only Me”, “Friends Only”, and “Everyone”. If someone sets their preference of a field to “Only Me” or “Friends Only”, is it still possible for the admin to see it? If not, is there a method that I can implement to see it as an admin but to hide it to other members? Also, can I put this field into an additional column on the Users Admin Panel? Thanks for any assistance which you can provide me.
February 7, 2019 at 10:01 am #302676In reply to: Custom admin menu access
natiaz
ParticipantOk, I thought that.
So basically I’m going to need to grant user manage_options capability and then hide every every admin menu except the groups one.
Thanks!
January 28, 2019 at 1:16 pm #302438In reply to: visibility options bug?
msteimann
ParticipantThanks for your quick reply, Venutius!
I have tried the WP 2015 Theme and got the same results. So I switched back to KLEO and noticed, that the xProfile fields do change to the desired visibility settings, AFTER the user clicks the SAVE SETTINGS button. So I guess I was confused by the fact that BEFORE you hit the save button there is a misleading visual feedback (the visibility term does not alter to the according setting the user has just changed it to, it still displays the same value as before).
Could this be changed in the next release?
My first problem still remains: the „change display name visibility option“ is displayed beneath the name field on the user Registration page. This doesn’t make sense, if the name’s visibility throughout BuddyPress network is mandatory. How can I get rid of this line? Does this line and it’s user changeable visibility options really not appear on a default install?
In the WP Dashboard I cannot change the options for the primary Name field. Only the fields under the details tab can be altered by admin and set to be visibility-changeable by the user. (Hope you understand what I try to say 😉
Regards,
Martin
January 22, 2019 at 7:49 am #302338In reply to: How to hide profile of administrator?
karpolan
ParticipantSo what is a standard solution to hide Admin and other Staff profiles?
January 10, 2019 at 9:15 am #302153Topic: Remove notification count if zero
in forum How-to & Troubleshootinggcrea
ParticipantHi, I’m trying to remove the admin bar notification counter if it is zero, but show it otherwise. I’m using the following code, hope you can help! I have this in my footer file.
$(function () {
if (parseInt($(“#wpadminbar span.count”).text()) == 0) {
//$(“.notification-counter”).hide();
$(“#wpadminbar span.count”).hide();
}
});November 28, 2018 at 7:54 am #282250Topic: Problems after update to 4.0.
in forum How-to & TroubleshootingHanz17
ParticipantHi,
after update to BP 4.0. I have problems with two BP functions – bp_displayed_user_id, bp_is_my_profile
Fatal error: Uncaught Error: Call to undefined function bp_displayed_user_id() in ...wp-content/themes/socialize-child/functions.php:73 Stack trace: #0 ...wp-includes/class-wp-hook.php(286): hide_profile('') #1 ...wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array) #2 ...wp-includes/plugin.php(453): WP_Hook->do_action(Array) #3 ...wp-settings.php(450): do_action('init') #4 ...wp-config.php(84): require_once('/www/doc/www.lo...') #5 ...wp-load.php(37): require_once('/www/doc/www.lo...') #6 ...wp-admin/admin.php(31): require_once('/www/doc/www.lo...') #7 ...wp-admin/index.php(10): require_once('/www/doc/www.lo...') #8 {main} thrown in ...wp-content/themes/socialize-child/functions.php on line 73Thanks for help
November 6, 2018 at 7:28 am #280343Topic: Hide members own pages from other members
in forum How-to & Troubleshootingantabc
ParticipantHi!
Is it possible to hide members own pages from other users than admin.
Example if I have users “user1” and “user2”.
If User1 is in his own page “www.yourdomain.com/members/user1”
User1 can acces to User2 own page by changing only url to “www.yourdomain.com/members/user2”
November 1, 2018 at 9:20 am #279732In reply to: Hide some users from members directory
adrihessels
ParticipantHello Prashant Singh,
In which file/directory you need to put the code. In other cases i’ve found /wp-content/plugins/bp-custom.php
Trying this gives an error.
Question: why is this option to hide adminstrators of other kind of roles not a default parameter?
October 19, 2018 at 1:05 pm #279175Prashant Singh
ParticipantThe last option we can try is CSS. I can give you a code that will hide that button for all the members except admins.
October 19, 2018 at 11:58 am #279166Anonymous User 16484011
InactiveHi !
Prashant,
Thanks for this fast answer.
I wrap button code as per your instruction. But I think I am not a good developer so may be I am doing some mistake and output not came proper.
I explain you what I do.
First I open single.php file and went to the line no. 49 where “Delete” word. (Which line I was delete previous). I put your code and try to wrap but delete button goes from admin also and all other roles also. See my warping code below…
Before Wrap Code (Here Delete Button Shows To All)
<div class="highlight-button"> <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><i class="fas fa-trash-alt"></i><?php _e( 'Delete', 'youzer' ); ?></a> </div>After Wrap Code (Here Delete Button Goes from All User)
<div class="highlight-button"> <?php if(current_user_can(‘manage_options’)){?> <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><i class="fas fa-trash-alt"></i><?php _e( 'Delete', 'youzer' ); ?></a> <?php }?> </div>I also add warping before div class
Before Wrap Code (Here Delete Button Shows To All)
<div class="highlight-button"> <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><i class="fas fa-trash-alt"></i><?php _e( 'Delete', 'youzer' ); ?></a> </div>After Wrap Code (Here Delete Button Goes from All User)
<?php if(current_user_can(‘manage_options’)){?> <div class="highlight-button"> <a class="button confirm" href="<?php bp_the_thread_delete_link(); ?>"><i class="fas fa-trash-alt"></i><?php _e( 'Delete', 'youzer' ); ?></a> </div> <?php }?>So, Please tell me which silly mistake I am doing ?
Before wrapping the button shows to all and after wrapping it’s hide for (gone from) all.
RegardsOctober 11, 2018 at 4:35 am #278460Anonymous User 16484011
InactiveHey !
It’s not working or I can’t do properly. Can you please see my file and make a changes to delete only administrator users only show delete private message button ?
<?php /** * BP Nouveau Messages main template. * * This template is used to inject the BuddyPress Backbone views * dealing with user's private messages. * * @since 3.0.0 * @version 3.1.0 */ ?> <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div> <div class="bp-messages-feedback"></div> <div class="bp-messages-content"></div> <script type="text/html" id="tmpl-bp-messages-feedback"> <div class="bp-feedback {{data.type}}"> <span class="bp-icon" aria-hidden="true"></span> <p>{{{data.message}}}</p> </div> </script> <?php /** * This view is used to inject hooks buffer */ ?> <script type="text/html" id="tmpl-bp-messages-hook"> {{{data.extraContent}}} </script> <script type="text/html" id="tmpl-bp-messages-form"> <?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?> <label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label> <input type="text" name="send_to" class="send-to-input" id="send-to-input" /> <label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label> <input type="text" name="subject" id="subject"/> <div id="bp-message-content"></div> <?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?> <div class="submit"> <input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/> <input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/> </div> </script> <script type="text/html" id="tmpl-bp-messages-editor"> <?php // Add a temporary filter on editor buttons add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); wp_editor( '', 'message_content', array( 'textarea_name' => 'message_content', 'teeny' => false, 'media_buttons' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => false, 'tabindex' => '3', 'textarea_rows' => 5, ) ); // Remove the temporary filter on editor buttons remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); ?> </script> <script type="text/html" id="tmpl-bp-messages-paginate"> <# if ( 1 !== data.page ) { #> <button id="bp-messages-prev-page"class="button messages-button"> <span class="dashicons dashicons-arrow-left"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span> </button> <# } #> <# if ( data.total_page !== data.page ) { #> <button id="bp-messages-next-page"class="button messages-button"> <span class="dashicons dashicons-arrow-right"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span> </button> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-filters"> <li class="user-messages-search" role="search" data-bp-search="{{data.box}}"> <div class="bp-search messages-search"> <?php bp_nouveau_message_search_form(); ?> </div> </li> <li class="user-messages-bulk-actions"></li> </script> <script type="text/html" id="tmpl-bp-bulk-actions"> <input type="checkbox" id="user_messages_select_all" value="1"/> <label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label> <div class="bulk-actions-wrap bp-hide"> <div class="bulk-actions select-wrap"> <label for="user-messages-bulk-actions" class="bp-screen-reader-text"> <?php esc_html_e( 'Select bulk action', 'buddypress' ); ?> </label> <select id="user-messages-bulk-actions"> <# for ( i in data ) { #> <option value="{{data[i].value}}">{{data[i].label}}</option> <# } #> </select> <span class="select-arrow" aria-hidden="true"></span> </div> <button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>"> <span class="dashicons dashicons-yes" aria-hidden="true"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span> </button> </div> </script> <script type="text/html" id="tmpl-bp-messages-thread"> <div class="thread-cb"> <input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}"> <label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label> </div> <# if ( ! data.recipientsCount ) { #> <div class="thread-from"> <a class="user-link" href="{{data.sender_link}}"> <img class="avatar" src="{{data.sender_avatar}}" alt="" /> <span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span> <span class="user-name">{{data.sender_name}}</span> </a> </div> <# } else { var recipient = _.first( data.recipients ); #> <div class="thread-to"> <a class="user-link" href="{{recipient.user_link}}"> <img class="avatar" src="{{recipient.avatar}}" alt="" /> <span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span> <span class="user-name">{{recipient.user_name}}</span> </a> <# if ( data.toOthers ) { #> <span class="num-recipients">{{data.toOthers}}</span> <# } #> </div> <# } #> <div class="thread-content" data-thread-id="{{data.id}}"> <div class="thread-subject"> <span class="thread-count">({{data.count}})</span> <a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a> </div> <p class="excerpt">{{data.excerpt}}</p> </div> <div class="thread-date"> <time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time> </div> </script> <script type="text/html" id="tmpl-bp-messages-preview"> <# if ( undefined !== data.content ) { #> <h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2> <div class="preview-content"> <header class="preview-pane-header"> <# if ( undefined !== data.recipients ) { #> <dl class="thread-participants"> <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> <dd> <ul class="participants-list"> <# for ( i in data.recipients ) { #> <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li> <# } #> </ul> </dd> </dl> <# } #> <div class="actions"> <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> </button> <# if ( undefined !== data.star_link ) { #> <# if ( false !== data.is_starred ) { #> <a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span> </a> <# } else { #> <a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span> </a> <# } #> <# } #> <a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span> </a> <# if ( data.threadOptions ) { #> <span class="bp-messages-hook thread-options"> {{{data.threadOptions}}} </span> <# } #> </div> </header> <div class='preview-message'> {{{data.content}}} </div> <# if ( data.inboxListItem ) { #> <table class="bp-messages-hook inbox-list-item"> <tbody> <tr>{{{data.inboxListItem}}}</tr> </tbody> </table> <# } #> </div> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-single-header"> <h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2> <header class="single-message-thread-header"> <# if ( undefined !== data.recipients ) { #> <dl class="thread-participants"> <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> <dd> <ul class="participants-list"> <# for ( i in data.recipients ) { #> <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li> <# } #> </ul> </dd> </dl> <# } #> <?php if(current_user_can('manage_options')){ ?> <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> </button> <?php }?> </div> </header> </script> <script type="text/html" id="tmpl-bp-messages-single-list"> <div class="message-metadata"> <# if ( data.beforeMeta ) { #> <div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div> <# } #> <a href="{{data.sender_link}}" class="user-link"> <img class="avatar" src="{{data.sender_avatar}}" alt="" /> <strong>{{data.sender_name}}</strong> </a> <time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time> <div class="actions"> <# if ( undefined !== data.star_link ) { #> <button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span> </button> <button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span> </button> <# } #> </div> <# if ( data.afterMeta ) { #> <div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div> <# } #> </div> <# if ( data.beforeContent ) { #> <div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div> <# } #> <div class="message-content">{{{data.content}}}</div> <# if ( data.afterContent ) { #> <div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-single"> <?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?> <div id="bp-message-thread-header" class="message-thread-header"></div> <?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?> <ul id="bp-message-thread-list"></ul> <?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?> <?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?> <form id="send-reply" class="standard-form send-reply"> <div class="message-box"> <div class="message-metadata"> <?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?> <div class="avatar-box"> <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?> <strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong> </div> <?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?> </div><!-- .message-metadata --> <div class="message-content"> <?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?> <label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label> <div id="bp-message-content"></div> <?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?> <div class="submit"> <input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/> </div> </div><!-- .message-content --> </div><!-- .message-box --> </form> <?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?> <?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?> </script>Thanks
October 10, 2018 at 6:59 am #278424Anonymous User 16484011
InactiveHi ! Prashant !
Thanks for your time. But I am zero in buddypress & coding. So, As per your path I find the index file but I can’t get where can I use your above code and where can I add role name administrator ? I put my file here ! Can you please edit it for me ?
<?php /** * BP Nouveau Messages main template. * * This template is used to inject the BuddyPress Backbone views * dealing with user's private messages. * * @since 3.0.0 * @version 3.1.0 */ ?> <div class="subnav-filters filters user-subnav bp-messages-filters" id="subsubnav"></div> <div class="bp-messages-feedback"></div> <div class="bp-messages-content"></div> <script type="text/html" id="tmpl-bp-messages-feedback"> <div class="bp-feedback {{data.type}}"> <span class="bp-icon" aria-hidden="true"></span> <p>{{{data.message}}}</p> </div> </script> <?php /** * This view is used to inject hooks buffer */ ?> <script type="text/html" id="tmpl-bp-messages-hook"> {{{data.extraContent}}} </script> <script type="text/html" id="tmpl-bp-messages-form"> <?php bp_nouveau_messages_hook( 'before', 'compose_content' ); ?> <label for="send-to-input"><?php esc_html_e( 'Send @Username', 'buddypress' ); ?></label> <input type="text" name="send_to" class="send-to-input" id="send-to-input" /> <label for="subject"><?php _e( 'Subject', 'buddypress' ); ?></label> <input type="text" name="subject" id="subject"/> <div id="bp-message-content"></div> <?php bp_nouveau_messages_hook( 'after', 'compose_content' ); ?> <div class="submit"> <input type="button" id="bp-messages-send" class="button bp-primary-action" value="<?php echo esc_attr_x( 'Send', 'button', 'buddypress' ); ?>"/> <input type="button" id="bp-messages-reset" class="text-button small bp-secondary-action" value="<?php echo esc_attr_x( 'Reset', 'form reset button', 'buddypress' ); ?>"/> </div> </script> <script type="text/html" id="tmpl-bp-messages-editor"> <?php // Add a temporary filter on editor buttons add_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); wp_editor( '', 'message_content', array( 'textarea_name' => 'message_content', 'teeny' => false, 'media_buttons' => false, 'dfw' => false, 'tinymce' => true, 'quicktags' => false, 'tabindex' => '3', 'textarea_rows' => 5, ) ); // Remove the temporary filter on editor buttons remove_filter( 'mce_buttons', 'bp_nouveau_messages_mce_buttons', 10, 1 ); ?> </script> <script type="text/html" id="tmpl-bp-messages-paginate"> <# if ( 1 !== data.page ) { #> <button id="bp-messages-prev-page"class="button messages-button"> <span class="dashicons dashicons-arrow-left"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Previous page', 'link', 'buddypress' ); ?></span> </button> <# } #> <# if ( data.total_page !== data.page ) { #> <button id="bp-messages-next-page"class="button messages-button"> <span class="dashicons dashicons-arrow-right"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Next page', 'link', 'buddypress' ); ?></span> </button> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-filters"> <li class="user-messages-search" role="search" data-bp-search="{{data.box}}"> <div class="bp-search messages-search"> <?php bp_nouveau_message_search_form(); ?> </div> </li> <li class="user-messages-bulk-actions"></li> </script> <script type="text/html" id="tmpl-bp-bulk-actions"> <input type="checkbox" id="user_messages_select_all" value="1"/> <label for="user_messages_select_all"><?php esc_html_e( 'All Messages', 'buddypress' ); ?></label> <div class="bulk-actions-wrap bp-hide"> <div class="bulk-actions select-wrap"> <label for="user-messages-bulk-actions" class="bp-screen-reader-text"> <?php esc_html_e( 'Select bulk action', 'buddypress' ); ?> </label> <select id="user-messages-bulk-actions"> <# for ( i in data ) { #> <option value="{{data[i].value}}">{{data[i].label}}</option> <# } #> </select> <span class="select-arrow" aria-hidden="true"></span> </div> <button class="messages-button bulk-apply bp-tooltip" type="submit" data-bp-tooltip="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>"> <span class="dashicons dashicons-yes" aria-hidden="true"></span> <span class="bp-screen-reader-text"><?php echo esc_html_x( 'Apply', 'button', 'buddypress' ); ?></span> </button> </div> </script> <script type="text/html" id="tmpl-bp-messages-thread"> <div class="thread-cb"> <input class="message-check" type="checkbox" name="message_ids[]" id="bp-message-thread-{{data.id}}" value="{{data.id}}"> <label for="bp-message-thread-{{data.id}}" class="bp-screen-reader-text"><?php esc_html_e( 'Select message:', 'buddypress' ); ?> {{data.subject}}</label> </div> <# if ( ! data.recipientsCount ) { #> <div class="thread-from"> <a class="user-link" href="{{data.sender_link}}"> <img class="avatar" src="{{data.sender_avatar}}" alt="" /> <span class="bp-screen-reader-text"><?php esc_html_e( 'From:', 'buddypress' ); ?></span> <span class="user-name">{{data.sender_name}}</span> </a> </div> <# } else { var recipient = _.first( data.recipients ); #> <div class="thread-to"> <a class="user-link" href="{{recipient.user_link}}"> <img class="avatar" src="{{recipient.avatar}}" alt="" /> <span class="bp-screen-reader-text"><?php esc_html_e( 'To:', 'buddypress' ); ?></span> <span class="user-name">{{recipient.user_name}}</span> </a> <# if ( data.toOthers ) { #> <span class="num-recipients">{{data.toOthers}}</span> <# } #> </div> <# } #> <div class="thread-content" data-thread-id="{{data.id}}"> <div class="thread-subject"> <span class="thread-count">({{data.count}})</span> <a class="subject" href="../view/{{data.id}}/">{{data.subject}}</a> </div> <p class="excerpt">{{data.excerpt}}</p> </div> <div class="thread-date"> <time datetime="{{data.date.toISOString()}}">{{data.display_date}}</time> </div> </script> <script type="text/html" id="tmpl-bp-messages-preview"> <# if ( undefined !== data.content ) { #> <h2 class="message-title preview-thread-title"><?php esc_html_e( 'Active conversation:', 'buddypress' ); ?><span class="messages-title">{{{data.subject}}}</span></h2> <div class="preview-content"> <header class="preview-pane-header"> <# if ( undefined !== data.recipients ) { #> <dl class="thread-participants"> <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> <dd> <ul class="participants-list"> <# for ( i in data.recipients ) { #> <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li> <# } #> </ul> </dd> </dl> <# } #> <div class="actions"> <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> </button> <# if ( undefined !== data.star_link ) { #> <# if ( false !== data.is_starred ) { #> <a role="button" class="message-action-unstar bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="unstar" aria-pressed="true" data-bp-tooltip="<?php esc_attr_e( 'Unstar Conversation', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Conversation', 'buddypress' ); ?></span> </a> <# } else { #> <a role="button" class="message-action-star bp-tooltip bp-icons" href="{{data.star_link}}" data-bp-action="star" aria-pressed="false" data-bp-tooltip="<?php esc_attr_e( 'Star Conversation', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Conversation', 'buddypress' ); ?></span> </a> <# } #> <# } #> <a href="../view/{{data.id}}/" class="message-action-view bp-tooltip bp-icons" data-bp-action="view" data-bp-tooltip="<?php esc_attr_e( 'View full conversation and reply.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'View full conversation and reply.', 'buddypress' ); ?></span> </a> <# if ( data.threadOptions ) { #> <span class="bp-messages-hook thread-options"> {{{data.threadOptions}}} </span> <# } #> </div> </header> <div class='preview-message'> {{{data.content}}} </div> <# if ( data.inboxListItem ) { #> <table class="bp-messages-hook inbox-list-item"> <tbody> <tr>{{{data.inboxListItem}}}</tr> </tbody> </table> <# } #> </div> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-single-header"> <h2 id="message-subject" class="message-title single-thread-title">{{{data.subject}}}</h2> <header class="single-message-thread-header"> <# if ( undefined !== data.recipients ) { #> <dl class="thread-participants"> <dt><?php esc_html_e( 'Participants:', 'buddypress' ); ?></dt> <dd> <ul class="participants-list"> <# for ( i in data.recipients ) { #> <li><a href="{{data.recipients[i].user_link}}" class="bp-tooltip" data-bp-tooltip="{{data.recipients[i].user_name}}"><img class="avatar mini" src="{{data.recipients[i].avatar}}" alt="{{data.recipients[i].user_name}}" /></a></li> <# } #> </ul> </dd> </dl> <# } #> <div class="actions"> <button type="button" class="message-action-delete bp-tooltip bp-icons" data-bp-action="delete" data-bp-tooltip="<?php esc_attr_e( 'Delete conversation.', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Delete conversation.', 'buddypress' ); ?></span> </button> </div> </header> </script> <script type="text/html" id="tmpl-bp-messages-single-list"> <div class="message-metadata"> <# if ( data.beforeMeta ) { #> <div class="bp-messages-hook before-message-meta">{{{data.beforeMeta}}}</div> <# } #> <a href="{{data.sender_link}}" class="user-link"> <img class="avatar" src="{{data.sender_avatar}}" alt="" /> <strong>{{data.sender_name}}</strong> </a> <time datetime="{{data.date.toISOString()}}" class="activity">{{data.display_date}}</time> <div class="actions"> <# if ( undefined !== data.star_link ) { #> <button type="button" class="message-action-unstar bp-tooltip bp-icons <# if ( false === data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="unstar" data-bp-tooltip="<?php esc_attr_e( 'Unstar Message', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Unstar Message', 'buddypress' ); ?></span> </button> <button type="button" class="message-action-star bp-tooltip bp-icons <# if ( false !== data.is_starred ) { #>bp-hide<# } #>" data-bp-star-link="{{data.star_link}}" data-bp-action="star" data-bp-tooltip="<?php esc_attr_e( 'Star Message', 'buddypress' ); ?>"> <span class="bp-screen-reader-text"><?php esc_html_e( 'Star Message', 'buddypress' ); ?></span> </button> <# } #> </div> <# if ( data.afterMeta ) { #> <div class="bp-messages-hook after-message-meta">{{{data.afterMeta}}}</div> <# } #> </div> <# if ( data.beforeContent ) { #> <div class="bp-messages-hook before-message-content">{{{data.beforeContent}}}</div> <# } #> <div class="message-content">{{{data.content}}}</div> <# if ( data.afterContent ) { #> <div class="bp-messages-hook after-message-content">{{{data.afterContent}}}</div> <# } #> </script> <script type="text/html" id="tmpl-bp-messages-single"> <?php bp_nouveau_messages_hook( 'before', 'thread_content' ); ?> <div id="bp-message-thread-header" class="message-thread-header"></div> <?php bp_nouveau_messages_hook( 'before', 'thread_list' ); ?> <ul id="bp-message-thread-list"></ul> <?php bp_nouveau_messages_hook( 'after', 'thread_list' ); ?> <?php bp_nouveau_messages_hook( 'before', 'thread_reply' ); ?> <form id="send-reply" class="standard-form send-reply"> <div class="message-box"> <div class="message-metadata"> <?php bp_nouveau_messages_hook( 'before', 'reply_meta' ); ?> <div class="avatar-box"> <?php bp_loggedin_user_avatar( 'type=thumb&height=30&width=30' ); ?> <strong><?php esc_html_e( 'Send a Reply', 'buddypress' ); ?></strong> </div> <?php bp_nouveau_messages_hook( 'after', 'reply_meta' ); ?> </div><!-- .message-metadata --> <div class="message-content"> <?php bp_nouveau_messages_hook( 'before', 'reply_box' ); ?> <label for="message_content" class="bp-screen-reader-text"><?php _e( 'Reply to Message', 'buddypress' ); ?></label> <div id="bp-message-content"></div> <?php bp_nouveau_messages_hook( 'after', 'reply_box' ); ?> <div class="submit"> <input type="submit" name="send" value="<?php echo esc_attr_x( 'Send Reply', 'button', 'buddypress' ); ?>" id="send_reply_button"/> </div> </div><!-- .message-content --> </div><!-- .message-box --> </form> <?php bp_nouveau_messages_hook( 'after', 'thread_reply' ); ?> <?php bp_nouveau_messages_hook( 'after', 'thread_content' ); ?> </script>Thanks
October 2, 2018 at 2:30 pm #276921Topic: Hide Account from Member Directory
in forum How-to & Troubleshootingslash75
ParticipantI want to prevent several accounts from displaying in the Members Directory.
Ex. AdministratorsIs t his possible?
-
AuthorSearch Results