Make WordPress Core

Opened 17 years ago

Closed 17 years ago

#10893 closed defect (bug) (fixed)

get_site_option should activate the same filters as the mu version

Reported by: mark-k Owned by: westi
Priority: lowest Milestone: 2.9
Component: General Version: 2.8.4
Severity: normal Keywords: reporter-feedback needs-testing
Cc: Focuses:

Description

No much point in having the same function names if they behave differently.

Namely, call the pre_site_option_${key} filter before getting the option and site_option_${key} to filter the return value.

Attachments (1)

site-option-mu-filters.diff​ (1.3 KB ) - added by westi 17 years ago.
Patch for the filters

Download all attachments as: .zip

Change History (6)

@westi
17 years ago

Patch for the filters

#1 @westi
17 years ago

  • Keywords reporter-feedback added
  • Milestone Unassigned → 2.9
  • Owner set to westi
  • Status new → accepted

How is that?

Does this give you the same behaviour.

#2 @mark-k
17 years ago

Yes, thanks,

#3 @westi
17 years ago

  • Resolution → fixed
  • Status accepted → closed

(In [11995]) Make the (add|get|update)_site_option functions run the same filters in WP as they do in mu. Fixes #10893.

#4 follow-up: @hakre
17 years ago

  • Keywords needs-testing added
  • Resolution fixed
  • Status closed → reopened

some feedback on the (as untested marked but comitted) patch:

$key is not validated in any of these functions.

a filter returning false as the value FAILS to work.

#5 in reply to: ↑ 4 @westi
17 years ago

  • Resolution → fixed
  • Status reopened → closed

Replying to hakre:

some feedback on the (as untested marked but comitted) patch:

$key is not validated in any of these functions.

The same as the mu function and the same as get_option itself.

a filter returning false as the value FAILS to work.

The same as the mu function and the same as get_option itself.

The idea behind this change was for that same behaviour to be preserved.

Closing as FIXED.

If you wish you could open a new ticket for a future release to all for shortcircuit to return false and be used.

Note: See TracTickets for help on using tickets.