Opened 9 years ago
Closed 5 years ago
#33847 closed enhancement (wontfix)
add_shortcode enhancement request for optional priority
Reported by: | opajaap | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
The request is to add $priority
as argumant to ad_shortcode
so that it will look like:
<?php add_shortcode( $tag, $func, $priority ); ?>
The $priority
argument ( integer ) should be optional and default to the wp system setting, currently being 11.
This will enable plugin writers to decide if the output of $func
will pass through the content filters like wpautop
or not, by setting the priority either lower or higher than 10, hence giving the plugin author the control over this issue without generating possible conflicts with other shortcodes or filters.
This will make an end to the discussion whether to change the do_shortcode() priority, see https://make.wordpress.org/core/2015/09/04/shortcode-roadmap-extended-discussion/#comments
Due to the way that shortcodes are implemented, adding a
$priority
parameter doesn't seem like it's possible, or advisable.