core/Fields/Definitions/Oembed.php
<?php
namespace Kontentblocks\Fields\Definitions;
use Kontentblocks\Fields\Field;
use Kontentblocks\Customizer\CustomizerIntegration;
/**
*
*/
Class Oembed extends Field
{
// Defaults
public static $settings = array(
'type' => 'oembed'
);
/**
* When this data is retrieved
* @param $val
*
* @return string
*/
public function prepareFrontendValue($val)
{
return $val;
}
/**
* @param $val
*
* @return mixed
*/
public function prepareFormValue($val)
{
return esc_url($val);
}
}