WPDev.one
Core PHP Functions

Functions Reference

4125+ PHP functions available in the WordPress global namespace. Complete documentation with parameters, return values, and usage examples.

Showing 3501 to 3550 of 4125 functions (Page 71 of 83)
set_current_user()

Changes the current user by ID or name.

$id $name
get_currentuserinfo()

Populate global variables with information about the currently logged in user.

get_userdatabylogin()

Retrieve user info by login name.

$user_login
get_user_by_email()

Retrieve user info by email.

$email
wp_setcookie()

Sets a cookie for a user who just logged in. This function is deprecated.

$username $password $already_md5 +3 more
wp_clearcookie()

Clears the authentication cookie, logging the user out. This function is deprecated.

wp_get_cookie_login()

Gets the user cookie login. This function is deprecated.

wp_login()

Checks a users login information and logs them in if it checks out. This function is deprecated.

$username $password $deprecated
register_block_pattern_category()

Registers a new pattern category.

$category_name $category_properties
unregister_block_pattern_category()

Unregisters a pattern category.

$category_name
get_locale()

Retrieves the current locale.

get_user_locale()

Retrieves the locale of a user.

$user
determine_locale()

Determines the current locale desired for the request.

translate()

Retrieves the translation of $text.

$text $domain
before_last_bar()

Removes last item on a pipe-delimited string.

$text
translate_with_gettext_context()

Retrieves the translation of $text in the context defined in $context.

$text $context $domain
__()

Retrieves the translation of $text.

$text $domain
esc_attr__()

Retrieves the translation of $text and escapes it for safe use in an attribute.

$text $domain
esc_html__()

Retrieves the translation of $text and escapes it for safe use in HTML output.

$text $domain
_e()

Displays translated text.

$text $domain
esc_attr_e()

Displays translated text that has been escaped for safe use in an attribute.

$text $domain
esc_html_e()

Displays translated text that has been escaped for safe use in HTML output.

$text $domain
_x()

Retrieves translated string with gettext context.

$text $context $domain
_ex()

Displays translated string with gettext context.

$text $context $domain
esc_attr_x()

Translates string with gettext context, and escapes it for safe use in an attribute.

$text $context $domain
esc_html_x()

Translates string with gettext context, and escapes it for safe use in HTML output.

$text $context $domain
_n()

Translates and retrieves the singular or plural form based on the supplied number.

$single $plural $number +1 more
_nx()

Translates and retrieves the singular or plural form based on the supplied number, with gettext context.

$single $plural $number +2 more
_n_noop()

Registers plural strings in POT file, but does not translate them.

$singular $plural $domain
_nx_noop()

Registers plural strings with gettext context in POT file, but does not translate them.

$singular $plural $context +1 more
translate_nooped_plural()

Translates and returns the singular or plural form of a string that's been registered

$nooped_plural $count $domain
load_textdomain()

Loads a .mo file into the text domain $domain.

$domain $mofile $locale
unload_textdomain()

Unloads translations for a text domain.

$domain $reloadable
load_default_textdomain()

Loads default translated strings based on locale.

$locale
load_plugin_textdomain()

Loads a plugin's translated strings.

$domain $deprecated $plugin_rel_path
load_muplugin_textdomain()

Loads the translated strings for a plugin residing in the mu-plugins directory.

$domain $mu_plugin_rel_path
load_theme_textdomain()

Loads the theme's translated strings.

$domain $path
load_child_theme_textdomain()

Loads the child theme's translated strings.

$domain $path
load_script_textdomain()

Loads the script translated strings.

$handle $domain $path
load_script_translations()

Loads the translation data for the given script handle and text domain.

$file $handle $domain
_load_textdomain_just_in_time()

Loads plugin and theme text domains just-in-time.

$domain
get_translations_for_domain()

Returns the Translations instance for a text domain.

$domain
is_textdomain_loaded()

Determines whether there are translations for the text domain.

$domain
translate_user_role()

Translates role name.

$name $domain
get_available_languages()

Gets all available languages based on the presence of *.mo and *.l10n.php files in a given directory.

$dir
wp_get_installed_translations()

Gets installed translations.

$type
wp_get_pomo_file_data()

Extracts headers from a PO file.

$po_file
wp_get_l10n_php_file_data()

Extracts headers from a PHP translation file.

$php_file
wp_dropdown_languages()

Displays or returns a Language selector.

$args
is_rtl()

Determines whether the current locale is right-to-left (RTL).