shortcode( $args, $url ); } return $embed ? $embed : esc_html__( 'Embed HTML not available.', 'brunch-lite' ); } /** * Get field HTML * * @param mixed $meta * @param array $field * @return string */ public static function html( $meta, $field ) { return parent::html( $meta, $field ) . sprintf( '%s
%s
', esc_html__( 'Preview', 'brunch-lite' ), $meta ? self::get_embed( $meta ) : '' ); } /** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ public static function get_attributes( $field, $value = null ) { $attributes = parent::get_attributes( $field, $value ); $attributes['type'] = 'url'; return $attributes; } /** * Format a single value for the helper functions. * * @param array $field Field parameter * @param string $value The value * @return string */ public static function format_single_value( $field, $value ) { return self::get_embed( $value ); } }