plugins_url хук-фильтрWP 2.8.0

Filters the URL to the plugins directory.

Использование

add_filter( 'plugins_url', 'wp_kama_plugins_url_filter', 10, 3 );

/**
 * Function for `plugins_url` filter-hook.
 * 
 * @param string $url    The complete URL to the plugins directory including scheme and path.
 * @param string $path   Path relative to the URL to the plugins directory. Blank string if no path is specified.
 * @param string $plugin The plugin file path to be relative to. Blank string if no plugin is specified.
 *
 * @return string
 */
function wp_kama_plugins_url_filter( $url, $path, $plugin ){

	// filter...
	return $url;
}
$url(строка)
The complete URL to the plugins directory including scheme and path.
$path(строка)
Path relative to the URL to the plugins directory. Blank string if no path is specified.
$plugin(строка)
The plugin file path to be relative to. Blank string if no plugin is specified.

Список изменений

С версии 2.8.0 Введена.

Где вызывается хук

plugins_url()
plugins_url
wp-includes/link-template.php 3712
return apply_filters( 'plugins_url', $url, $path, $plugin );

Где используется хук в WordPress

Использование не найдено.