/var/www/wp2.qr4y.com/www/wp-content/plugins/elementor-pro/modules/library/widgets
Edit: /var/www/wp2.qr4y.com/www/wp-content/plugins/elementor-pro/modules/library/widgets/template.php (2482B)
start_controls_section(
'section_template',
[
'label' => esc_html__( 'Template', 'elementor-pro' ),
]
);
$document_types = Plugin::elementor()->documents->get_document_types( [
'show_in_library' => true,
] );
$this->add_control(
'template_id',
[
'label' => esc_html__( 'Choose Template', 'elementor-pro' ),
'type' => QueryControlModule::QUERY_CONTROL_ID,
'label_block' => true,
'autocomplete' => [
'object' => QueryControlModule::QUERY_OBJECT_LIBRARY_TEMPLATE,
'query' => [
'meta_query' => [
[
'key' => Document::TYPE_META_KEY,
'value' => array_keys( $document_types ),
'compare' => 'IN',
],
],
],
],
]
);
$this->end_controls_section();
}
protected function render() {
$template_id = $this->get_settings( 'template_id' );
if ( empty( $template_id ) ) {
return;
}
if ( 'publish' !== get_post_status( $template_id ) ) {
return;
}
?>
frontend->get_builder_content_for_display( $template_id ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>