Skip to content

Instantly share code, notes, and snippets.

@MarcGuay
Created September 3, 2015 19:25
Show Gist options
  • Save MarcGuay/bbd3bd7e471642db3757 to your computer and use it in GitHub Desktop.
Save MarcGuay/bbd3bd7e471642db3757 to your computer and use it in GitHub Desktop.
$wp_customize->add_setting( 'scss-paragraph-font-size', array(
'sanitize_callback' => 'scss_number_format',
) );
$wp_customize->add_control( 'scss-paragraph-font-size', array(
'type' => 'number',
'priority' => 10,
'section' => 'fonts',
'label' => 'Paragraph Font Size',
'input_attrs' => array(
'min' => 1,
'max' => 100,
),
) );
function scss_number_format($var){
return "rem-calc(".$var.")";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment