WordPress开发者和主题制作者的搜索引擎



media_library_months_with_files ›

Since4.7.4
已弃用n/a
apply_filters( 'media_library_months_with_files', null )
参数:
  • (array|null) An array of objects with `month` and `year` properties, or `null` (or any other non-array value) for default behavior.
    Required: Yes
链接:
    定义在:
    文档:

    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.





    源码

    $months = apply_filters( 'media_library_months_with_files', null );