Changeset 3446977
- Timestamp:
- 01/26/2026 09:41:34 AM (6 weeks ago)
- Location:
- evermore/trunk
- Files:
-
- 2 edited
-
Readme.txt (modified) (2 diffs)
-
evermore.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
evermore/trunk/Readme.txt
r1961664 r3446977 3 3 Tags: extract,more,abbreviate,short,preview,teaser 4 4 Requires at least: 3.0 5 Tested up to: 5.05 Tested up to: 6.9 6 6 Stable tag: 2.4 7 7 … … 48 48 == Changelog == 49 49 50 = 2.5 = 51 * Don't output spurious <!--more--> at the end of a post. 52 50 53 = 2.4 = 51 54 * Improve compatibility with current version of WordPress. -
evermore/trunk/evermore.php
r1241429 r3446977 4 4 Plugin URI: http://thunderguy.com/semicolon/wordpress/evermore-wordpress-plugin/ 5 5 Description: Abbreviate all posts when viewed on multiple post pages. This makes all posts behave as if there is a "<!--more-->" at an appropriate spot inside the content. 6 Version: 2. 46 Version: 2.5 7 7 Author: Bennett McElwee 8 8 Author URI: http://thunderguy.com/semicolon/ 9 9 Requires at least: 3.0 10 Tested up to: 4.310 Tested up to: 6.9 11 11 Licence: GPLv2 or later 12 12 13 13 $Revision$ 14 14 15 Copyright (C) 2005- 15Bennett McElwee15 Copyright (C) 2005-26 Bennett McElwee 16 16 17 17 This program is free software; you can redistribute it and/or … … 126 126 $skipped_end = $matches[2]; 127 127 $unskipped_paras = substr($unskipped_chars, strlen($skipped_paras) + strlen($skipped_end)); 128 if ($link_on_new_para) { 129 // Add 2 newlines after the more, to stop WP adding 130 // a <br> after the more which leaves a spurious blank line. 131 return $skipped_chars . $skipped_paras . $skipped_end . "<!--more-->\n\n" . $unskipped_paras; 132 } else { 133 return $skipped_chars . $skipped_paras . '<!--more-->' . $skipped_end . $unskipped_paras; 128 if (trim(wp_strip_all_tags($unskipped_paras)) !== '') { 129 // We can insert a more here, since there is more content after the skipped paras 130 if ($link_on_new_para) { 131 // Add 2 newlines after the more, to stop WP adding 132 // a <br> after the more which leaves a spurious blank line. 133 return $skipped_chars . $skipped_paras . $skipped_end . "<!--more-->\n\n" . $unskipped_paras; 134 } else { 135 return $skipped_chars . $skipped_paras . '<!--more-->' . $skipped_end . $unskipped_paras; 136 } 134 137 } 135 138 } … … 162 165 if ($diagnostic_reason == "") { 163 166 // We must analyse the content to determine the reason 164 $diagnostic_reason .= "Post did not contain end-of-paragraph ";167 $diagnostic_reason .= "Post did not contain end-of-paragraph with subsequent content"; 165 168 // Mark newlines, escape HTML 166 169 $diagnostic_unskipped_chars = substr($post_content, $char_skip_count);
Note: See TracChangeset
for help on using the changeset viewer.