Forked from emiluzelac/gist:32d53ab85c05cda846ad61590588a7bb
Created
November 30, 2017 06:40
-
-
Save stalukder03/b203a8faae0a97ce94f2f271cd6cfa7b to your computer and use it in GitHub Desktop.
Escape translated strings
This file contains 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
/** | |
* Escape translated strings with: | |
*/ | |
__( ‘Hello world’, ‘text-domain’ ); _e( ‘Hello world’, ‘text-domain’ );. | |
/** | |
* If there is no HTML use: | |
*/ | |
esc_html__( ‘Hello world’, ‘text-domain’ ); esc_html_e( ‘Hello world’, ‘text-domain’ ); | |
/** | |
* When there's some HTML use: | |
*/ | |
wp_kses( __( ‘Hello world’, ‘text-domain’ ), $allowed_html_array ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment