asp_index_before_shortcode_execution

Post content filtered before the shortcodes are executed and before they are sent to tokenization.

Use it to initialize custom shortcodes excplicitly, manipulate or to add custom shortcodes or any other content to the given field.

apply_filters('asp_index_before_shortcode_execution', $content, $post);

Parameters

  • $content (string) - post content/excerpt or any other field eligible for shortcode execution

  • $post (WP_Post) - post type object

The return value should always be an string

Sample usage

add_filter( 'asp_index_before_shortcode_execution', 'asp_change_cf_index', 10, 3 );
function asp_change_cf_index( $content, $post ) {
return $content . ' [my_additional_shortcode]';
}