Skip to content

Commit

Permalink
Document use of filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Mar 21, 2024
1 parent 22764e3 commit cf211ae
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/wp-includes/fonts.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,19 @@ function wp_font_dir( $create_dir = true ) {
/**
* Returns the font directory for use by the font library.
*
* This function is a callback for the 'upload_dir' filter. It is used not
* This function is a callback for the {@see 'upload_dir'} filter. It is not
* intended to be called directly. Use wp_get_font_dir() instead.
*
* The function can be used when extending the font library to modify the upload
* destination for font files via the upload_dir filter. The recommended way to
* do this is:
*
* ```php
* add_filter( 'upload_dir', '_wp_filter_font_directory' );
* // Your code to upload or sideload a font file.
* remove_filter( 'upload_dir', '_wp_filter_font_directory' );
* ```
*
* @since 6.5.0
* @access private
*
Expand Down

0 comments on commit cf211ae

Please sign in to comment.