templates_manager->get_import_images_instance()->import( $attachment ); } // Filter out attachments that don't exist $settings = array_filter( $settings ); return $settings; } /** * Render gallery control output in the editor. * * Used to generate the control HTML in the editor using Underscore JS * template. The variables for the class are available using `data` JS * object. * * @since 1.0.0 * @access public */ public function content_template() { ?>
{{{ data.label }}}
<# if ( data.description ) { #>
{{{ data.description }}}
<# } #>
true, 'dynamic' => [ 'categories' => [ TagsModule::GALLERY_CATEGORY ], 'returnType' => 'object', ], ]; } /** * Get gallery control default values. * * Retrieve the default value of the gallery control. Used to return the default * values while initializing the gallery control. * * @since 1.0.0 * @access public * * @return array Control default value. */ public function get_default_value() { return []; } }