开发者 | samuelaguilera |
---|---|
更新时间 | 2020年4月10日 20:46 |
捐献地址: | 去捐款 |
PHP版本: | 4.0 及以上 |
WordPress版本: | 5.4 |
版权: | GPL2 |
wp-content/plugins/
directory of your WordPress installation (or install it directly from your dashboard) and then activate the plugin from Plugins page.Maybe... But the question is... WTF are you using anything older than that?
Starting from Safe Paste 1.1.7 you can use the filters safepaste_allowed_tags and safepaste_allowed_protocols to add a snippet to your theme functions.php file (or create a child theme). The format used to pass the tags and protocols is the same that uses the wp_kses() function. Examples: `add_filter( 'safepaste_allowed_tags', 'my_custom_tags'); function my_custom_tags( $allowed_tags ) { //Add to allowed tags $allowed_tags['b'] = array(); return $allowed_tags; } add_filter( 'safepaste_allowed_protocols', 'my_custom_protocols'); function my_custom_protocols( $allowed_protocols ) { //Add ftp to allowed protocols $allowed_protocols[] = 'ftp'; return $allowed_protocols; }`
By default only 'post' and 'page' post types are filterd by Safe Paste. But you can use the safepaste_post_types filter to set modify this. 如: `add_filter( 'safepaste_post_types', 'my_custom_post_types'); function my_custom_types( $types_to_filter ) { //Add book post type $types_to_filter[] = 'book'; return $types_to_filter }`