Created
February 2, 2017 16:04
-
-
Save titomus/f0a8cf50d6a44f7ef43fb67ca939c8c0 to your computer and use it in GitHub Desktop.
Autoriser les shortcodes dans les tags html (pour les formulaires)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| #shortcode dans input form | |
| add_filter( 'wp_kses_allowed_html', 'allow_tag_in_input', 10, 2 ); | |
| function allow_tag_in_input( $allowedposttags, $context ) { | |
| if ( $context == 'post' ) { | |
| $allowedposttags['input']['value'] = 1; | |
| } | |
| return $allowedposttags; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment