wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



_wp_translate_php_url_constant_to_key › WordPress Function

Od4.7.0
Przestarzałyn/a
› _wp_translate_php_url_constant_to_key ( $constant )
Dostęp:
  • private
Parametry:
  • (int) $constant PHP_URL_* constant.
    Wymagane: Tak
Linki:
Powrót:
  • (string|false) The named key or false.
Zdefiniowane na:
Codex:

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



Źródło

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',
	);

	return $translation[ $constant ] ?? false;
}