Descrizione
Un plugin potente ma intuitivo che crea automaticamente un indice o sommario (sommario) specifico per pagine lunghe (e tipi di post personalizzati). Più di un semplice plugin per il sommario, questo plugin può anche generare una mappa del sito che elenca pagine e/o categorie nell’intero sito.
Costruito da zero e con Wikipedia in mente, il sommario per impostazione predefinita viene visualizzato prima del primo titolo di una pagina. Ciò consente all’autore di inserire contenuti introduttivi che possono riassumere o introdurre il resto della pagina. Utilizza anche uno schema di numerazione univoco che non si perde a causa delle differenze CSS tra i temi.
This plugin is a great companion for content rich sites such as content management system oriented configurations. That said, bloggers also have the same benefits when writing long structured articles.
Include un pannello delle opzioni di amministrazione in cui è possibile personalizzare impostazioni come la posizione di visualizzazione, definire il numero minimo di intestazioni prima che venga visualizzato un indice, altre personalizzazioni etc. Per gli utenti esperti, espandere le opzioni avanzate per modificare ulteriormente il suo comportamento – ad esempio: escludere livelli di intestazione indesiderati come h5 e h6 dall’inclusione; disabilitare l’output del file CSS incluso; regolare l’offset superiore e altro ancora. Utilizzando gli shortcode, puoi sovrascrivere il comportamento predefinito come esclusioni speciali su una pagina specifica o persino nascondere del tutto il sommario.
Preferisci includere l’indice nella barra laterale? Vai in Aspetto > Widget e trascina TOC+ nella barra di tuo interesse.
I tipi di post personalizzati sono supportati, tuttavia, l’inserimento automatico funziona solo quando the_content () è stato utilizzato dal tipo di post personalizzato. Ogni tipo di post apparirà nel pannello delle opzioni, quindi abilita quelli che desideri.
Collaborate, participate, fork this plugin on Github.
Shortcode
Il plugin è stato progettato per essere il più semplice e indolore possibile e non richiedeva l’inserimento di uno shortcode per il funzionamento. Tuttavia, l’utilizzo di uno shortcode ti consente di controllare completamente la posizione del sommario all’interno della tua pagina. I seguenti shortcode sono disponibili con questo plugin.
Quando gli attributi vengono tralasciati per gli shortcode seguenti, torneranno alle impostazioni definite in Impostazioni > TOC+. Quanto segue è spiegato nella scheda di aiuto.
[toc]
Lets you generate the table of contents at the preferred position. Useful for sites that only require a TOC on a small handful of pages. Supports the following attributes:
- “label”: text, title of the table of contents
- “no_label”: true/false, shows or hides the title
- “wrapping”: text, either “left” or “right”
- “heading_levels”: numbers, this lets you select the heading levels you want included in the table of contents. Separate multiple levels with a comma. Example: include headings 3, 4 and 5 but exclude the others with
heading_levels="3,4,5"
- “class”: text, enter CSS classes to be added to the container. Separate multiple classes with a space.
- “start”: number, show when this number of headings are present in the content.
[no_toc]
Ti consente di disabilitare il sommario per l’articolo corrente, la pagina o il tipo di post personalizzato.
[sitemap]
Produce un elenco di tutte le pagine e categorie per il tuo sito. Puoi usarlo su qualsiasi articolo, pagina o anche in un widget di testo. Nota che questo non includerà un indice degli articoli, quindi usa sitemap_posts se hai bisogno di questo elenco.
[sitemap_pages]
Lets you print out a listing of only pages. The following attributes are accepted:
- “heading”: number between 1 and 6, defines which html heading to use
- “label”: text, title of the list
- “no_label”: true/false, shows or hides the list heading
- “exclude”: IDs of the pages or categories you wish to exclude
- “exclude_tree”: ID of the page or category you wish to exclude including its all descendants
- “child_of”: “current” or page ID of the parent page. Defaults to 0 which includes all pages.
[sitemap_categories]
Lo stesso di [sitemap_pages]
ma per le categorie.
[sitemap_posts]
This lets you print out an index of all published posts on your site. By default, posts are listed in alphabetical order grouped by their first letters. The following attributes are accepted:
- “order”: text, either ASC or DESC
- “orderby”: text, popular options include “title”, “date”, “ID”, and “rand”. See WP_Query for a list.
- “separate”: true/false (defaults to true), does not separate the lists by first letter when set to false.
Use the following CSS classes to customise the appearance of your listing:
- toc_sitemap_posts_section
- toc_sitemap_posts_letter
- toc_sitemap_posts_list
Credits
This plugin was created and maintained for many years by conjur3r. We are grateful for all the hard work he put in and we are excited to continue to build on that!
Screenshot
Installazione
Si applica il normale processo di installazione del plugin, ovvero la ricerca di table of contents plus
dalla schermata del plugin o tramite il metodo manuale:
- Carica la cartella
table-of-contents-plus
nella directory/wp-content/plugins/
- Attiva il plugin attraverso il menu ‘Plugin’ di WordPress
Questo è tutto! Il sommario apparirà nelle pagine con almeno quattro o più titoli.
Puoi modificare le impostazioni predefinite e altro in Impostazioni > TOC+
Recensioni
Contributi e sviluppo
“Table of Contents Plus” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.
Collaboratori“Table of Contents Plus” è stato tradotto in 25 lingue. Grazie ai traduttori per i loro contributi.
Traduci “Table of Contents Plus” nella tua lingua.
Ti interessa lo sviluppo?
Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.
Changelog
2411.1
- Released: 21 November 2024
- Security hardening reported by WPScan
2411
- Released: 14 November 2024
- Security hardening reported by Patchstack
- Plugin updates for compatibility with Plugin Check
2408
- Released: 14 August 2024
- Redo XSS issue reported by wpscan
2406
- Released: 16 June 2024
- Revert ‘Do not output CSS/JS on pages not eligible’ introduced in 2402 as it broke some clever edge cases
- Fixed XSS issue requiring editor or higher privileges for show/hide text (thanks to wpscan)
2402.1
- Released: 22 February 2024
- Fixed check for shortcode use (#164)
2402
- Released: 21 February 2024
- Added option to generate TOC in REST requests, disabled by default (props ballpumpe)
- Composer improvements (props mohjak)
- Do not output CSS/JS on pages not eligible
- Update POT translation file
- Update links to help
2311
- Released: 7 November 2023
- Bump tested WordPress version to 6.4
- Do not trigger on REST requests (props steffenster)
- Update include mechanism in init.php (props maciejmackowiak)
2309
- Released: 19 September 2023
- Bump tested version to 6.3.1
- Added
child_of
property to sitemap_pages shortcode (props flagsoft). This lets you output a listing of child pages for a set parent or “current”. Property is optional and defaults to all pages. - Fixed XSS possibility handling nonce while saving options (thanks to Patchstack)
- Updated WordPress Coding Standard to 3.0
2302
- Released: 9 February 2023
- Added
toc_brackets
CSS class to square brackets around show/hide text - Added a filter to the
toc_extract_headings
function (props Raymond Radet) - Refactor using WordPress-Extra coding standard
2212
- Released: 16 December 2022
- Bump tested version to 6.1.1
- When using the TOC+ widget, execute shortcodes beforehand (props endcoreCL)
- When using the TOC+ widget, abort early when no post for edge cases (props jonas-hoebenreich)
- Add start property to toc shortcode to override the minimum number of headings needed to display (props woutervanvliet)
- Add no_numbers property to toc shortcode to disable leading heading indexes (props TedAvery)
- Fixed XSS vulnerability in toc shortcode, class property (thanks to wpscan)
- Fixed XSS vulnerabilities in sitemap_pages and sitemap_categories shortcodes, label property
2106
- Released: 23 June 2021
- Add compatibility with Rank Math SEO
- Bump tested WordPress version to 5.7
- Add PHP coding style
- Adhere to majority of coding tips
2002
- Rilasciato: 9 febbraio 2020
- Codifica fissa durante l’utilizzo %PAGE_TITLE% o %PAGE_NAME%
- Bump tested WordPress version to 5.3
- Rimosse tutte le traduzioni locali in quanto puoi trovare altre più aggiornate su translate.wordpress.org
- Rimossi i collegamenti ai traduttori dal file readme
1601
- Data di rilascio: 5 gennaio 2016
- Bump testato nella versione di WordPress 4.4
- Aggiungi le funzioni API ‘abilita’ e ‘disabilita’ in modo che uno sviluppatore possa controllare meglio l’esecuzione.
- Aggiunta la traduzione in portoghese brasiliano grazie a Blog de Niterói
- Aggiunta la traduzione in spagnolo grazie a David Saiz
- TOC+ widget ora aderisce a un titolo vuoto se non ne viene fornito nessuno. Grazie a Dirk per la tips.
- Aggiornato jQuery Smooth Scroll da 1.5.5 a 1.6.0
- Dominio di testo aggiornato per supportare meglio i pacchetti di traduzione.
1509
- Released: 4 September 2015
- Aggiunta la traduzione in ebraico grazie ad Ahrale
- Aggiunta la traduzione in giapponese grazie a Shikamaru シカマル
- Aggiunta la traduzione greca grazie a Dimitrios Kaisaris
- Updated jQuery Smooth Scroll 1.4.10 to 1.5.5
- Supply both minified and unminified CSS and JS files, use minified versions.
- Convert accented characters to ASCII in anchors.
- Bump tested WordPress version to 4.3
- Fixed: PHP notice introduced in WP 4.3
- Fixed: javascript error with $.browser testing for Internet Explorer 7.
- Plugin has moved to GitHub for better collaboration.
- Help needed: preg_match_all failing with bad UTF8 characters producing no TOC. If you can help, please participate in this issue.
1507
- Released: 5 July 2015
- Aggiunta traduzione in danese per gentile concessione di Cupunu
- Simplified the translation duty by moving the help material to the plugin’s website.
- Updated translation file.
1505
- Rilasciato il: 2 maggio 2015
- Huge thanks to Jason for an updated Simplified Chinese translation.
- Added collapse property to the toc shortcode. When set to true, this will hide the table of contents when it loads. Example usage: [toc collapse=”true”]
- Added label_show and label_hide properties to the toc shortcode. This lets you change the “show” and “hide” link text when using the shortcode.
- Bump tested WordPress version to 4.2.1.
1408
- Released: 1 August 2014
- Aggiunta una traduzione in tedesco per gentile concessione di Ben
- Added “class” attribute to the TOC shortcode to allow for custom CSS classes to be added to the container. Thanks to Joe for suggesting it
1407
- Released: 5 July 2014
- Aggiunta traduzione ucraina per gentile concessione di Michael Yunat
- Added French translation courtesy Jean-Michel Duriez
- Empty headings are now ignored, as suggested by archon810
- Removed German translation, may have been machine translated, ref
- Fixed: Special chars in TOC+ > Settings > Exclude Headings no longer get mangled on save. Thanks to N-Z for reporting it.
1404
- Released: 18 April 2014
- Bump WordPress support to 3.9
- Fixed: Strip HTML tags from post titles for sitemap_posts so those items do not appear under a < heading. Thanks to Rose for reporting it.
- Fictitious: This release was powered by three blind mice.
1402
- Released: 19 February 2014
- Added German translation courtesy Cord Peter
- Modify toc_get_index API function to also reset minimum number of headings to 0.
- Removing the TOC+ widget from the sidebar no longer requires you to uncheck the ‘Show the table of contents only in the sidebar’ option. It will be reset on removal.
- Delay count of headings until disqualified have been removed. Thanks to Simone di Saintjust for raising it.
- Using the TOC+ widget, you can now limit the display to selected post types. Thanks to Pete Markovic for the idea.
- Updated translation file (extra options added).
1311
- Released: 10 November 2013
- Added third parameter to toc_get_index API function to enable eligibility check (eg apply minimum heading check, is post type enabled, etc). This has been switched off by default and only affects those using the API. Thanks Jonon for your comment.
- Aggiunta la traduzione olandese per gentile concessione di Renee
- Apply bullet option to TOC+ widget, thanks to Thomas Pani for the patch.
1308
- Released: 5 August 2013
- Fix javascript issue with minimum jQuery version check (broke smooth scrolling using WordPress 3.6).
- Replaced Slovak translation with a human translated version courtesy Boris Gereg.
- Remove signature from source when using the shortcode but not allowed to print (eg on homepage).
- Add “separate” attribute for sitemap_posts shortcode to not split by letter, thanks DavidMjps for the suggestion.
1303.1
- Released: 22 March 2013
- Novità: aggiunta traduzione polacca, grazie Jakub
- Fixed: an issue in 1303 that ignored headings with the opening tag on the first line and the heading text on a new line. Thanks to richardsng for the quick discovery.