File manager - Edit - /home/carfac/public_html/rephotonet/wordpress/wp-content/plugins/royal-addons/shortcodes/video.php
Back
<?php // Video ([video]) class Royal_Shortcode_Video { public static function video( $atts, $content = null ) { extract( shortcode_atts( array( 'icon' => '', 'url' => '', 'target' => '' ), $atts ) ); $url = vc_build_link( $url ); $target = strlen( $url['target'] ) > 0 ? $url['target'] : ''; $url = strlen( $url['url'] ) > 0 ? $url['url'] : ''; return '<p class="text-center"><a href="' . esc_url( $url ) . '" class="video-control animate popup-video"><i class="' . esc_attr( $icon ) . '"></i></a></p> <p class="video-text text-center">' . do_shortcode( $content ) . '</p>'; } public static function vc_video() { vc_map( array( "name" => esc_html__( "Video Control", "royal-addons" ), "base" => "video", "icon" => 'ti-control-play', "description" => esc_html__( "Parallax video button", "royal-addons" ), "category" => esc_html__( "Royal", "royal-addons" ), "params" => array( array( "type" => "textfield", "heading" => esc_html__( "Watch Text", "royal-addons" ), "param_name" => "content", "value" => "", "description" => "", "admin_label" => true, ), array( "type" => "iconpicker", "heading" => esc_html__( "Icon", "royal-addons" ), "param_name" => "icon", "value" => "", "settings" => array( "emptyIcon" => true, 'type' => 'fontawesome', "iconsPerPage" => 4000, ), "dependency" => array( "element" => "type", "value" => "fontawesome", ), ), array( 'type' => 'vc_link', 'heading' => esc_html__( 'Video URL', 'royal-addons' ), 'param_name' => 'url', 'description' => "Example: https://www.youtube.com/watch?v=PGG825Hg490", "admin_label" => true, ), ) )); } } add_shortcode( 'video', array( 'Royal_Shortcode_Video', 'video' ) ); add_action( 'vc_before_init', array( 'Royal_Shortcode_Video', 'vc_video' ) );
| ver. 1.4 |
Github
|
.
| PHP 8.2.31 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings