Forum Replies Created
-
Hi,
You can use the code from buddydev. You just have to change one single thing
<?php //filter on pre_user_query add_action( 'pre_user_query', 'devb_exclude_loggedin_user', 201 ); function devb_exclude_loggedin_user( $query ) { // code below we do not need //don't modify the query if the user is not logged in // if ( !is_user_logged_in() ) // return; //do not hide users inside the admin if ( is_admin() && !defined('DOING_AJAX') ) return; $qv = $query->query_vars; global $wpdb; //hide little change at the end of the query.I changed it to user_id : 1 // but userID can be anything. I chose 1 because that is my admin user_id $query->query_where .= $wpdb->prepare(" AND {$wpdb->users}.ID !=%d ", 1 ); } ?>
confirmed. it works.
On a side note. When I change the password of a user on the admin side of WP, it doesn’t make use of bp_email? How can I make use of bp_email and the nice format when changing emails?
Anyway, thanks a bunch ! 🙂
I also try to play a bit with available filters, the one below is also not working.
add_filter( 'bp_email_set_from', 'mijnmeel1',10,4); function mijnmeel1( $from, $email_address, $name, $this ) { dd($from); // dd = kint debugger }
p.s.
I am using these functions in my own plugin.I am running :
PHP 5.5.9-1ubuntu4.14 (cli)
The function is not called at all. I tried to change add_action into add_filter, also that didn’t do anything.
Hi Danbp,
Hookr.io WAUW thats a goldmine ! many thanks for that link 🙂
Regarding the 2nd url, thats not what I am after. It brings me a bit closer to my goal though.
Anyway, thanks a bunch Danbp, especially for hookr 🙂
Reds,
J
seriously, there is no other way? 🙁 I was hoping to find a plugin that would allow me to create a welcome page after registration
I suspected I needed a plugin but wasn’t sure. thanks 🙂
Thanks so far.
I am using latest version of WordPress and Latest of Buddypress
Lets forget about css for now, I think I need to redo how activity stream is generating the html. If I want to get done as in my example (1st post) then I need to generate my own HTML. I am considering writing my own plugin to make it do what I want..
What buddypress filter can I use to adjust the html below?
<div class="activity-inner"> <p>Si quicquam extra virtutem habeatur in bonis. Qua ex cognitione facilior facta est investigatio rerum occultissimarum. Tum ille timide vel potius verecunde: Facio, inquit.</p> <p>Videmus igitur ut conquiescere ne […]<img src="http://somewebsite/wannabe/wordpress/wp-content/uploads/2015/07/Unknown.jpg"></p> </div>
Am I the only one with this question?? 🙂
Did anyone give it a try to program an extensive role / membership based API for BP? Perhaps this should be a BP core ‘thingy’.
Its a bit frustrating now that once a plugin is installed and made available, it is available for all registered users, unless the plugin comes with its own way to restrict its usage.
Thanks danbp, it looks like a solution. But what happens when BP is updated?
I am not very well versed in WP and BP hooks and etc. But can that piece of code be put in a plugin instead of changing php files?
rgds,
W.