media_library_months_with_files

media_library_months_with_files

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.2

apply_filters('media_library_months_with_files') is found 1 times:

  • /wp-includes/media.php line 4836
    4832
    4833
    4834
    4835
    4836
    4837
    4838
    4839
    4840
    4841
    4842
    *
     * @param stdClass[]|null $months An array of objects with `month` and `year`
     *                                properties, or `null` for default behavior.
     */
    $months = apply_filters( 'media_library_months_with_files', null );
    if ( ! is_array( $months ) ) {
        $months = $wpdb->get_results(
            $wpdb->prepare(
                "SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
                FROM $wpdb->posts
                WHERE post_type = %s