Skip to:
Content

bbPress.org

Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#2871 closed defect (bug) (fixed)

WP_Hook

Reported by: netweb Owned by: netweb
Priority: normal Milestone: 2.6
Component: API - Actions/Filters Version: trunk
Severity: normal Keywords:
Cc:

Description

Via #WP17817

WordPress 4.5 introduces a significant reworking of action and filter iteration to address bugs that arose from recursive callbacks and from callbacks that changed the hooked callbacks on currently running actions/filters.


This will soon arrive in 4.4 /trunk to assess the extent of any potential damage


The purpose of this ticket is to patch bbPress 2.x in advance of this change being deployed to .org properties as outlined by Nacin in #WP17817#comment:169:

  1. We need some kind of fix or workaround (somewhere -- .org, core, or bb's) to avoid .org breakage.


Attached patch is courtesy of @jbrinley via #WP17817#comment:158

We will need to patch, test, deploy, and make this available for the following known bbPress 2.x forums on .org:

Attachments (1)

2871.diff (1.5 KB ) - added by netweb 11 years ago.

Download all attachments as: .zip

Change History (7)

@netweb
11 years ago

#1 @tharsheblows
11 years ago

This works for me. It's been applied to BuddyPress buddypress:changeset:10279 and is working fine too (which I'm sure you know, that's just for completeness :) )

#2 @netweb
11 years ago

  • Owner set to netweb
  • Resolutionfixed
  • Status newclosed

In 5944:

Core: Support for WP_Hook in bbp_get_template_stack()

The proposed WP_Hook #WP17817 breaks backward compatibility for plugins that
attempt to manipulate $wp_filter in certain ways. For bbPress, it means
that we cannot directly modify the callbacks that are currently registered as
an array at $wp_filter[ $tag ], in bbp_get_template_stack(). Instead, when
WP_Hook is not available, we assign the callbacks to a variable (leveraging
WP_Hook's ArrayAccess) and manipulate the variable.

Props jbrinley. Fixes #2871

#3 @netweb
11 years ago

  • Keywords needs-testing 2nd-opinion removed
  • Milestone Under Consideration2.6

#4 @netweb
11 years ago

In 5945:

Core: Restore empty $wp_filter[ $tag ] check and update PHPDoc in bbp_get_template_stack()

See #2871

#5 @johnjamesjacoby
10 years ago

In 6119:

Theme Compat: Support WP_Hook class in 2.5 branch.

See #2871, r5945.

#6 @netweb
10 years ago

#3016 was marked as a duplicate.

Note: See TracTickets for help on using tickets.