Bug Code Fix Here
-
I was having a problem with this widget and the subsidiary widgets in my theme. The theme author found a bug in the plugin. Basically, it’s outputting an image instead of returning it for later use.
This:
// If no post thumbnail found, check if Get The Image plugin exist and display the image. elseif ( function_exists( 'get_the_image' ) ) : $html .= get_the_image( array( 'height' => (int) $args['thumb_height'], 'width' => (int) $args['thumb_width'], 'image_class' => esc_attr( $args['thumb_align'] ) . ' rpwe-thumb get-the-image', 'image_scan' => true, 'default_image' => esc_url( $args['thumb_default'] ) ) );
Should be this:
// If no post thumbnail found, check if Get The Image plugin exist and display the image. elseif ( function_exists( 'get_the_image' ) ) : $html .= get_the_image( array( 'height' => (int) $args['thumb_height'], 'width' => (int) $args['thumb_width'], 'image_class' => esc_attr( $args['thumb_align'] ) . ' rpwe-thumb get-the-image', 'image_scan' => true, 'default_image' => esc_url( $args['thumb_default'] ), 'echo' => false ) );
The widget is outputting an image *outside* of the widget container. This means that the theme loses a lot of control because it expects widget containers to contain the entirety of the widget. That way, things can be appropriately positioned.
https://www.ads-software.com/plugins/recent-posts-widget-extended/
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug Code Fix Here’ is closed to new replies.