#7041 closed defect (bug) (fixed)
Can`t set 'Text size' in Email Customizer
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | high |
Severity: | normal | Version: | 2.5.0 |
Component: | Templates | Keywords: | has-patch commit |
Cc: |
Description ¶
Text size changes only in online view, but value is not set.
Reason: in bp_email_get_customizer_settings function is wrong sanitize_callback
'intval'
If change it to empty string - everything works good.
''
Pull Requests
- Loading…
Change History (7)
This ticket was mentioned in Slack in #buddypress by dcavins. View the logs.
9 years ago
#3
@
9 years ago
- Keywords has-patch added
Ouch. The reason that this fails is that the sanitization callback passed into the customizer setting definition is attached to a filter in WP_Customize_Setting::sanitize()
. That filter passes two arguments to the sanitization callback: $value
and the instance of WP_Customize_Setting
. Since intval()
can accept an optional second argument ($base
), and $this
is passed into it, it blows up.
Switching to the WP function absint()
, which is only expecting one argument, works fine though. Patch attached.
#4
@
9 years ago
- Keywords commit added
Nice investigative work, @dcavins!
Should this also be part of 2.5.4?
Confirmed. I am baffled as to what's going on. To save time for the next person, these values are provided from the Customiser as a string, and the idea with intval is to coerce it to an integer. The updated value is not getting saved to the database (wp_options, key "bp_email_options").