Skip to content

Commit

Permalink
Fixed phpcs
Browse files Browse the repository at this point in the history
  • Loading branch information
CrochetFeve0251 committed Oct 25, 2023
1 parent 3045ad8 commit ac2f1bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions classes/Optimization/Process/AbstractProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -1757,8 +1757,8 @@ public function update_size_optimization_data( $response, $size, $level ) {

// Size data.
$data['success'] = true;
if(property_exists($response, 'message')) {
$data['message'] = imagify_translate_api_message($response->message);
if ( property_exists( $response, 'message' ) ) {
$data['message'] = imagify_translate_api_message( $response->message );
}
$data['original_size'] = $response->original_size;
$data['optimized_size'] = $response->new_size;
Expand Down
2 changes: 1 addition & 1 deletion inc/classes/class-imagify.php
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ private function curl_http_call( $url, $args = [] ) {
* @param string $url URL from the call.
* @param array $args Arguments from the call.
*/
$response = apply_filters('pre_imagify_request', null, $url, $args);
$response = apply_filters( 'pre_imagify_request', null, $url, $args );

if ( $response ) {
return $response;
Expand Down
5 changes: 3 additions & 2 deletions inc/functions/admin-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ function get_imagify_attachment_optimization_text( $process ) {
}

$data = $process->get_data();
$optimized_data = $data->get_optimization_data();
$attachment_id = $media->get_id();
$optimization_level = imagify_get_optimization_level_label( $data->get_optimization_level() );

if ( ! $is_media_page ) {
$output .= $output_before . '<span class="data">' . __( 'New Filesize:', 'imagify' ) . '</span> <strong class="big">' . $data->get_optimized_size() . '</strong>' . $output_after;
}

if ( key_exists('message', $data) ) {
$output .= $output_before . '<span class="data">' . $data['message'] . '</span>' . $output_after;
if ( key_exists( 'message', $optimized_data ) ) {
$output .= $output_before . '<span class="data">' . __( 'Convert:', 'imagify' ) . '</span> <strong class="big">' . $optimized_data['message'] . '</strong>' . $output_after;
}

$chart = '';
Expand Down

0 comments on commit ac2f1bc

Please sign in to comment.