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 }}}
<# } #>
', '' ); } else { $content = sprintf( __( 'This image is large and may slow things down. %1$sInstall Image Optimizer%2$s to reduce size without losing quality.', 'elementor' ), '', '' ); } } else { $content = sprintf( '%1$s %3$s', esc_html__( 'Don’t let unoptimized images be the downfall of your site’s performance.', 'elementor' ), Hints::get_plugin_action_url( 'image-optimization' ), Hints::is_plugin_installed( 'image-optimization' ) ? esc_html__( 'Activate Image Optimizer!', 'elementor' ) : esc_html__( 'Install Image Optimizer!', 'elementor' ) ); } $dismissible = $once_dismissed ? 'image_optimizer_hint' : 'image-optimization-once'; ?>
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 []; } }