filtrod 4.7.4
media_library_months_with_files
Opis — z kodu źródłowego
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.
Parametry
| Parametr | Typ | Opis |
|---|---|---|
$months | \stdClass[] | null | An array of objects with <code>month</code> and <code>year</code> properties, or <code>null</code> for default behavior. |
Wywołanie
Rejestracja callbackaphp
// rejestracja funkcji zwrotnej
add_filter( 'media_library_months_with_files', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}
// rejestracja funkcji zwrotnej
add_filter( 'media_library_months_with_files', 'twoja_funkcja' );
function twoja_funkcja($param_1) {
// Twój kod
}Popularne w tej kategorii