Opened 12 years ago
Closed 8 years ago
#4638 closed enhancement (fixed)
Change title in directory_dummy_post() and create_dummy_post()
Reported by: | rogercoathup | Owned by: | |
---|---|---|---|
Milestone: | 2.2 | Priority: | normal |
Severity: | normal | Version: | 1.7 |
Component: | Templates | Keywords: | |
Cc: |
Description
The functions for generating group / member directory titles insert a 'create' button with no easy way to remove it.
- It's poor non semantic markup -- the create button isn't semantically part of the title, so shouldn't be included in there and marked up as part of the h1
- There's no straightforward way to change the title that's being auto generated -- at the very least it should be filterable
Change History (9)
#1
@
12 years ago
- Component changed from Core to Theme
- Milestone changed from Awaiting Review to 1.7
#2
follow-up:
↓ 3
@
12 years ago
A) Agreed.
For bp-legacy, I'd like to get rid of using absolute positioning for the search bar and make it more like Turtleshell's.
Perhaps right after the page title, we can do something like this:
Find groups and interact with like-minded people over a common topic. Or create a new group. [ LONGER SEARCH BAR ](search) [Create a group]
B) For non-dynamic page titles, I think we can use the WP page title as set in the WP pages menu. Dynamic page titles like the registration and activation pages should continue to use language files.
Roger, a WordPress filter is available to override any localization text - 'gettext' - if you need to use it. If you decide to go this route, use the filter only on the page you're going to be using it on.
#3
in reply to:
↑ 2
@
12 years ago
Replying to r-a-y:
A) Agreed.
For bp-legacy, I'd like to get rid of using absolute positioning for the search bar and make it more like Turtleshell's.
For those (like me) who were wondering what 'Turtleshell' is: https://github.com/paulgibbs/turtleshell
:-)
#4
@
12 years ago
- Milestone changed from 1.7 to 1.8
I agree this isn't great, but it's an easy way to ensure all themes have the links they need. Without a patch, I'm punting this to 1.8. If something comes in, feel free to move it back to 1.7.
#5
@
11 years ago
- Milestone changed from 1.8 to Future Release
Moving to Future Release, pending better suggestions for a general solution.
#6
@
11 years ago
Hi,
I added the following code in the theme functions file to remove the button:
function override_directory_dummy_post(){ // Title based on ability to create groups if ( is_user_logged_in() && bp_user_can_create_groups() ) { $title = __( 'Groups', 'buddypress' ); } else { $title = __( 'Groups', 'buddypress' ); } bp_theme_compat_reset_post( array( 'ID' => 0, 'post_title' => $title, 'post_author' => 0, 'post_date' => 0, 'post_content' => '', 'post_type' => 'bp_group', 'post_status' => 'publish', 'is_archive' => true, 'comment_status' => 'closed' ) ); } add_action( 'bp_template_include_reset_dummy_post_data', 'override_directory_dummy_post', 11 );
I agree the page title shouldn't be forced to have a button link. That should be done in the theme templates.