wppaste
WordPress

apply_filters( 'font_dir', array $font_dir )

Since
6.5.0
Filters the fonts directory data.

Description

This filter allows developers to modify the fonts directory data.

Compatibility

WordPress
since 6.5.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Parameters

$font_dirarray
{ Array of information about the font upload directory.
@type string $path Base directory and subdirectory or full path to the fonts upload directory.
@type string $url Base URL and subdirectory or absolute URL to the fonts upload directory.
@type string $subdir Subdirectory @type string $basedir Path without subdir.
@type string $baseurl URL path without subdir.
@type string|false $error False or error message.
}
  • $pathstring

    Base directory and subdirectory or full path to the fonts upload directory.
  • $urlstring

    Base URL and subdirectory or absolute URL to the fonts upload directory.
  • $subdirstring

    Subdirectory @type string $basedir Path without subdir.
  • $baseurlstring

    URL path without subdir.
  • $errorstring|false

    False or error message.

Where this hook fires · 1

  • wp-includes/fonts.php:205_wp_filter_font_directory()

Source code

	 *     @type string       $subdir  Subdirectory	 *     @type string       $basedir Path without subdir.	 *     @type string       $baseurl URL path without subdir.	 *     @type string|false $error   False or error message.	 * }	 */	return apply_filters( 'font_dir', $font_dir );} /** * Deletes child font faces when a font family is deleted. * * @access private

Changelog

Introduced in 6.5.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.