toyomedia
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [WooCommerce] I want to allow html tags on customer note in view-order pageThanks for replying, ManusH.
Unfortunately, it didn’t work for me.I also tried
function my_allowed_html_tags() { define('CUSTOM_TAGS', true); global $allowedtags; $allowedtags = array( 'pre' => array(), 'p' => array(), 'iframe' => array( 'title' => array(), 'line' => array(), 'width' => array(), 'height' => array(), 'frameborder' => array(), 'src' => array(), 'webkitallowfullscreen' => array(), 'mozallowfullscreen' => array(), 'allowfullscreen' => array(), ), ); } add_action('init', 'my_allowed_html_tags', 10);
and instead of ‘init’, tried ‘comment_content’ and ‘comment_post’ and ‘$note’.
But shouldn’t ‘init’ be working everywhere?
Anyway, none of them worked..This is the line that makes customer note work, I guess.
woocommerce/includes/admin/meta-box/class-wc-meta-box-order-notes.php<?php echo wpautop( wptexturize( wp_kses_post( $note->comment_content ) ) ); ?>
Forum: Plugins
In reply to: How to add more tags $allowedtagshttps://davidwalsh.name/wordpress-comment-tags
I tried this
function allow_pres() { global $allowedtags; $allowedtags['iframe'] = array( 'class'=>array(), 'title' => array(), 'line' => array(), 'width' => array(), 'height' => array(), 'frameborder' => array(), 'src' => array(), 'webkitallowfullscreen' => array(), 'mozallowfullscreen' =>array(), 'allowfullscreen' => array() ); } add_action('comment_post', 'allow_pres');
I tried ‘comment_content’ and ‘init’ and ‘$note’ instead of ‘comment_post’ but none of them worked.
Forum: Plugins
In reply to: [WooCommerce] I want to allow html tags on customer note in view-order pageI got temporary solution..
In /wp-content/wp-includes/kses.php file, I added'iframe' => array( 'title' => true, 'line' => true, 'width' => true, 'height' => true, 'frameborder' => true, 'src' => true, 'webkitallowfullscreen' => true, 'mozallowfullscreen' => true, 'allowfullscreen' => true, ),
Is there any way put this function in theme’s function.php instead of doing this in wp core file?
Viewing 3 replies - 1 through 3 (of 3 total)