Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*global $allowedposttags;
- $allowedposttags['script'] = array(
- 'type' => array(),
- 'src' => array()
- );*/
- //disable WordPress sanitization to allow more than just $allowedtags from /wp-includes/kses.php
- //remove_filter('the_content', 'wp_filter_kses');
- //add sanitization for WordPress posts
- //add_filter( 'the_content', 'wp_filter_post_kses');
- function disable_kses_content() {
- remove_filter('content_save_pre', 'wp_filter_post_kses');
- }
- add_action('init','disable_kses_content',20);
- // OR
- // Remove html prevent filtering
- kses_remove_filters();
- /*function override_mce_options($initArray) {
- $opts = '*[*]';
- $initArray['valid_elements'] = $opts;
- $initArray['extended_valid_elements'] = $opts;
- return $initArray;
- }
- add_filter('tiny_mce_before_init', 'override_mce_options');
- */
- /*function change_mce_options($initArray) {
- $initArray['verify_html'] = false;
- $initArray['cleanup_on_startup'] = false;
- $initArray['cleanup'] = false;
- $initArray['forced_root_block'] = false;
- $initArray['validate_children'] = false;
- $initArray['remove_redundant_brs'] = false;
- $initArray['remove_linebreaks'] = false;
- $initArray['force_p_newlines'] = false;
- $initArray['force_br_newlines'] = false;
- $initArray['fix_table_elements'] = false;
- $initArray['entities'] = '*[*]';
- return $initArray;
- }
- add_filter('tiny_mce_before_init', 'change_mce_options');*/
- /*function allow_data_event_content() {
- global $allowedposttags, $allowedtags;
- $newattribute = "data-event";
- $allowedposttags["a"][$newattribute] = true;
- $allowedtags["a"][$newattribute] = true;
- }
- add_action( 'init', 'allow_data_event_content' );*/
Add Comment
Please, Sign In to add comment