wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



_wp_translate_php_url_constant_to_key › WordPress Function

Da4.7.0
Deprecaton/a
_wp_translate_php_url_constant_to_key ( $constant )
Accedi:
  • private
Parametri:
  • (int) $constant PHP_URL_* constant.
    Richiesto:
Links:
Ritorna:
  • (string|false) The named key or false.
Definito a:
Codex:

Translate a PHP_URL_* constant to the named array keys PHP uses.



Sorgenti

function _wp_translate_php_url_constant_to_key( $constant ) {
	$translation = array(
		PHP_URL_SCHEME   => 'scheme',
		PHP_URL_HOST     => 'host',
		PHP_URL_PORT     => 'port',
		PHP_URL_USER     => 'user',
		PHP_URL_PASS     => 'pass',
		PHP_URL_PATH     => 'path',
		PHP_URL_QUERY    => 'query',
		PHP_URL_FRAGMENT => 'fragment',
	);

	if ( isset( $translation[ $constant ] ) ) {
		return $translation[ $constant ];
	} else {
		return false;
	}
}