floatval on output value
-
First time with this one…absint is usable, but this is for absolute numbers, not decimals.
I have an output from a customizer range slider control (decimal values), but to output the value in an inline stylesheet, I’m curious if this line is correct, or is there an alternative for escaping?
$site_title_font_size = floatval(get_theme_mod( 'site_title_font_size' ));
or…
$site_title_font_size = floatval( esc_attr(get_theme_mod( 'site_title_font_size' ) ));
or…?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘floatval on output value’ is closed to new replies.