media_library_months_with_files

media_library_months_with_files

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.7.1

apply_filters('media_library_months_with_files') is found 1 times:

  • /wp-includes/media.php line 4836
    	 *
    	 * @param stdClass[]|null $months An array of objects with `month` and `year`
    	 *                                properties, or `null` for default behavior.
    	 */
    	$months = apply_filters( 'media_library_months_with_files', null );
    	if ( ! is_array( $months ) ) {
    		$months = $wpdb->get_results(
    			$wpdb->prepare(
    				"SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month
    				FROM $wpdb->posts
    				WHERE post_type = %s