Advanced Excerpt - Version 4.3.9

Version Description

(April 13th, 2021) = * New - Option to enable adding the "read more link" for custom excerpts as well

Download this release

Release Info

Developer wpkube
Plugin Icon wp plugin Advanced Excerpt
Version 4.3.9
Comparing to
See all releases

Code changes from version 4.3.8 to 4.3.9

advanced-excerpt.php CHANGED
@@ -3,13 +3,13 @@
3
  Plugin Name: Advanced Excerpt
4
  Plugin URI: http://wordpress.org/plugins/advanced-excerpt/
5
  Description: Control the appearance of WordPress post excerpts
6
- Version: 4.3.8
7
  Author: WPKube
8
  Author URI: https://wpkube.com
9
  Text Domain: advanced-excerpt
10
  */
11
 
12
- $GLOBALS['advanced_excerpt_version'] = '4.3.8';
13
 
14
  function advanced_excerpt_load_textdomain() {
15
  load_plugin_textdomain( 'advanced-excerpt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
3
  Plugin Name: Advanced Excerpt
4
  Plugin URI: http://wordpress.org/plugins/advanced-excerpt/
5
  Description: Control the appearance of WordPress post excerpts
6
+ Version: 4.3.9
7
  Author: WPKube
8
  Author URI: https://wpkube.com
9
  Text Domain: advanced-excerpt
10
  */
11
 
12
+ $GLOBALS['advanced_excerpt_version'] = '4.3.9';
13
 
14
  function advanced_excerpt_load_textdomain() {
15
  load_plugin_textdomain( 'advanced-excerpt', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
class/advanced-excerpt.php CHANGED
@@ -20,6 +20,7 @@ class Advanced_Excerpt {
20
  'link_new_tab' => 0,
21
  'link_screen_reader' => 0,
22
  'link_exclude_length' => 0,
 
23
  'allowed_tags' => array(),
24
  'the_excerpt' => 1,
25
  'the_content' => 1,
@@ -256,7 +257,10 @@ class Advanced_Excerpt {
256
 
257
  // Avoid custom excerpts
258
  if ( !empty( $content ) && !$no_custom ) {
259
- return $content;
 
 
 
260
  }
261
 
262
  // prevent recursion on 'the_content' hook
@@ -423,7 +427,7 @@ class Advanced_Excerpt {
423
  $_POST = stripslashes_deep( $_POST );
424
  $this->options['length'] = (int) $_POST['length'];
425
 
426
- $checkbox_options = array( 'no_custom', 'no_shortcode', 'add_link', 'link_new_tab', 'link_screen_reader', 'link_exclude_length', 'the_excerpt', 'the_content', 'the_content_no_break', 'link_excerpt' );
427
 
428
  foreach ( $checkbox_options as $checkbox_option ) {
429
  $this->options[$checkbox_option] = ( isset( $_POST[$checkbox_option] ) ) ? 1 : 0;
20
  'link_new_tab' => 0,
21
  'link_screen_reader' => 0,
22
  'link_exclude_length' => 0,
23
+ 'link_on_custom_excerpt' => 0,
24
  'allowed_tags' => array(),
25
  'the_excerpt' => 1,
26
  'the_content' => 1,
257
 
258
  // Avoid custom excerpts
259
  if ( !empty( $content ) && !$no_custom ) {
260
+ if ( $link_on_custom_excerpt ) {
261
+ return $this->text_add_more( $content, '', ( $add_link ) ? $read_more : false, ( $link_new_tab ) ? true : false, ( $link_screen_reader ) ? true : false );
262
+ }
263
+ return $content;
264
  }
265
 
266
  // prevent recursion on 'the_content' hook
427
  $_POST = stripslashes_deep( $_POST );
428
  $this->options['length'] = (int) $_POST['length'];
429
 
430
+ $checkbox_options = array( 'no_custom', 'no_shortcode', 'add_link', 'link_new_tab', 'link_screen_reader', 'link_exclude_length', 'link_on_custom_excerpt', 'the_excerpt', 'the_content', 'the_content_no_break', 'link_excerpt' );
431
 
432
  foreach ( $checkbox_options as $checkbox_option ) {
433
  $this->options[$checkbox_option] = ( isset( $_POST[$checkbox_option] ) ) ? 1 : 0;
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: fancythemes, WPKube
3
  Tags: post excerpt, excerpt, post, content, formatting
4
  Requires at least: 3.2
5
- Tested up to: 5.7
6
- Stable tag: 4.3.8
7
  License: GPLv3
8
 
9
  Control the appearance of WordPress post excerpts
@@ -95,8 +95,11 @@ However, you can [start The Loop manually](http://codex.wordpress.org/The_Loop#M
95
  2. An example of an excerpt generated by the plugin
96
 
97
  == Changelog ==
 
 
 
98
  = 4.3.8 (December 28th, 2020) =
99
- * New - Multilanguage compatibility for the "read more" text. The shortcode [advanced_excerpt_text] is used. Example `[advanced_excerpt_text lang="en_US"]English[/advanced_excerpt_text][advanced_excerpt_text lang="de_DE"]German[/advanced_excerpt_text]`
100
 
101
  = 4.3.7 ( July 10th, 2020 ) =
102
  * New - Option to link the whole excerpt to the single post page
2
  Contributors: fancythemes, WPKube
3
  Tags: post excerpt, excerpt, post, content, formatting
4
  Requires at least: 3.2
5
+ Tested up to: 5.8
6
+ Stable tag: 4.3.9
7
  License: GPLv3
8
 
9
  Control the appearance of WordPress post excerpts
95
  2. An example of an excerpt generated by the plugin
96
 
97
  == Changelog ==
98
+ = 4.3.9 (April 13th, 2021) =
99
+ * New - Option to enable adding the "read more link" for custom excerpts as well
100
+
101
  = 4.3.8 (December 28th, 2020) =
102
+ * New - Multilanguage compatibility for the "read more" text. The shortcode [advanced_excerpt_text] is used. Example [advanced_excerpt_text lang="en_US"]English[/advanced_excerpt_text][advanced_excerpt_text lang="de_DE"]German[/advanced_excerpt_text]
103
 
104
  = 4.3.7 ( July 10th, 2020 ) =
105
  * New - Option to link the whole excerpt to the single post page
template/options.php CHANGED
@@ -97,6 +97,12 @@
97
  <?php _e( "Remove link if the whole post content shown", 'advanced-excerpt' ); ?>
98
  </label><br />
99
  </li>
 
 
 
 
 
 
100
  </ul>
101
 
102
  </td>
97
  <?php _e( "Remove link if the whole post content shown", 'advanced-excerpt' ); ?>
98
  </label><br />
99
  </li>
100
+ <li>
101
+ <label for="link-on-custom-excerpt">
102
+ <input name="link_on_custom_excerpt" type="checkbox" id="link-on-custom-excerpt" value="on" <?php echo ( 1 == $link_on_custom_excerpt ) ? 'checked="checked"' : ''; ?> />
103
+ <?php _e( "Add the link even if a custom excerpt is shown.", 'advanced-excerpt' ); ?>
104
+ </label><br />
105
+ </li>
106
  </ul>
107
 
108
  </td>