Search Results for '+.+default+.+'
-
Search Results
-
Topic: How to escape html?
Hi bbpress
I want to escape html in topic and reply output, but I want to Embede media.
REPLACED this code which you can find inside[bbpress/templates/default/bbpress/content-single-topic-lead.php] file, opening via the editor.
<?php bbp_topic_content(); ?>
WITH THIS CODE<?php global $wp_embed; $inputTxt = bbp_get_topic_content(); $escTxt = esc_html( $inputTxt ); echo '<div class="test">'.$wp_embed->run_shortcode( '[embed]' . $escTxt . '[/embed]' ).'</div>'; ?>
But I can not it.
How do I write it?
Hi all,
I’m trying to integrate the BuddyPress favorite (aka like system) system with BBPress.
But I can not implement ajax and the page will be reloaded.
How do I write it?
▼【functions.php】
function my_bp_activity_is_favorite($activity_id) { global $bp, $activities_template; return apply_filters( 'bp_get_activity_is_favorite', in_array( $activity_id, (array)$activities_template->my_favs ) ); } function my_bp_activity_favorite_link($activity_id) { global $activities_template; echo apply_filters( 'bp_get_activity_favorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/favorite/' . $activity_id . '/' ), 'mark_favorite' ) ); } function my_bp_activity_unfavorite_link($activity_id) { global $activities_template; echo apply_filters( 'bp_get_activity_unfavorite_link', wp_nonce_url( site_url( BP_ACTIVITY_SLUG . '/unfavorite/' . $activity_id . '/' ), 'unmark_favorite' ) ); }
▼【bbPress/templates/default/bbpress/loop-single.php】
<div id="post-<?php bbp_reply_id(); ?>" class="bbp-reply-header"> <!--omission--> <div class="favorite-wrap"> <?php $activity_id = get_post_meta( bbp_get_reply_id( $reply_id ), '_bbp_activity_id', true ); ?> <?php if ( is_user_logged_in() ) : ?> <?php bp_has_activities(); ?> <?php if ( !my_bp_activity_is_favorite($activity_id) ) : ?> <a href="<?php my_bp_activity_favorite_link($activity_id) ?>" class="button fav bp-secondary-action bp-tooltip" data-bp-tooltip="add" aria-pressed="false"> <span class="bp-screen-reader-text">add</span> </a> <?php else : ?> <a href="<?php my_bp_activity_unfavorite_link($activity_id) ?>" class="button unfav bp-secondary-action bp-tooltip" data-bp-tooltip="remove" aria-pressed="false"> <span class="bp-screen-reader-text">remove</span> </a> <?php endif; ?> <?php endif;?> </div> <!--omission--> </div><!-- #post-<?php bbp_reply_id(); ?> -->
Help for figuring this one out is appreciated.
Best regardsTopic: Breadcrumbs problems
Hi. I am building my Online School and I installed bbpress to have a forum. I can’t give you a link now, because my website has coming soon mode active.
I have a problem with breadcrumbs. First of all, they don’t show as I see them in others’ forums. They don’t show at all. I have enabled Page Title Bar to show breadcrumbs, but this is an option from my theme (I use Avada theme). This helped me to show breadcrumbs in the page title bar, but I would prefer to see default breadcrumbs from bbpress just above the forum.Another problem is that when I click on “Home” it takes me to my homepage, not to the Forum homepage, but this is understandable, since the breadcrums come from my theme, not from the bbpress.
Why I can’t see that simple forum breadcumb trail just above the forum?
Good day. I want to add new notification type in my site – Updated the status of the task I have assigned to the user (for example, the task completed). But by default, this function is not. How to do this?
Version WP and BP last.
I’m surprised no one has asked such a question before… Please, help me.
Hello. I’d be grateful for some advice please.
Is it possible to change the number of forums per ‘page’ from the default 50?
I appreciate the argument for better categorisation, but the situation I have is a parent category relating to prison establishments and within that category are 104 separate forums – one for each prison establishment, so there’s no scope for categorising any differently.
As my site stands, when visiting the prison establishments page, only the first 50 forums are listed, with no pagination etc. linking to the hidden forums.
Thanks for your time.
Ash