File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -271,6 +271,10 @@ function add_ids_to_blocks( $content ) {
271271 * @return bool The filtered value.
272272 */
273273 $ skip_in_wrapper = apply_filters ( 'simpletoc_skip_in_wrapper ' , true );
274+ if ( strpos ( $ tag_classes , 'simpletoc-include ' ) !== false ) {
275+ // If someone has added the simpletoc-include class, then don't skip it, regardless of wrapper.
276+ $ skip_in_wrapper = false ;
277+ }
274278 if ( $ skip_in_wrapper ) {
275279 // Try to get parent tag.
276280 $ parent_tag = $ tag ->parentNode ;
@@ -430,6 +434,10 @@ function filter_headings( $content ) {
430434 * @return bool The filtered value.
431435 */
432436 $ skip_in_wrapper = apply_filters ( 'simpletoc_skip_in_wrapper ' , true );
437+ if ( strpos ( $ tag_classes , 'simpletoc-include ' ) !== false ) {
438+ // If someone has added the simpletoc-include class, then don't skip it, regardless of wrapper.
439+ $ skip_in_wrapper = false ;
440+ }
433441 if ( $ skip_in_wrapper ) {
434442 // Try to get parent tag.
435443 $ parent_tag = $ tag ->parentNode ;
You can’t perform that action at this time.
0 commit comments