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 = apply_filters( 'elementor/template-library/create_new_dialog_types', $types, $document_types ); ?>