Skip to content

Instantly share code, notes, and snippets.

@davidchc
Created March 2, 2020 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidchc/623e6fcd50a37d89cc6760a6ec37c8ee to your computer and use it in GitHub Desktop.
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
<?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