Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the function _($string) do in PHP?

Tags:

php

wordpress

I noticed this piece of code in Wordpress 2.9.1 (/wp-includes/compat.php), I don't understand it:

if ( !function_exists('_') ) {
  function _($string) {
    return $string;
  }
}

It seems that PHP indeed has a function _($string) but I can't find the documentation for it.

like image 935
Michiel van Oosterhout Avatar asked Feb 03 '10 22:02

Michiel van Oosterhout


1 Answers

It is an alias for gettext()

like image 115
AJ. Avatar answered Nov 15 '22 17:11

AJ.