Make WordPress Core


Ignore:
Timestamp:
03/07/2021 12:30:38 PM (4 years ago)
Author:
johnbillion
Message:

Docs: Add examples of possible names for various hooks whose name contains a dynamic portion.

This provides greater discoverability of such hooks in search results on the Code Reference site as well as increased clarity when reading the source.

See #50734, #52628

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/media-upload.php

    r49108 r50505  
    8888     *
    8989     * The dynamic portion of the hook name, `$type`, refers to the specific
    90      * media upload type. Possible values include 'image', 'audio', 'video',
    91      * 'file', etc.
     90     * media upload type.
    9291     *
    9392     * The hook only fires if the current `$tab` is 'type' (From Computer),
    9493     * 'type_url' (From URL), or, if the tab does not exist (i.e., has not
    9594     * been registered via the {@see 'media_upload_tabs'} filter.
     95     *
     96     * Possible hook names include:
     97     *
     98     *  - `media_upload_audio`
     99     *  - `media_upload_file`
     100     *  - `media_upload_image`
     101     *  - `media_upload_video`
    96102     *
    97103     * @since 2.5.0
Note: See TracChangeset for help on using the changeset viewer.