Forum Replies Created
-
In reply to: bbp_reply_admin_links
By not working i mean it not replaces original <span class=”bbp-admin-links”></span> to <div class=”list”></div> To make sure its not a glitch of my theme I’ve installed a fresh copy of WP and BP on local drive, but nothing has changed.
In reply to: bbp_reply_admin_linksNot working :[
Just my curiosity, but why html markup is included in code? I worked in past with DLE engine and all markup was purely inside of template.
In reply to: bbp_reply_admin_linkshm, it crashes site, appears just a blank page
In reply to: bbp_reply_admin_linksthanks for your input, but it still not working. :<
In reply to: bbp_reply_admin_linksThanks a lot, it works now! I’ve removed “class=”bbp-author-” and rest of the code doesn’t display so its suits perfectly for me.
Now I trying to change args of bbp_get_reply_admin_links (stored in bbpress/includes/replies/template.php)
Thats my hook
function hw_get_reply_admin_links ($args) { $args = array ( 'before' => '<div class="list">', 'after' => '</div>', ); return $args; } add_filter ('bbp_get_reply_admin_links', 'hw_get_reply_admin_links' );
What’s wrong here?
In reply to: bbp_reply_admin_linksAny idea how to do this please?
In reply to: bbp_reply_admin_linksOh, code located in /includes/replies/template.php, line 1241
In reply to: bbp_reply_admin_linksTho still trying to figure out how to replace default classes.
Code in BBpress:
// Link class $link_class = ' class="bbp-author-' . esc_attr( $r['type'] ) . '"'; // Add links if not anonymous and existing user if ( empty( $anonymous ) && bbp_user_has_profile( bbp_get_reply_author_id( $reply_id ) ) ) { // Assemble the links foreach ( $author_links as $link => $link_text ) { $link_class = ' class="bbp-author-' . $link . '"'; $author_link[] = sprintf( '<a href="%1$s"%2$s%3$s>%4$s</a>', esc_url( $author_url ), $link_title, $link_class, $link_text ); }
Hook:
function hw_get_reply_author_link($link_class) { $link_class = preg_replace('/ class="bbp-author-"/','/ class="myclass" /',$link_class); return $link_class; } add_filter('bbp_get_reply_author_link','hw_get_reply_author_link');
Cant make this work. Well output itself works as should, but it doesn’t replace bbp-author- to myclass. Can you tell me what’s wrong with it?
In reply to: bbp_reply_admin_linksNvm, got solution:
<?php bbp_reply_author_link( array( 'sep' => '', 'show_role' => false, 'type' => 'name' ) ); ?>
and
<?php bbp_reply_author_link( array( 'sep' => '', 'show_role' => true, 'type' => 'avatar' ) ); ?>
In reply to: bbp_reply_admin_linksThanks for the link, it explains. But can you tell me at least approximate way to call separately avatar and username by this function bbp_reply_author_link? It will help alot
In reply to: bbp_reply_admin_linksI’ve tried at least to change
<span>
like in your example, but it doesn’t work. Aswell tried to pull this out in this way:add_filter ('bbp_reply_admin_links', 'theredeclipse_change' ) ; function theredeclipse_change ($retval, $r) { $r = bbp_parse_args( $args, array( 'before' => '<span class="bbp-admin-links">', 'after' => '</span>', ), 'get_reply_admin_links' ); return $retval ; }
And several attempts more, but nothing happens :[
In reply to: bbp_reply_admin_linksDefault output looks like
<span class="bbp-admin-links"> // inside different classes of links </span>
I would like change it to
<a class="button"></a>
So I want to delete span from output and use one style for each<a>
link, if its possible.And the thing is – I could do it by modifying forum files, but after update it will be overwritten. So I want to use bbpress functions php file to change output, but I don’t know how. I hope I’ve explained it well 😛