Make WordPress Core


Ignore:
Timestamp:
03/07/2021 12:30:38 PM (5 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/includes/media.php

    r50264 r50505  
    697697     * of media uploaded.
    698698     *
     699     * Possible hook names include:
     700     *
     701     *  - `image_upload_iframe_src`
     702     *  - `media_upload_iframe_src`
     703     *
    699704     * @since 3.0.0
    700705     *
    701      * @param string $upload_iframe_src The upload iframe source URL by type.
     706     * @param string $upload_iframe_src The upload iframe source URL.
    702707     */
    703708    $upload_iframe_src = apply_filters( "{$type}_upload_iframe_src", $upload_iframe_src );
     
    893898             * The dynamic portion of the hook name, `$type`, refers to the type
    894899             * of media being sent.
     900             *
     901             * Possible hook names include:
     902             *
     903             *  - `audio_send_to_editor_url`
     904             *  - `file_send_to_editor_url`
     905             *  - `video_send_to_editor_url`
    895906             *
    896907             * @since 3.3.0
Note: See TracChangeset for help on using the changeset viewer.