redux-framework icon indicating copy to clipboard operation
redux-framework copied to clipboard

Select2 args in typography font-family dropdown

Open paulthecoder opened this issue 11 years ago • 3 comments

Redux Version 3.4.1 as a plugin WordPress 4.1 Dev mode is off

The select2 args work for any other dropdown in the typography field but it does not work for the font-family one. Any suggestions?

Code for the typography field setup:

array(
    'id'             => 'font',
    'type'           => 'typography',
    'title'          => 'font',
    'color'          => false,
    'font-size'      => false,
    'font-style'     => false,
    'font-weight'    => false,
    'letter-spacing' => false,
    'line-height'    => false,
    'text-align'     => false,
    'subsets'        => false,
    'units'          => 'px',
    'subtitle'       => 'subtitle',
    'default'        => array(
        'font-family'    => 'Lato',
        'google'         => true,
        'font-size'      => '16px'
    ),
    'preview' => array(
        'font-size' => '16px'
    ),
    'select2' => array(
        'minimumResultsForSearch' => 10,
        'allowClear' => false,
    ),
)

paulthecoder avatar Feb 08 '15 05:02 paulthecoder

It's because that select2 is generated dynamically, so we could load the fonts from a PHP class. I don;t think we ever found a way around that.

kprovance avatar Feb 08 '15 06:02 kprovance

Ok, couldn't do it with ajax eh? No matter, i'll use some good 'ol CSS. Thanks for the quick reply @kprovance

paulthecoder avatar Feb 08 '15 06:02 paulthecoder

Probably. It's one of those things that's on the bottom of my todo list. The stuff that pays has to take priority until Redux is a self sustaining entity, which it isn't. :|

kprovance avatar Feb 08 '15 06:02 kprovance