strip_shortcodes_tagnames
Filters the list of shortcode tags to remove from the content.
Использование
add_filter( 'strip_shortcodes_tagnames', 'wp_kama_strip_shortcodes_tagnames_filter', 10, 2 ); /** * Function for `strip_shortcodes_tagnames` filter-hook. * * @param array $tags_to_remove Array of shortcode tags to remove. * @param string $content Content shortcodes are being removed from. * * @return array */ function wp_kama_strip_shortcodes_tagnames_filter( $tags_to_remove, $content ){ // filter... return $tags_to_remove; }
- $tags_to_remove(массив)
- Array of shortcode tags to remove.
- $content(строка)
- Content shortcodes are being removed from.
Список изменений
С версии 4.7.0 | Введена. |
Где вызывается хук
strip_shortcodes_tagnames
wp-includes/shortcodes.php 730
$tags_to_remove = apply_filters( 'strip_shortcodes_tagnames', $tags_to_remove, $content );