WordPress.org

Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3975 closed defect (bug) (invalid)

Last argument in filters is not available

Reported by: harkos Owned by: harkos
Milestone: Priority: normal
Severity: normal Version: 2.1.2
Component: General Keywords: has-patch
Focuses: Cc:

Description

Working on a multilanguage plugin, I found that the last argument being passed to the called filter is not really being passed. Hacking through WP, I found out the slicing of the argument array is removing that argument. I simply increased the number of the last argument to slice and it worked. A patch to this is attached.

Attachments (2)

plugin_php.patch (560 bytes) - added by harkos 13 years ago.
Patch to apply_filters()
default-filters_php.patch (4.4 KB) - added by harkos 13 years ago.
Sorry, this patch should have been published here instead.

Download all attachments as: .zip

Change History (7)

@harkos
13 years ago

Patch to apply_filters()

#1 @harkos
13 years ago

  • Status changed from new to assigned

#2 @harkos
13 years ago

If you apply this patch, you should also apply the patch for default-filters.php from bug #3974, or you're going to get errors displaying single posts.

@harkos
13 years ago

Sorry, this patch should have been published here instead.

#3 @foolswisdom
13 years ago

  • Keywords has-patch added

#4 @harkos
13 years ago

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

Sorry again, just got that we can set how many arguments the filter receives when we register the function. Case closed.

#5 @foolswisdom
13 years ago

  • Milestone 2.1.3 deleted
Note: See TracTickets for help on using tickets.