WordPress Hooks Explorer

Listing all hooks extracted WordPress Core

Details about media_library_months_with_files

Back to home


Filename Hook Type Line Number PHP Doc
wp-includes/media.php apply_filters 4480 /**
* Allows overriding the list of months displayed in the media library.
* By default (if this filter does not return an array), a query will be
* run to determine the months that have media items. This query can be
* expensive for large media libraries, so it may be desirable for sites to
* override this behavior.
* @since 4.7.4
* @link https://core.trac.wordpress.org/ticket/31071
* @param stdClass[]|null $months An array of objects with `month` and `year`
* properties, or `null` for default behavior.

Hook Parameters

Parameter Type Name Description
stdClass[]|null $months An array of objects with `month` and `year`