font_dir хук-фильтрWP 6.5.0

Filters the fonts directory data.

This filter allows developers to modify the fonts directory data.

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

add_filter( 'font_dir', 'wp_kama_font_dir_filter' );

/**
 * Function for `font_dir` filter-hook.
 * 
 * @param array $font_dir Array of information about the font upload directory.
 *
 * @return array
 */
function wp_kama_font_dir_filter( $font_dir ){
	// filter...
	return $font_dir;
}
$font_dir(массив)

Array of information about the font upload directory.

  • path(строка)
    Base directory and subdirectory or full path to the fonts upload directory.

  • url(строка)
    Base URL and subdirectory or absolute URL to the fonts upload directory.

  • subdir(строка)
    Subdirectory

  • basedir(строка)
    Path without subdir.

  • baseurl(строка)
    URL path without subdir.

  • error(строка|false)
    False or error message.

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

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

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

_wp_filter_font_directory()
font_dir
wp-includes/fonts.php 205
return apply_filters( 'font_dir', $font_dir );

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

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