Skip to content

Commit

Permalink
Modify admin bar, minor css update :closes: #3001
Browse files Browse the repository at this point in the history
  • Loading branch information
Khadreal committed Dec 10, 2024
1 parent d51bff0 commit 079a2f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions assets/css/admin-bar.css
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@
#wp-admin-bar-imagify-profile .imagify-upsell-admin-bar {
position:relative ;
background: #c51161;
margin: 10px -13px -10px -13px;
padding: 20px;
margin: 10px -15px -13px -15px;
padding: 16px;
}

#wp-admin-bar-imagify-profile .imagify-upsell-admin-bar p {
color: #fff;
color: #ebebeb;
}

#wp-admin-bar-imagify-profile a.imagify-upsell-admin-bar-button {
Expand Down
5 changes: 3 additions & 2 deletions assets/css/pricing-modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ div.imagify-col-price {
.imagify-offer-monthly .imagify-flex-table .imagify-price-block,
.imagify-offer-monthlies .imagify-price-block {
padding-top: 0;
max-width: 39%;
}
.imagify-flex-table .imagify-price-complement {
padding-right: 0;
Expand Down Expand Up @@ -1502,6 +1503,6 @@ input:checked ~ .imagify-badge-container .imagify-badge {
background-color: #97c45e;
color: white;
border-color: #97c45e;
opacity: 1;
opacity: 1;
}
/** End Toggle Switch **/
/** End Toggle Switch **/
6 changes: 4 additions & 2 deletions inc/classes/class-imagify-files-stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,8 @@ public static function get_overall_original_size() {
}

$table_name = $files_db->get_table_name();
$size = round( $wpdb->get_var( "SELECT SUM( original_size ) FROM $table_name" ) ); // WPCS: unprepared SQL ok.
$sql = $wpdb->get_var( "SELECT SUM( original_size ) FROM $table_name" ); // WPCS: unprepared SQL ok.
$size = is_null( $sql ) ? 0 : round( $sql );

return $size;
}
Expand Down Expand Up @@ -435,7 +436,8 @@ public static function calculate_average_size_per_month() {
}

$table_name = $files_db->get_table_name();
$average = round( $wpdb->get_var( "SELECT AVG( size ) AS average_size_per_month FROM ( SELECT SUM( original_size ) AS size FROM $table_name GROUP BY YEAR( file_date ), MONTH( file_date ) ) AS size_per_month" ) ); // WPCS: unprepared SQL ok.
$sql = $wpdb->get_var( "SELECT AVG( size ) AS average_size_per_month FROM ( SELECT SUM( original_size ) AS size FROM $table_name GROUP BY YEAR( file_date ), MONTH( file_date ) ) AS size_per_month" ); // WPCS: unprepared SQL ok.
$average = is_null( $sql ) ? 0 : round( $sql );

return $average;
}
Expand Down

0 comments on commit 079a2f4

Please sign in to comment.