Skip to content

Commit

Permalink
added Typography V2 option type
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriuzdrobau committed Jul 10, 2015
1 parent 79f2827 commit 4a782fd
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions options/built-in-option-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -874,6 +874,43 @@ Choose font family, size, style and color.
'help' => __('Help tip', 'fw'),
)
Typography V2
----------

Choose font family, style, weight, size, line-height, letter-spacing and color.

.. code-block:: php
array(
'type' => 'typography-v2',
'value' => array(
'family' => 'Amarante',
//For standard fonts, instead of subset and variation you should set 'style' and 'weight'.
//'style' => 'italic',
//'weight' => 700,
'subset' => 'latin-ext',
'variation' => 'regular',
'size' => 14,
'line-height' => 13,
'letter-spacing' => -2,
'color' => '#0000ff'
),
'components' => array(
'family' => true,
//'style', 'weight', 'subset', 'variation' will appear and disappear along with 'family'
'size' => true,
'line-height' => true,
'letter-spacing' => true,
'color' => true
),
'attr' => array( 'class' => 'custom-class', 'data-foo' => 'bar' ),
'label' => __('Label', 'fw'),
'desc' => __('Description', 'fw'),
'help' => __('Help tip', 'fw'),
)
WP Editor
---------

Expand Down

0 comments on commit 4a782fd

Please sign in to comment.