Skip to content

Commit

Permalink
add oembed option-type description
Browse files Browse the repository at this point in the history
  • Loading branch information
llemurya committed Jan 13, 2016
1 parent 68ff0b5 commit 36a0e0c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions options/built-in-option-types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,30 @@ Choose font family, style, weight, size, line-height, letter-spacing and color.
)
Oembed
------

Generate oembed preview of the inserted link, for more details see `Embeds <https://codex.wordpress.org/Embeds>`__ in WordPress.

.. code-block:: php
array(
'type' => 'oembed'
'value' => 'https://vimeo.com/113078377',
'label' => __('Label', 'fw'),
'desc' => __('Description', 'fw'),
'help' => __('Help tip', 'fw'),
'preview' => array(
'width' => 300, // optional, if you want to set the fixed width to iframe
'height' => 300, // optional, if you want to set the fixed height to iframe
/**
* if is set to false it will force to fit the dimensions,
* because some widgets return iframe with aspect ratio and ignore applied dimensions
*/
'keep_ratio' => true
)
)
WP Editor
---------

Expand Down

0 comments on commit 36a0e0c

Please sign in to comment.