• Resolved Giuseppe

    (@mociofiletto)


    Hi, I have found an error in your code in file views/admin.php .
    This error make impossible to select image size other than “Full Size”.
    Error is in line 125, where you remove html tags from an html formatted string.

    This is the patch to correct the bug:

    
    @@ -118,12 +118,12 @@
     
     			$option_image_size = '';
     			foreach ( $sizes as $size => $atts ) {
    -				$option_image_size     .= '<option value="' . $size . '"' . selected( $instance['image_size'], $size, false ) . '>';
    +				$option_image_size     .= '<option value="' . esc_attr( $size ). '"' . esc_attr( selected( $instance['image_size'], $size, false )) . '>';
     					$option_image_size .= ucwords( preg_replace( '/-/', ' ', $size ) ) . ' (' . implode( 'x', $atts ) . ')';
     				$option_image_size     .= '</option>';
     			}
    -			echo esc_attr( $option_image_size );
    -			?>
    +			echo $option_image_size;
    +			?>
     		</select>
     	</div>
    
    • This topic was modified 4 years, 10 months ago by Giuseppe.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Impossible to select image size in admin view’ is closed to new replies.