src/Theme.php
public static function renderWrapperAttrs(array $embed): string
    {
        // attributes to be rendered
        $classes = array();
        $styles = array();
        // shortcuts
        $d = &$embed['dimension'];
        // determine classes
        $classes[] = 'video-wrapper';
        if ($d->dynamic) {
            $classes[] = 'wrap-'.$d->scale_model;
        }
        // determine inline CSS style(s)
        if ($d->dynamic && ($d->scale_model == 'scale-width-height')) {
            $styles[] = 'padding-bottom: ' . ($d->factor * 100) . '%;';
        }
        // render the attributes
        $class = implode(' ', $classes);
        $style = implode('; ', $styles) . (!empty($styles) ? ';' : '');
        return 'class="'.$class.'" style="'.$style.'"';
    }
public static function renderWrapperAttrs(array $embed): string
    {
        // attributes to be rendered
        $classes = array();
        $styles = array();
        // shortcuts
        $d = &$embed['dimension'];
        // determine classes
        $classes[] = 'video-wrapper';
        if ($d->dynamic) {
            $classes[] = 'wrap-'.$d->scale_model;
        }
        // determine inline CSS style(s)
        if ($d->dynamic && ($d->scale_model == 'scale-width-height')) {
            $styles[] = 'padding-bottom: ' . ($d->factor * 100) . '%;';
        }
        // render the attributes
        $class = implode(' ', $classes);
        $style = implode('; ', $styles) . (!empty($styles) ? ';' : '');
        return 'class="'.$class.'" style="'.$style.'"';
    }
public static function renderWrapperAttrs ( array $ embed ) : string { // attributes to be rendered $ classes = array ( ) ; $ styles = array ( ) ; // shortcuts $ d = & $ embed [ 'dimension' ] ; // determine classes $ classes [ ] = 'video-wrapper' ; if ( $ d -> dynamic ) { $ classes [ ] = 'wrap-' . $ d -> scale_model ; } // determine inline CSS style(s) if ( $ d -> dynamic && ( $ d -> scale_model == 'scale-width-height' ) ) { $ styles [ ] = 'padding-bottom: ' . ( $ d -> factor * 100 ) . '%;' ; } // render the attributes $ class = implode ( ' ' , $ classes ) ; $ style = implode ( '; ' , $ styles ) . ( ! empty ( $ styles ) ? ';' : '' ) ; return 'class="' . $ class . '" style="' . $ style . '"' ; }
Helper funcion to template. Render attributes for .videowrapper

@param array $embed embed definition

@return string HTTP attributes
Helper funcion to template . Render attributes for . videowrapper