|
50 | 50 | <?php if ( false !== $connection->get_usage_stat( 'credits', 'limit' ) ) : ?> |
51 | 51 | <span class="cloudinary-stat" title="<?php esc_attr_e( 'Credits', 'cloudinary' ); ?>"> |
52 | 52 | <span class="dashicons dashicons-marker"></span> <?php esc_html_e( number_format_i18n( $connection->get_usage_stat( 'credits', 'limit' ) ) ); ?> |
53 | | - <span class="cloudinary-percent"> <?php esc_html_e( $connection->get_usage_stat( 'credits', 'used_percent' ) . '%' ); ?></span> | |
| 53 | + <?php if ( false !== $connection->get_usage_stat( 'credits', 'used_percent' ) ) : ?> |
| 54 | + <span class="cloudinary-percent"> <?php esc_html_e( $connection->get_usage_stat( 'credits', 'used_percent' ) . '%' ); ?></span> | |
| 55 | + <?php endif; ?> |
54 | 56 | </span> |
55 | 57 | <?php endif; ?> |
56 | 58 |
|
57 | 59 | <span class="cloudinary-stat" title="<?php esc_attr_e( 'Storage', 'cloudinary' ); ?>"> |
58 | 60 | <span class="dashicons dashicons-cloud"></span> <?php esc_html_e( size_format( $connection->get_usage_stat( 'storage', 'limit' ) ) ); ?> |
59 | | - <span class="cloudinary-percent"> <?php esc_html_e( $connection->get_usage_stat( 'storage', 'used_percent' ) . '%' ); ?></span> | |
| 61 | + <?php if ( false !== $connection->get_usage_stat( 'storage', 'used_percent' ) ) : ?> |
| 62 | + <span class="cloudinary-percent"> <?php esc_html_e( $connection->get_usage_stat( 'storage', 'used_percent' ) . '%' ); ?></span> | |
| 63 | + <?php endif; ?> |
60 | 64 | </span> |
61 | 65 | <span class="cloudinary-stat" title="<?php esc_attr_e( 'Transformations', 'cloudinary' ); ?>"> |
62 | 66 | <span class="dashicons dashicons-image-filter"></span> <?php esc_html_e( number_format_i18n( $connection->get_usage_stat( 'transformations', 'limit' ) ) ); ?> |
63 | | - <span class="cloudinary-percent success"> <?php esc_html_e( $connection->get_usage_stat( 'transformations', 'used_percent' ) . '%' ); ?></span> | |
| 67 | + <?php if ( false !== $connection->get_usage_stat( 'transformations', 'used_percent' ) ) : ?> |
| 68 | + <span class="cloudinary-percent success"> <?php esc_html_e( $connection->get_usage_stat( 'transformations', 'used_percent' ) . '%' ); ?></span> | |
| 69 | + <?php endif; ?> |
64 | 70 | </span> |
65 | 71 | <span class="cloudinary-stat" title="<?php esc_attr_e( 'Bandwidth', 'cloudinary' ); ?>"> |
66 | 72 | <span class="dashicons dashicons-dashboard"></span> <?php esc_html_e( size_format( $connection->get_usage_stat( 'bandwidth', 'limit' ) ) ); ?> |
67 | | - <span class="cloudinary-percent success"> <?php esc_html_e( $connection->get_usage_stat( 'bandwidth', 'used_percent' ) . '%' ); ?></span> |
| 73 | + <?php if ( false !== $connection->get_usage_stat( 'bandwidth', 'used_percent' ) ) : ?> |
| 74 | + <span class="cloudinary-percent success"> <?php esc_html_e( $connection->get_usage_stat( 'bandwidth', 'used_percent' ) . '%' ); ?></span> |
| 75 | + <?php endif; ?> |
68 | 76 | </span> |
69 | 77 | </div> |
70 | 78 | <hr> |
|
0 commit comments