Typography

Typography

Key

Default

Description

id

unique

an unique id - use nice name

type

typography

type of option

title

null

title of field

desc

null

decription of field. this is showing below title. can be used html

help

null

help tooltip of field

class

null

extra class of field.

wrap_class

null

extra class of field wrapper

dependency

null

dependency for showing and hiding fields see an example

before

null

extra text for field before area

after

null

extra text for field after area

name

null

name of field

debug

null

showing all config information

debug_light

null

showing some config information

attirbutes

array

attributes of field. supporting only html standard attributes see an example

sanitize

text

sanitize of field. can be enabled or disabled

validate

null

validate of field. can be enabled or disabled

multilang

false

multilangual support of field

show_only_lang

null

multilangual support for language keys eg. ‘en’ or ‘tr’ or ‘es’

Extra Key

default

array

default value of field

family

font-face

font family of field

variant

800

font family of variant

chosen

false

enable/disable chosen select

select2

false

enable/disable select2

font

null

helper for output google, websafe, custom

Demo

array(
  'id'        => 'unique_option_4001',
  'type'      => 'typography',
  'title'     => 'Typography Field',
),
array(
  'id'        => 'unique_option_4002',
  'type'      => 'typography',
  'title'     => 'Typography Field',
  'default'   => array(
    'family'  => 'Open Sans',
    'variant' => '800',
    'font'    => 'google', // this is helper for output
  ),
),
array(
  'id'        => 'unique_option_4002',
  'type'      => 'typography',
  'title'     => 'Typography Field',
  'default'   => array(
    'family'  => 'Arial',
    'font'    => 'websafe',
  ),
),
// Typography without Chosen and Variant
array(
  'id'        => 'unique_option_4002',
  'type'      => 'typography',
  'title'     => 'Typography Field',
  'default'   => array(
    'family'  => 'Ubuntu',
    'font'    => 'google',
  ),
  'variant'   => false,
  'chosen'    => false,
),

Last updated