[buddypress-trac] [BuddyPress Trac] #9052: Duplicate "page on front" option values when BP Classic Add-on is activated

buddypress-trac noreply at wordpress.org
Mon Jan 1 20:57:47 UTC 2024


#9052: Duplicate "page on front" option values when BP Classic Add-on is activated
---------------------------------------+---------------------
 Reporter:  emaralive                  |       Owner:  (none)
     Type:  defect (bug)               |      Status:  new
 Priority:  normal                     |   Milestone:  12.1.0
Component:  Core                       |     Version:  12.0.0
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch has-screenshots  |
---------------------------------------+---------------------

Comment (by emaralive):

 @imath
 > 1. I wonder if this filter should be removed from the BP Classic plugin
 instead.
 I'm chuckling (at myself)  because this was my initial thought, I had
 modified the function **{{{bp_classic_use_legacy_parser}}}** (**bp-
 classic/inc/core/filters.php**) to remove the filter but then opted not to
 do that because it would cause a new release of the BP Classic plugin and
 since there is going to be a 12.1.0 release of BuddyPress, try and to it
 there/here instead. Although, you would probably do it at some other place
 in the BP Classic plugin.

 > 2. If we need to do it from BuddyPress Core, I would only filter
 `get_pages` if the URL Parser is set to `rewrites` instead of adding a new
 filter to remove another one.

 I'm struggling with this option, not sure how I would do this since the
 'get_pages' filter is added before the function
 **{{{bp_core_get_query_parser}}}** is defined, e.g., **{{{add_filter(
 'get_pages', 'bp_core_include_directory_on_front', 10, 2 );}}}** is
 **found on line 1017 of bp-core/bp-core-filters.php**. But then, I'm most
 likely, not seeing what you are seeing; IOW, it's not that obvious to me
 (not grasping what you have conveyed).

 Now as a **counter-offer**, I can see how I could modify the conditional
 (**checks if the "legacy' parser is in use**) to remove the "get_pages"
 filter within the function **{{{bp_core_setup_query_parser}}}** **found on
 line 89 of bp-core/bp-core-actions.php**.

 Other than that, you will have to enlighten me as to your 2nd option or if
 need be I'm OK with you applying a remedy of your own discretion because
 this is still a learning experience for me.

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


More information about the buddypress-trac mailing list