media_library_months_with_files

Advertisement

Summery Summery

Allows overriding the list of months displayed in the media library.

Syntax Syntax

apply_filters( 'media_library_months_with_files', array|null $months )

Description Description

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.

Parameters Parameters

$months

(array|null) An array of objects with month and year properties, or null (or any other non-array value) for default behavior.

Source Source

File: wp-includes/media.php

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.4 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.