Created
March 2, 2020 19:03
-
-
Save davidchc/623e6fcd50a37d89cc6760a6ec37c8ee to your computer and use it in GitHub Desktop.
Enable the shortcode in the video link of the WordPress Elementor plugin section. Habilitar o shortcode no link de video da seção do Plugin Elementor do WordPress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'init', function(){ | |
add_action( 'elementor/frontend/section/before_render', function ( \Elementor\Element_Base $element ) { | |
if ( ! $element->get_settings( 'background_video_link' ) ) { | |
return; | |
} | |
$element->set_settings( 'background_video_link', do_shortcode($element->get_settings( 'background_video_link' ) ) ); | |
} ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment