WordPress.org

Ready to get started?Download WordPress

Forums

Contextual Related Posts
HTML5 Validation (2 posts)

  1. lzs
    Member
    Posted 2 months ago #

    Hi, CRP looks to be a really great plugin! There is one thing that bugs me though, and it's that it won't pass HTML5 validation because of the Border attribute used in the IMG element. May I suggest to remove it, and if necessary, just apply "border: 0" to the CSS class instead.

    --- contextual-related-posts.php	2014-06-12 17:58:10.339583373 -0700
    +++ contextual-related-posts.php.orig	2014-06-12 17:52:03.061001452 -0700
    @@ -813,7 +813,7 @@
     			$postimage = wp_get_attachment_image_src( get_post_thumbnail_id( $result->ID ) , 'full' );
     		}
     		$postimage = apply_filters( $filter, $postimage[0], $thumb_width, $thumb_height, $thumb_timthumb, $thumb_timthumb_q, $result );
    -		$output .= '<img src="' . $postimage . '" alt="' . $title . '" title="' . $title . '" ' . $thumb_html . ' class="' . $class . '" />';
    +		$output .= '<img src="' . $postimage . '" alt="' . $title . '" title="' . $title . '" ' . $thumb_html . ' border="0" class="' . $class . '" />';
     	} else {
     		$postimage = get_post_meta( $result->ID, $thumb_meta, true );	// Check the post meta first
     		if ( ! $postimage && $scan_images ) {
    @@ -833,7 +833,7 @@
     		}
     		if ( $postimage ) {
     			$postimage = apply_filters( $filter, $postimage, $thumb_width, $thumb_height, $thumb_timthumb, $thumb_timthumb_q, $result );
    -			$output .= '<img src="'.$postimage.'" alt="'.$title.'" title="'.$title.'" '.$thumb_html.' class="'.$class.'" />';
    +			$output .= '<img src="'.$postimage.'" alt="'.$title.'" title="'.$title.'" '.$thumb_html.' border="0" class="'.$class.'" />';
     		}
     	}

    Thanks. :)

  2. Ajay
    Member
    Plugin Author

    Posted 2 months ago #

    Hi,

    I can make this change in the next version.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.