Plugin Directory

Changeset 3358628


Ignore:
Timestamp:
09/09/2025 01:14:38 PM (7 months ago)
Author:
sinergodata
Message:

Release 1.1.2: Fix TOC showing in excerpts

Location:
smarttoc-lite/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • smarttoc-lite/trunk/includes/class-smarttoc-lite.php

    r3349744 r3358628  
    198198    public function inject_toc_into_content($content)
    199199    {
    200         if (!is_singular()) {
     200        $queried_id = function_exists('get_queried_object_id') ? (int) get_queried_object_id() : 0;
     201        $current_id = get_the_ID();
     202        if (!is_singular() || !is_main_query() || !$current_id || ($queried_id && $current_id !== $queried_id) || is_feed() || (function_exists('is_rest') && is_rest())) {
    201203            return $content;
    202204        }
    203 
    204         if (!is_main_query() || is_feed() || (function_exists('is_rest') && is_rest())) {
    205             return $content;
    206         }
    207 
    208205        if (has_shortcode($content, 'smart_toc')) {
    209206            return $content;
  • smarttoc-lite/trunk/readme.txt

    r3349833 r3358628  
    55Tested up to: 6.8 
    66Requires PHP: 7.2 
    7 Stable tag: 1.1.1 
     7Stable tag: 1.1.2 
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7474== Changelog ==
    7575
     76= 1.1.2 =
     77* Fix: TOC no longer appears in excerpts.
     78
    7679= 1.1.1 =
    7780* Update: improved TOC list in live preview
     
    9699== Upgrade Notice ==
    97100
     101= 1.1.2 =
     102* Fixes TOC showing in excerpts.
     103
    98104= 1.1.1 =
    99105* Update: improved TOC list in live preview
  • smarttoc-lite/trunk/smarttoc-lite.php

    r3349833 r3358628  
    44 * Plugin URI: https://wordpress.org/plugins/smarttoc-lite/
    55 * Description: Create a responsive Table of Contents (TOC) for WordPress posts and pages. Features include automatic insertion, customizable styles, live preview, shortcode support, and accessibility.
    6  * Version: 1.1.1
     6 * Version: 1.1.2
    77 * Author: SinergoData
    88 * Author URI: https://sinergodata.com/
     
    2626         * Plugin version.
    2727         */
    28         const VERSION = '1.1.1';
     28        const VERSION = '1.1.2';
    2929
    3030        /**
Note: See TracChangeset for help on using the changeset viewer.