Skip to content

Instantly share code, notes, and snippets.

@manutheblacker
Forked from kailoon/translation.php
Created October 18, 2022 14:04
Show Gist options
  • Save manutheblacker/10ea691857a64b94436725d17c15593b to your computer and use it in GitHub Desktop.
Save manutheblacker/10ea691857a64b94436725d17c15593b to your computer and use it in GitHub Desktop.

Revisions

  1. @kailoon kailoon revised this gist Aug 15, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion translation.php
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    <?php
    /**
    * Please escape all translations with
    * Escape all translations with
    */

    __( ‘Some String’, ‘text-domain’ ); _e( ‘Some string’, ‘text-domain’ );.
  2. @kailoon kailoon created this gist Aug 15, 2015.
    16 changes: 16 additions & 0 deletions translation.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?php
    /**
    * Please 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 );