[buddypress-trac] [BuddyPress Trac] #8362: View buttons can be incorrectly visible on Pages settings

buddypress-trac noreply at wordpress.org
Fri Sep 11 19:32:20 UTC 2020


#8362: View buttons can be incorrectly visible on Pages settings
-----------------------------+------------------------------
 Reporter:  johnjamesjacoby  |       Owner:  johnjamesjacoby
     Type:  defect (bug)     |      Status:  assigned
 Priority:  normal           |   Milestone:  7.0.0
Component:  Settings         |     Version:  2.0
 Severity:  minor            |  Resolution:
 Keywords:  has-patch        |
-----------------------------+------------------------------

Comment (by johnjamesjacoby):

 1.patch adds a `get_post()` check to the condition that decides whether to
 show the "View" button. This function call will usually come at no
 additional cost, because `wp_dropdown_pages()` will have already cached
 those IDs.

 A more complex approach to avoiding cache misses would involve a change to
 `bp_core_get_directory_page_ids()` instead, to use `get_blog_post()` (or
 some BuddyPress abstraction) to remove missing pages from its results.

 I kinda think both changes would be good ones, but I think it's OK to make
 sure the UI is correct first and determine if a deeper change can be done
 without breaking anything else later.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8362#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list