validate_install() ) { /** * Reset transient. * * @var WpSmushitAdmin $wpsmushit_admin */ $wpsmushit_admin->check_bulk_limit( true, 'dir_sent_count' ); } wp_nonce_field( 'smush_get_dir_list', 'list_nonce' ); wp_nonce_field( 'smush_get_image_list', 'image_list_nonce' ); $upgrade_url = add_query_arg( array( 'utm_source' => 'smush', 'utm_medium' => 'plugin', 'utm_campaign' => 'smush_directorysmush_limit_notice', ), $wpsmushit_admin->upgrade_url ); echo '
'; /** * Container header. * * @var WpSmushBulkUi $wpsmush_bulkui */ $wpsmush_bulkui->container_header( esc_html__( 'Directory Smush', 'wp-smushit' ) ); ?>
<?php esc_html_e( 'Directory Smush - Choose Folder', 'wp-smushit' ); ?>


smush_result_notice(); ?>

', '' ); ?>

base ) && ( 'toplevel_page_smush' === $current_screen->base || 'toplevel_page_smush-network' === $current_screen->base ) ) { $this->directory_list_dialog(); $this->progress_dialog(); } echo '
'; } /** * Show directory smush result notice. * * If we are redirected from a directory smush finish page, * show the result notice if success/fail count is available. * * @since 2.9.0 */ public function smush_result_notice() { // Get the counts from transient. $items = get_transient( 'wp-smush-show-dir-scan-notice' ); $failed_items = get_transient( 'wp-smush-dir-scan-failed-items' ); $notice_message = esc_html__( 'All images failed to optimize.', 'wp-smushit' ); $notice_class = 'sui-notice-error'; // Not all images optimized. if ( ! empty( $failed_items ) && ! empty( $items ) ) : $notice_message = sprintf( /* translators: %1$d: number of images smushed and %1$d number of failed. */ esc_html__( '%1$d images were successfully optimized and %2$d images failed.', 'wp-smushit' ), absint( $items ), absint( $failed_items ) ); $notice_class = 'sui-notice-warning'; // Yay! All images were optimized. elseif ( ! empty( $items ) && empty( $failed_items ) ) : $notice_message = sprintf( /* translators: %d: number of images */ esc_html__( '%d images were successfully optimized.', 'wp-smushit' ), absint( $items ) ); $notice_class = 'sui-notice-success'; endif; // If we have counts, show the notice. if ( ! empty( $items ) || ! empty( $failed_items ) ) : // Delete the transients. delete_transient( 'wp-smush-show-dir-scan-notice' ); delete_transient( 'wp-smush-dir-scan-failed-items' ); ?>

0 ? $dir_smush_stats['dir_smush']['bytes'] : 0; } ?>
  • ">

    /