Skip to content

Commit

Permalink
fix(filters): added the filter to get_rwd_attachment_image as well
Browse files Browse the repository at this point in the history
  • Loading branch information
therajumandapati committed Dec 10, 2018
1 parent bd3fe67 commit d19db25
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion just-rwd-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @param array $attr Additional html attributes to be used for main tag.
*/
function rwd_attachment_image( $attachment = null, $size = 'thumbnail', $tag, $attr = array() ) {
if(empty($tag)) {
if( empty( $tag ) ) {
$tag = apply_filters( 'rwd_tag_type', 'picture' );
}
echo get_rwd_attachment_image( $attachment, $size, $tag, $attr );
Expand All @@ -46,6 +46,11 @@ function rwd_attachment_image( $attachment = null, $size = 'thumbnail', $tag, $a
*/
function get_rwd_attachment_image( $attachment = null, $size = 'thumbnail', $tag, $attr = array() ) {
$rwd_image = new RwdImage( $attachment );

if( empty( $tag ) ) {
$tag = apply_filters( 'rwd_tag_type', 'picture' );
}

$size = apply_filters( 'post_thumbnail_size', $size );

if ( 'img' != $tag ) {
Expand Down

0 comments on commit d19db25

Please sign in to comment.