Wednesday, August 17, 2022
HomeWordPress DevelopmentVideo shortcode, choice usually are not rendered

Video shortcode, choice usually are not rendered


I am utilizing some customized shortcodes with out drawback. I am attempting to create a customized video shortocode however wordpress all the time removes autoplay loop muted playsinline on rendering. Poster works completely. Do you may have thought why ?

operate video_custom() {
    extract( shortcode_atts( array(
        'choice' => '',
        'poster' => '',  
        'src' => '',
        'kind' => '',     
        ), $atts ) );
    
    return '<div class="d-flex justify-content-center"><video class="wp-video" '.$choice.' poster="'.$poster.'"><supply src="'.$src.'" kind="video/'.$kind.'" /></video></div>';
    }
    add_shortcode('video_custom', 'video_custom');

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments