Plugin Directory

Changeset 3349833


Ignore:
Timestamp:
08/25/2025 03:08:17 PM (7 months ago)
Author:
sinergodata
Message:

Release version 1.1.1 – improved TOC list in live preview + updated readme

Location:
smarttoc-lite/trunk
Files:
3 edited

Legend:

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

    r3349744 r3349833  
    716716    }
    717717
    718     public function padding_field_html() {
    719     $defaults = array('top'=>10,'right'=>10,'bottom'=>10,'left'=>10);
    720     $raw = get_option('smarttoc_lite_padding', $defaults);
    721     $value = wp_parse_args( (array) $raw, $defaults );
    722     ?>
    723     <div class="smarttoc-padding-fields" style="display:flex; gap:8px; align-items:center; flex-wrap:wrap;">
    724         <label for="smarttoc_padding_top">
    725             <?php esc_html_e('Top', 'smarttoc-lite'); ?>
    726             <input id="smarttoc_padding_top" type="number" name="smarttoc_lite_padding[top]"
    727                    value="<?php echo esc_attr($value['top']); ?>" min="0" style="width:50px;" />
    728         </label>
    729 
    730         <label for="smarttoc_padding_right">
    731             <?php esc_html_e('Right', 'smarttoc-lite'); ?>
    732             <input id="smarttoc_padding_right" type="number" name="smarttoc_lite_padding[right]"
    733                    value="<?php echo esc_attr($value['right']); ?>" min="0" style="width:50px;" />
    734         </label>
    735 
    736         <label for="smarttoc_padding_bottom">
    737             <?php esc_html_e('Bottom', 'smarttoc-lite'); ?>
    738             <input id="smarttoc_padding_bottom" type="number" name="smarttoc_lite_padding[bottom]"
    739                    value="<?php echo esc_attr($value['bottom']); ?>" min="0" style="width:50px;" />
    740         </label>
    741 
    742         <label for="smarttoc_padding_left">
    743             <?php esc_html_e('Left', 'smarttoc-lite'); ?>
    744             <input id="smarttoc_padding_left" type="number" name="smarttoc_lite_padding[left]"
    745                    value="<?php echo esc_attr($value['left']); ?>" min="0" style="width:50px;" />
    746         </label>
    747     </div>
    748     <?php
    749     echo '<span class="smarttoc-info">' .
    750          esc_html__('Adjusts inner spacing for each side of the TOC box.', 'smarttoc-lite') .
    751          '</span>';
    752 }
     718    public function padding_field_html()
     719    {
     720        $defaults = array('top' => 10, 'right' => 10, 'bottom' => 10, 'left' => 10);
     721        $raw = get_option('smarttoc_lite_padding', $defaults);
     722        $value = wp_parse_args((array) $raw, $defaults);
     723        ?>
     724        <div class="smarttoc-padding-fields" style="display:flex; gap:8px; align-items:center; flex-wrap:wrap;">
     725            <label for="smarttoc_padding_top">
     726                <?php esc_html_e('Top', 'smarttoc-lite'); ?>
     727                <input id="smarttoc_padding_top" type="number" name="smarttoc_lite_padding[top]"
     728                    value="<?php echo esc_attr($value['top']); ?>" min="0" style="width:50px;" />
     729            </label>
     730
     731            <label for="smarttoc_padding_right">
     732                <?php esc_html_e('Right', 'smarttoc-lite'); ?>
     733                <input id="smarttoc_padding_right" type="number" name="smarttoc_lite_padding[right]"
     734                    value="<?php echo esc_attr($value['right']); ?>" min="0" style="width:50px;" />
     735            </label>
     736
     737            <label for="smarttoc_padding_bottom">
     738                <?php esc_html_e('Bottom', 'smarttoc-lite'); ?>
     739                <input id="smarttoc_padding_bottom" type="number" name="smarttoc_lite_padding[bottom]"
     740                    value="<?php echo esc_attr($value['bottom']); ?>" min="0" style="width:50px;" />
     741            </label>
     742
     743            <label for="smarttoc_padding_left">
     744                <?php esc_html_e('Left', 'smarttoc-lite'); ?>
     745                <input id="smarttoc_padding_left" type="number" name="smarttoc_lite_padding[left]"
     746                    value="<?php echo esc_attr($value['left']); ?>" min="0" style="width:50px;" />
     747            </label>
     748        </div>
     749        <?php
     750        echo '<span class="smarttoc-info">' .
     751            esc_html__('Adjusts inner spacing for each side of the TOC box.', 'smarttoc-lite') .
     752            '</span>';
     753    }
    753754
    754755
     
    978979                    echo '<div class="smarttoc-list-content">';
    979980                    echo '<ul>';
    980                     echo '<li class="toc-h2"><a href="#">Lorem ipsum dolor</a></li>';
    981                     echo '<li class="toc-h2"><a href="#">Lorem ipsum dolor sit amet</a></li>';
    982                     echo '<li class="toc-h2"><a href="#">Lorem ipsum</a></li>';
    983                     echo '<li class="toc-h2"><a href="#">Lorem ipsum dolor sit</a></li>';
    984                     echo '<li class="toc-h2"><a href="#">Lorem ipsum dolor sit amet</a></li>';
    985                     echo '<li class="toc-h2"><a href="#">Lorem ipsum dolor</a></li>';
     981                    echo '<li class="toc-h2"><a href="#">Automatic TOC generation</a></li>';
     982                    echo '<li class="toc-h2"><a href="#">Visual customization</a></li>';
     983                    echo '<li class="toc-h2"><a href="#">Live preview</a></li>';
     984                    echo '<li class="toc-h2"><a href="#">Expand/Collapse toggle</a></li>';
     985                    echo '<li class="toc-h2"><a href="#">Clean, semantic HTML</a></li>';
     986                    echo '<li class="toc-h2"><a href="#">Shortcode support</a></li>';
     987                    echo '<li class="toc-h2"><a href="#">Custom heading levels (H1–H6)</a></li>';
     988                    echo '<li class="toc-h2"><a href="#">SEO-friendly structure</a></li>';
     989                    echo '<li class="toc-h2"><a href="#">Lightweight & fast loading</a></li>';
    986990                    echo '</ul>';
    987991                    echo '</div>';
  • smarttoc-lite/trunk/readme.txt

    r3349744 r3349833  
    11=== Table of Contents Generator - SmartTOC Lite ===
    22Contributors: sinergodata 
    3 Tags: table of contents, wordpress toc, anchor links, accessibility, seo
     3Tags: table of contents, wordpress toc, block editor, accessibility, seo
    44Requires at least: 5.6 
    55Tested up to: 6.8 
    66Requires PHP: 7.2 
    7 Stable tag: 1.1.0 
     7Stable tag: 1.1.1 
    88License: GPLv2 or later 
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Easily add a clean, accessible Table of Contents to your posts and pages. Includes live preview, shortcode support, custom styles, and more.
     11Create a clean, accessible Table of Contents — fast, customizable, and compatible with any theme or editor.
    1212
    1313== Description ==
    1414
    15 **SmartTOC Lite** automatically creates a SEO-friendly table of contents based on your content's headings (H2, H3, etc.). Works with posts, pages, and custom post types. Helps improve user experience and on-page SEO. Lightweight, fast, and easy to configure.
     15Unlike heavy TOC plugins, **SmartTOC Lite** is lightweight, fast, and built with accessibility in mind. It automatically generates a clean, SEO-friendly table of contents based on your content’s headings (H2, H3, etc.), making it easier for visitors to navigate your posts and pages.
    1616
    17 **Main features include:**
     17SmartTOC Lite works with posts, pages, and custom post types, and is fully compatible with both the block editor (Gutenberg) and the classic editor. By improving content structure and readability, it also helps boost on-page SEO.
    1818
    19 - ✅ Automatic insertion into posts, pages, or custom post types
    20 - 🎨 Full visual customization (fonts, colors, spacing, borders, toggle style, and more)
    21 - 🧪 Live preview inside the admin panel
    22 - ⚙️ Shortcode support: `[smart_toc]`
    23 - 🔠 Custom heading levels (h1–h6)
    24 - 🧭 Expand/Collapse toggle with icon customization
    25 - ♿ Accessibility-first markup and behavior
    26 - 🌐 Clean HTML structure, ready for SEO
     19**Why choose SmartTOC Lite?** 
     20- ⚡ **Lightweight & fast** — built for performance, won’t slow down your site. 
     21- 🔍 **SEO-friendly** — semantic HTML with clean anchor links. 
     22- ♿ **Accessibility-first** — designed to work for all users.
     23- 🎨 **Flexible design options** — customize fonts, colors, borders, and spacing. 
     24- 🧪 **Instant live preview** — see your changes before publishing. 
     25
     26**Key features:** 
     27- ✅ **Automatic TOC insertion** into posts, pages, or custom post types 
     28- 🔠 **Custom heading levels** — choose which headings (H1–H6) to include 
     29- ⚙️ **Shortcode support** — `[smart_toc]` for full manual control 
     30- 🧭 **Expand/Collapse toggle** with multiple display options 
     31- 🧩 **Theme-independent output** — clean, responsive HTML that fits any design
     32- 🖌️ **Visual customization** — adjust fonts, colors, spacing, and more from settings
    2733
    2834**Shortcode example:**
     
    34401. Upload the plugin folder to `/wp-content/plugins/` or install it from the WordPress Plugins screen.
    35412. Activate the plugin through the ‘Plugins’ menu in WordPress.
    36 3. Go to **Settings → SmartTOC Lite** to configure your preferences.
     423. Go to **SmartTOC Lite** to configure your preferences.
    37434. Optionally, use `[smart_toc]` shortcode anywhere you want a manual TOC.
    3844
     
    4854Yes. You can disable it per post using the checkbox in the post editor.
    4955
     56= Does it work with the block editor (Gutenberg)? = 
     57Yes. SmartTOC Lite works seamlessly with both Gutenberg and the classic editor.
     58
     59= Will it slow down my website? =
     60No. The plugin is lightweight, uses clean HTML/CSS, and adds minimal overhead.
     61
     62= Can I customize the styles? =
     63Yes. You can change fonts, colors, borders, spacing and more directly from the settings.
     64
     65= Is it SEO-friendly? =
     66Yes. The TOC is generated with semantic HTML and anchor links that help search engines better understand your content.
     67
    5068== Screenshots ==
    5169
     
    5573
    5674== Changelog ==
     75
     76= 1.1.1 =
     77* Update: improved TOC list in live preview
    5778
    5879= 1.1.0 =
     
    7596== Upgrade Notice ==
    7697
     98= 1.1.1 =
     99* Update: improved TOC list in live preview
     100
    77101= 1.1.0 =
    78102* Per-side padding replaces the single padding option; old numeric values migrate automatically.
  • smarttoc-lite/trunk/smarttoc-lite.php

    r3349744 r3349833  
    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.0
     6 * Version: 1.1.1
    77 * Author: SinergoData
    88 * Author URI: https://sinergodata.com/
     
    2626         * Plugin version.
    2727         */
    28         const VERSION = '1.1.0';
     28        const VERSION = '1.1.1';
    2929
    3030        /**
Note: See TracChangeset for help on using the changeset viewer.