add_control( 'shortcode', [ 'label' => esc_html__( 'Shortcode', 'elementor-pro' ), 'type' => Controls_Manager::TEXTAREA, ] ); } public function render() { $settings = $this->get_settings(); if ( empty( $settings['shortcode'] ) ) { return; } $shortcode_string = $settings['shortcode']; $value = do_shortcode( $shortcode_string ); $should_escape = true; /** * Should escape shortcodes. * * By default shortcodes in dynamic tags are escaped. This hook allows developers * to avoid shortcodes from beeing escaped. Defaults to true. * * @since 2.2.1 * * @param bool $should_escape Whether to escape shortcodes in dynamic tags. */ $should_escape = apply_filters( 'elementor_pro/dynamic_tags/shortcode/should_escape', $should_escape ); if ( $should_escape ) { $value = wp_kses_post( $value ); } // PHPCS - the variable $value is safe. echo $value; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } }