Plugin Directory

Changeset 3087160


Ignore:
Timestamp:
05/15/2024 12:57:15 PM (23 months ago)
Author:
thangnv27
Message:

Fix bug post_excerpt

Location:
wp-multitasking/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-multitasking/trunk/includes/shortcodes.php

    r3014307 r3087160  
    1616    add_filter('get_the_title', array(&$this, 'custom_get_the_title'));
    1717    add_filter('the_excerpt', array(&$this, 'custom_excerpt_shortcode'));
    18     add_filter('get_the_excerpt', array(&$this, 'custom_excerpt_shortcode'));
     18    add_filter('get_the_excerpt', array(&$this, 'custom_get_excerpt_shortcode'));
    1919    add_filter('rank_math/frontend/title', array(&$this, 'custom_seo_title'));
    2020    add_filter('rank_math/frontend/description', array(&$this, 'custom_seo_description'));
     
    107107  # Custom excerpt output
    108108  /* ----------------------------------------------------------------------------------- */
    109   function custom_excerpt_shortcode() {
    110     global $post;
    111     $excerpt = $post->post_excerpt;
     109  function custom_excerpt_shortcode($excerpt) {
     110    // global $post;
     111    // $excerpt = $post->post_excerpt;
     112    if (!empty($excerpt)) {
     113      $excerpt = do_shortcode($excerpt);
     114    }
     115    $excerpt = strip_tags($excerpt);
     116    return $excerpt;
     117  }
     118  function custom_get_excerpt_shortcode($excerpt, $post = null) {
     119    if ($post) {
     120      $excerpt = $post->post_excerpt;
     121    }
    112122    if (!empty($excerpt)) {
    113123      $excerpt = do_shortcode($excerpt);
  • wp-multitasking/trunk/readme.txt

    r3027625 r3087160  
    55Requires at least: 2.1.0
    66Tested up to: 6.4.2
    7 Stable tag: 0.1.11
     7Stable tag: 0.1.12
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8484== Changelog ==
    8585
     86= 0.1.12 =
     87* Fix bug post excerpt
     88
    8689= 0.1.11 =
    8790* Exclude post type is not viewable
  • wp-multitasking/trunk/wp-multitasking.php

    r3027625 r3087160  
    44Plugin URI:  http://wordpress.org/plugins/wp-multitasking/
    55Description: This plugin is synthetic utility for your WordPress site: Shortcode, BBCode, AddQuickTag, Exit pop-up, Welcome pop-up, Remove base slug, SMTP, Classic Editor, Classic widgets...
    6 Version:     0.1.11
     6Version:     0.1.12
    77Author:      thangnv27
    88Author URI:  https://ngothang.me/
Note: See TracChangeset for help on using the changeset viewer.