WordPress.org

Forums

Simply Instagram
[resolved] PATCH: Don't put in br tags if short_desc is empty (1 post)

  1. AndrewLeCody
    Member
    Posted 2 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simply Instagram
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.