media_upload_tabs

media_upload_tabs

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('media_upload_tabs') is found 2 times:

  • /wp-admin/includes/media.php line 31
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
         * @since 2.5.0
         *
         * @param string[] $_default_tabs An array of media tabs.
         */
        return apply_filters( 'media_upload_tabs', $_default_tabs );
    }
     
    /**
     * Adds the gallery tab back to the tabs array if post has image attachments.
     *
     * @since 2.5.0
  • /wp-includes/media.php line 4744
    4740
    4741
    4742
    4743
    4744
    4745
    4746
    4747
    4748
    4749
    4750
        'library'  => '',
    );
     
    /** This filter is documented in wp-admin/includes/media.php */
    $tabs = apply_filters( 'media_upload_tabs', $tabs );
    unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
     
    $props = array(
        'link'  => get_option( 'image_default_link_type' ), // DB default is 'file'.
        'align' => get_option( 'image_default_align' ),     // Empty default.
        'size'  => get_option( 'image_default_size' ),      // Empty default.

See this hook used in plugins: