Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

Commit

Permalink
Slightly changed an expression
Browse files Browse the repository at this point in the history
  • Loading branch information
aldolat committed May 29, 2016
1 parent 5871763 commit 76188f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Please, see [FAQ page](https://github.com/aldolat/posts-in-sidebar/wiki/FAQ) on

### 3.8 ###

* If in a WordPress generated excerpt the length of the excerpt is smaller that the user-defined length, the "Read more..." text is automatically hidden.
* If the length of a WordPress-generated excerpt is smaller than or equal to the maximum length defined by the user for the excerpt, the "Read more..." text is automatically hidden.
* Reduced widget width to 600px in the admin area.

### 3.7 ###
Expand Down
2 changes: 1 addition & 1 deletion inc/pis-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ function pis_the_text( $args ) {
// ... else generate an excerpt
$excerpt_text = strip_shortcodes( $pis_query->post->post_content );
$no_the_more = false;
if ( $exc_length >= count( explode( ' ', wp_strip_all_tags( $excerpt_text ) ) ) ) $no_the_more = true;
if ( count( explode( ' ', wp_strip_all_tags( $excerpt_text ) ) ) <= $exc_length ) $no_the_more = true;
$excerpt_text = wp_trim_words( $excerpt_text, $exc_length, '&hellip;' );
$output .= apply_filters( 'pis_excerpt_text', $excerpt_text ) . ' ' . pis_more_arrow( $the_more, $no_the_more, $exc_arrow, false );
}
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Please, see [FAQ page](https://github.com/aldolat/posts-in-sidebar/wiki/FAQ) on

= 3.8 =

* If in a WordPress generated excerpt the length of the excerpt is smaller that the user-defined length, the "Read more..." text is automatically hidden.
* If the length of a WordPress-generated excerpt is smaller than or equal to the maximum length defined by the user for the excerpt, the "Read more..." text is automatically hidden.
* Reduced widget width to 600px in the admin area.

= 3.7 =
Expand Down

0 comments on commit 76188f9

Please sign in to comment.