* @copyright 2007-2022 Apollotheme * @license http://apollotheme.com - prestashop template provider */ namespace LeoElements; use LeoElements\Core\Base\Document; use LeoElements\Leo_Helper; if ( ! defined( '_PS_VERSION_' ) ) { exit; // Exit if accessed directly } $document_types = Plugin::$instance->documents->get_document_types(); $types = []; $selected = get_query_var( 'elementor_library_type' ); foreach ( $document_types as $document_type ) { if ( $document_type::get_property( 'show_in_library' ) ) { /** * @var Document $instance */ $instance = new $document_type(); $types[ $instance->get_name() ] = $document_type::get_title(); } } /** * Create new template library dialog types. * * Filters the dialog types when printing new template dialog. * * @since 2.0.0 * * @param array $types Types data. * @param Document $document_types Document types. */ $types = Leo_Helper::apply_filters( 'elementor/template-library/create_new_dialog_types', $types, $document_types ); ?>