#56045 closed enhancement (fixed)
Add filters to allow the shortcut return to wp_load_alloptions
Reported by: | pbearne | Owned by: | spacedmonkey |
---|---|---|---|
Milestone: | 6.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Options, Meta APIs | Keywords: | has-patch has-unit-tests commit needs-dev-note |
Focuses: | performance | Cc: |
Description (last modified by )
This adds a shortcut filter to the wp_load_options function
Change History (31)
This ticket was mentioned in PR #2857 on WordPress/wordpress-develop by pbearne.
2 years ago
#2
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/56045
#3
@
2 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Hi there, thanks for the ticket and the PR!
This looks like a duplicate of #37930.
#4
in reply to:
↑ 1
@
2 years ago
- Description modified (diff)
Replying to joyously:
The Code Reference for
get_option
says
When one of the Options API filters is used:
pre_option_$option
,default_option_$option
, oroption_$option
, the returned value may not match the expected type.
So, there are already filters. Exactly which functions need which filters?
I have removed the filter for get_options as there is already a patch https://core.trac.wordpress.org/ticket/37930
#5
follow-up:
↓ 8
@
2 years ago
@SergeyBiryukov this is not a dupe as it is a shortcut filter for WP_load_alloptions
#6
@
2 years ago
- Description modified (diff)
- Keywords has-unit-tests added
- Summary changed from Add filters to allow the shortcut return for the get options functions to Add filters to allow the shortcut return to wp_load_alloptions
#8
in reply to:
↑ 5
@
2 years ago
- Milestone set to Awaiting Review
Replying to pbearne:
this is not a dupe as it is a shortcut filter for WP_load_alloptions
Thanks for the clarification! Yeah, let's keep this one for the pre_wp_load_alloptions
filter then.
#10
@
2 years ago
- Keywords needs-refresh added
- Milestone changed from Awaiting Review to 6.1
Hi there!
Thanks for the ticket and PR. It looks good, except for the small problem with the doc block for the filter.
Moving to the 6.1
milestone for consideration.
This ticket was mentioned in Slack in #core by pbearne. View the logs.
2 years ago
#13
@
2 years ago
- Owner changed from pbearne to davidbaumwald
- Status changed from assigned to reviewing
This ticket was mentioned in Slack in #core by pbearne. View the logs.
2 years ago
#17
@
2 years ago
- Milestone changed from 6.1 to 6.2
- Type changed from defect (bug) to enhancement
@pbearne @spacedmonkey I apologize for not catching this sooner, but this is actually an Enhancement
not a Bug
. As such, this can't be committed to 6.1 since the deadline for FEA/ENH was Beta 1 a couple of days ago.
Updating the ticket to properly type it and punting to 6.2 to make sure it gets in.
This ticket was mentioned in Slack in #core by costdev. View the logs.
21 months ago
#19
@
21 months ago
- Keywords changes-requested added; needs-refresh removed
I've requested some changes on the PR :) Updating the ticket's keywords to swap needs-refresh
for changes-requested
.
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
21 months ago
This ticket was mentioned in PR #4016 on WordPress/wordpress-develop by @costdev.
21 months ago
#21
Trac ticket: https://core.trac.wordpress.org/ticket/56045
#22
@
21 months ago
- Keywords commit added; changes-requested removed
I have updated the patch to address the remaining feedback. See PR 4016.
Adding for commit
consideration.
Additional props: @mukesh27
@spacedmonkey commented on PR #4016:
21 months ago
#26
Committed
#30
@
20 months ago
Drafted a note for this to be included in the Field Guide's notes section, as shared in https://wordpress.slack.com/archives/C02KGN5K076/p1677531978930639?thread_ts=1677512400.171959&cid=C02KGN5K076.
The Code Reference for
get_option
saysSo, there are already filters. Exactly which functions need which filters?