Skip to content

Instantly share code, notes, and snippets.

@alispx
Created January 3, 2016 02:48
Show Gist options
  • Save alispx/b91a4a8f700fbf8ef1a2 to your computer and use it in GitHub Desktop.
Save alispx/b91a4a8f700fbf8ef1a2 to your computer and use it in GitHub Desktop.
<?php
/**
* Escape all translations with
*/
__( ‘Some String’, ‘text-domain’ ); _e( ‘Some string’, ‘text-domain’ );.
/**
* When there is no HTML use:
*/
esc_html__( ‘Some String’, ‘text-domain’ ); esc_html_e( ‘Some String’, ‘text-domain’ );
/**
* For some HTML:
*/
wp_kses( __( ‘Some String something’, ‘text-domain’ ), $allowed_html_array );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment