media_library_months_with_files

FILTER wp-includes\media.php (ligne 4886) github
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.

Paramètres

Entrée :
null
Sortie :
@param stdClass[]|null $months An array of objects with `month` and `year`

Utilisation

// Modifier la valeur avec le filtre 'media_library_months_with_files'
add_filter('media_library_months_with_files', 'ma_fonction_filtre', 10, 1);

function ma_fonction_filtre(null) {
    // Modifier la valeur
    return null;
}

Actualités

Chargement des actualités...