WPIntell

Source evidence

Filter shortcode presets

Shortcode Table of Contents · review · 2018-10-28T16:50:00+00:00

praisesentiment
mediumseverity
0.38relevance
0replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

6 / 16 rows with source links

37.5% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

10 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

review · 5 stars
nenontwerp unresolved
Great simple plugin! There are no filters available to set shortcode defaults. My clients dont know the right class names to set the parameter ‘content’. So if you want to set the default class for ‘content’ or set the default set of headers, use filter ‘shortcode_atts_{shortcode}’. This way you the shortcode get much cleaner like ‘[toc]’. If the parameters in the shortcode are set, the default are over ruled. Filter like: add_action('shortcode_atts_toc','nen_shortcode_atts_toc'); function nen_shortcode_atts_toc( $out ) { if( isset( $out['content'] ) && empty( $out['content'] ) ) $out['content'] = '.entry-content'; if( isset( $out['headers'] ) && $out['headers'] == 'h1, h2, h3, h4, h5, h6' ) $out['headers'] = 'h2, h3, h4'; return $out; } Hopefully James Kemp can apply a filter to add custom content before and/or after the div ‘shortcode-toc’. This way we can add a custom toc-header or something. Thanx! This topic was modified 7 years, 7 months ago by nenontwerp .

Comments

0 shown

No comments were stored for this source.