Validate::whitelist_shortcodes( array $m )
Description #
Whitelist shortcodes in content.
Parameters #
- $marray (Required) Preg matches.
Source #
File: lib/class-validate.php
private static function whitelist_shortcodes( $m ) {
/**
* Filter for overriding allowed shortcodes.
*
* @since 4.1.8
*/
$allowed_shortcodes = apply_filters( 'ap_allowed_shortcodes', array() );
// if not allowed shortcode then change square brackets.
if ( ! in_array( $m[2], $allowed_shortcodes, true ) ) {
return ap_replace_square_bracket( $m[0] );
}
return $m[0];
}
Expand full source code Collapse full source code View on GitHub: lib/class-validate.php:214
Add your comment