account-status-connected.php
2 months ago
account-status-create-advanced.php
2 months ago
account-status-create-simple.php
2 months ago
account-status-loading.php
4 years ago
bulk-optimization-form.php
7 months ago
bulk-optimization-upgrade-notice.php
2 months ago
bulk-optimization.php
2 months ago
compress-details-processing.php
2 months ago
compress-details.php
2 months ago
dashboard-widget.php
2 months ago
notice-feedback.php
2 months ago
optimization-chart.php
2 months ago
request-review.php
4 months ago
settings-conversion-delivery.php
4 months ago
settings-conversion-enabled.php
4 months ago
settings-conversion-output.php
4 months ago
settings-conversion.php
4 months ago
settings-diagnostics.php
7 months ago
settings-original-image-original.php
4 months ago
settings-original-image-preserve.php
4 months ago
settings-original-image.php
1 week ago
settings.php
4 months ago
dashboard-widget.php
105 lines
| 1 | <?php |
| 2 | |
| 3 | /** |
| 4 | * Dashboard Widget |
| 5 | * |
| 6 | * @var array $admin_colors |
| 7 | * |
| 8 | */ |
| 9 | $link = '<a href="' . esc_url( admin_url( 'upload.php?page=tiny-bulk-optimization' ) ) . '">' . esc_html__( 'bulk optimization', 'tiny-compress-images' ) . '</a>'; |
| 10 | ?> |
| 11 | <style type="text/css" > |
| 12 | div#tinypng_dashboard_widget div.description { |
| 13 | display: none; |
| 14 | } |
| 15 | div#tinypng_dashboard_widget div#optimization-chart { |
| 16 | display: none; |
| 17 | } |
| 18 | div#tinypng_dashboard_widget div#optimization-chart svg circle.main { |
| 19 | stroke: <?php echo esc_attr( $admin_colors[2] ); ?>; |
| 20 | } |
| 21 | </style> |
| 22 | |
| 23 | <div class="spinner" id="widget-spinner"></div> |
| 24 | <div class="sky"></div> |
| 25 | <div class="cloud"></div> |
| 26 | <div class="panda"></div> |
| 27 | <div class="grass"></div> |
| 28 | <div class="description no-images"> |
| 29 | <p><?php esc_html_e( 'You do not seem to have uploaded any JPEG, PNG or WebP images yet.', 'tiny-compress-images' ); ?></p> |
| 30 | </div> |
| 31 | <div class="description not-optimized"> |
| 32 | <p> |
| 33 | <?php |
| 34 | /* translators: %s: friendly user name */ |
| 35 | printf( esc_html__( 'Hi %s, you haven\'t compressed any images in your media library.', 'tiny-compress-images' ), esc_html( $this->friendly_user_name() ) ); |
| 36 | echo ' '; |
| 37 | printf( |
| 38 | wp_kses( |
| 39 | /* translators: %s: bulk optimization page */ |
| 40 | __( 'If you like you can to optimize your whole library in one go with the %s page.', 'tiny-compress-images' ), |
| 41 | array( |
| 42 | 'a' => array( |
| 43 | 'href' => array(), |
| 44 | ), |
| 45 | ) |
| 46 | ), |
| 47 | wp_kses( $link, array( 'a' => array( 'href' => array() ) ) ) |
| 48 | ); |
| 49 | ?> |
| 50 | </p> |
| 51 | </div> |
| 52 | <div class="description half-optimized"> |
| 53 | <p> |
| 54 | <?php |
| 55 | /* translators: %s: friendly user name */ |
| 56 | printf( esc_html__( '%s, you are doing good.', 'tiny-compress-images' ), esc_html( $this->friendly_user_name() ) ); |
| 57 | echo ' '; |
| 58 | /* translators: %s: number of optimizable sizes and number of uploaded images */ |
| 59 | printf( esc_html__( 'With your current settings you can still optimize %1$s image sizes from your %2$s uploaded JPEG, PNG, and WebP images.', 'tiny-compress-images' ), '<span id="unoptimized-sizes"></span>', '<span id="uploaded-images"></span>' ); |
| 60 | echo ' '; |
| 61 | printf( |
| 62 | wp_kses( |
| 63 | /* translators: %s: bulk optimization link */ |
| 64 | __( 'Start the %s to optimize the remainder of your library.', 'tiny-compress-images' ), |
| 65 | array( |
| 66 | 'a' => array( |
| 67 | 'href' => array(), |
| 68 | ), |
| 69 | ) |
| 70 | ), |
| 71 | wp_kses( $link, array( 'a' => array( 'href' => array() ) ) ) |
| 72 | ); |
| 73 | ?> |
| 74 | </p> |
| 75 | </div> |
| 76 | <div class="description full-optimized"> |
| 77 | <p> |
| 78 | <?php |
| 79 | /* translators: %s: friendly user name */ |
| 80 | printf( esc_html__( '%s, this is great! Your entire library is optimized!', 'tiny-compress-images' ), esc_html( $this->friendly_user_name() ) ); |
| 81 | echo ' '; |
| 82 | require __DIR__ . '/request-review.php'; |
| 83 | ?> |
| 84 | </p> |
| 85 | </div> |
| 86 | <div class="description" id="ie8-compressed"> |
| 87 | <p> |
| 88 | <?php |
| 89 | printf( |
| 90 | wp_kses( |
| 91 | /* translators: %s: savings percentage */ |
| 92 | __( 'You have <strong>saved %s</strong> of your media library size.', 'tiny-compress-images' ), |
| 93 | array( |
| 94 | 'span' => array(), |
| 95 | 'strong' => array(), |
| 96 | ) |
| 97 | ), |
| 98 | '<span></span>%' |
| 99 | ); |
| 100 | ?> |
| 101 | </p> |
| 102 | </div> |
| 103 | |
| 104 | <?php require_once __DIR__ . '/optimization-chart.php'; ?> |
| 105 |