WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Simply Instagram] PATCH: Don't put in br tags if short_desc is empty

[Resolved] [Plugin: Simply Instagram] PATCH: Don't put in br tags if short_desc is empty

  • This patch just adds if (!empty($short_desc)) around the echo for $short_desc.

    Index: simplyInstagramWidget.php
    ===================================================================
    --- simplyInstagramWidget.php	(revision 571605)
    +++ simplyInstagramWidget.php	(working copy)
    @@ -17,7 +17,9 @@
    
     		echo $before_widget;
     		echo $before_title . $widget_title . $after_title;
    -		echo $short_desc . "<br/><br/>";
    +		if (!empty($short_desc)) {
    +			echo $short_desc . "<br/><br/>";
    +		}
    
     		echo sInstShowWidgetData( sInstGetSelfFeed( access_token() ), $max_display, $instance[ 'size' ], "sIntSelfFeed" );
     ?>
    @@ -402,7 +404,9 @@
    
     		echo $before_widget;
     		echo $before_title . $widget_title . $after_title;
    -		echo $short_desc . "<br/><br/>";
    +		if (!empty($short_desc)) {
    +			echo $short_desc . "<br/><br/>";
    +		}
    
     		echo sInstShowWidgetData( sInstGetMostPopular( "popular", access_token() ), $instance[ 'max_display' ], $instance[ 'size' ], "sInstMostPopular" );
     	?>
    @@ -511,7 +515,9 @@
    
     		echo $before_widget;
     		echo $before_title . $widget_title . $after_title;
    -		echo $short_desc . "<br/><br/>";
    +		if (!empty($short_desc)) {
    +			echo $short_desc . "<br/><br/>";
    +		}
    
     		echo sInstShowWidgetData( sInstGetRecentMedia( user_id(), access_token() ), $instance[ 'max_display' ], $instance[ 'size' ], "sInstRecentMediaWid" );
     	?>

    http://wordpress.org/extend/plugins/simply-instagram/

  • The topic ‘[Resolved] [Plugin: Simply Instagram] PATCH: Don't put in br tags if short_desc is empty’ is closed to new replies.