diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index f0523622cc..3af0e10f58 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -605,7 +605,20 @@ function strip_shortcodes( $content ) { // Find all registered tag names in $content. preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches ); - $tagnames = array_intersect( array_keys( $shortcode_tags ), $matches[1] ); + + $tags_to_remove = array_keys( $shortcode_tags ); + + /** + * Filters the list of shortcode tags to remove from the content. + * + * @since 4.7.0 + * + * @param array $tag_array Array of shortcode tags to remove. + * @param string $content Content shortcodes are being removed from. + */ + $tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content ); + + $tagnames = array_intersect( $tags_to_remove, $matches[1] ); if ( empty( $tagnames ) ) { return $content; diff --git a/wp-includes/version.php b/wp-includes/version.php index 5a8c9b1bec..970f06bfb1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38876'; +$wp_version = '4.7-alpha-38877'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.