Skip to:

Opened 3 years ago

Closed 3 years ago

#8470 closed enhancement (fixed)

Improve BP Directory Pages Administration parts

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 10.0.0 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch

Description (last modified by imath)

First, I believe we shouldn't add the "View" links of the Registration and Activation pages as there are redirected to home when the user is logged in, which is the case there. In the screen capture below, links are removed and some information is output to explain you need to log out to view these pages.

Update: the above part now lives in #8475

Second, I also believe we should inform Admins some WordPress pages are used by BuddyPress the way WordPress does it for home page, blog page, and privacy page. See screen captures below.

Edit pages screen:

Edit Menus screen

Customize Edit Menu section

Attachments (3)

8470.patch (13.4 KB) - added by imath 3 years ago.
8470.2.patch (7.9 KB) - added by imath 3 years ago.
8470.3.patch (625 bytes) - added by imath 3 years ago.

Download all attachments as: .zip

Change History (12)

3 years ago

This ticket was mentioned in Slack in #buddypress by imath. View the logs.

3 years ago

#2 @imath
3 years ago

  • Description modified (diff)

3 years ago

#3 @imath
3 years ago

  • Component changed from Core to Administration
  • Milestone changed from 8.0.0 to Up Next

I just created #8475 to deal with Registration and Activation links. 8470.2.patch is now only dealing with post states.

#4 @imath
3 years ago

  • Milestone changed from Up Next to 10.0.0

Let's try to progress on it during 10.0.0 dev cycle.

#5 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13123:

Admin: improve information about WP pages being used as BP directories

We are now using BuddyPress specific post states to inform a WordPress page is used as the BP Component's directory page. This information is displayed into the WP Admin Pages edit screen, for menu items linking to a BP Directory into the WP Admin Menu screen as well as into the Customizer Menu section.

Fixes #8470

#6 @Offereins
3 years ago

This is a great addition for understanding WP's page directory and the links to BP.

@imath One question concerning the new code: is there a reason why the $post parameter is not available in apply_filters( 'bp_' . $this->id . '_admin_directory_states', $states );?

Since the filter will run for all posts, it is missing relevant context as to when it is triggered. Alternatively, the if ( $this->has_directory ) { check could contain an additional check for $post being the actual directory page as well, so the filter will only be called for the relevant page.

#7 @imath
3 years ago

  • Keywords needs-patch added; has-patch removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Thanks for your feedback @Offereins

No problem to add the $post parameter to the filter 👌.

The method you're referring to is overridden by components ones where the check for $post being the actual directory page is already made. The $this->has_directory could be done into these methods as well, but I've put it into the parent method to avoid too much code duplication. Each components method is using the parent method to use this check and the filter.

3 years ago

#8 @imath
3 years ago

  • Keywords has-patch added; needs-patch removed

The $post parameter added to the filter > 8470.3.patch

#9 @imath
3 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 13124:

Improve "bp_{$this->id}_admin_directory_states" filter's context

Include the $post parameter as the second parameter of this filter.

Props Offereins

Fixes #8470

Note: See TracTickets for help on using tickets.