Make WordPress Core

Changeset 57907


Ignore:
Timestamp:
04/01/2024 04:53:25 PM (6 months ago)
Author:
audrasjb
Message:

Docs: Improve the docblock for _wp_filter_font_directory().

Removes the recommended use section as this is a private use only function.

Reviewed by davidbaumwald.
Merges [57902] to the 6.5 branch.
Props peterwilsoncc, swissspidy, azaozz.
Fixes #60652.

Location:
branches/6.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.5

  • branches/6.5/src/wp-includes/fonts.php

    r57880 r57907  
    141141
    142142/**
    143  * Returns the font directory for use by the font library.
    144  *
    145  * This function is a callback for the {@see 'upload_dir'} filter. It is not
    146  * intended to be called directly. Use wp_get_font_dir() instead.
    147  *
    148  * The function can be used when extending the font library to modify the upload
    149  * destination for font files via the upload_dir filter. The recommended way to
    150  * do this is:
    151  *
    152  * ```php
    153  * add_filter( 'upload_dir', '_wp_filter_font_directory' );
    154  * // Your code to upload or sideload a font file.
    155  * remove_filter( 'upload_dir', '_wp_filter_font_directory' );
    156  * ```
     143 * A callback function for use in the {@see 'upload_dir'} filter.
     144 *
     145 * This function is intended for internal use only and should not be used by plugins and themes.
     146 * Use wp_get_font_dir() instead.
    157147 *
    158148 * @since 6.5.0
Note: See TracChangeset for help on using the changeset viewer.