Skip to content

Instantly share code, notes, and snippets.

@desrosj
Created August 16, 2018 20:32
Show Gist options
  • Save desrosj/7610b05798c1a7055bddc2f30bafc9ac to your computer and use it in GitHub Desktop.
Save desrosj/7610b05798c1a7055bddc2f30bafc9ac to your computer and use it in GitHub Desktop.
<?php
/**
* Get a list of default source sets.
*
* @since 1.0.0
*
* @return array Default source sets.
*/
function bu_banners_get_default_source_sets() {
$source_sets = array(
'full' => array(
'xsmall' => array(
'media-query' => 'max-width: 499px',
'size' => 'bu_banners_full_xsmall',
),
'small' => array(
'media-query' => 'max-width: 767px',
'size' => 'bu_banners_full_small',
),
'medium' => array(
'media-query' => 'max-width: 991px',
'size' => 'bu_banners_full_medium',
),
'large' => array(
'media-query' => 'max-width: 1199px',
'size' => 'bu_banners_full_large',
),
'xlarge' => array(
'media-query' => 'max-width: 1499px',
'size' => 'bu_banners_full_xlarge',
),
'xxlarge' => array(
'media-query' => 'min-width: 1500px',
'size' => 'bu_banners_full_xxlarge',
),
),
'half' => array(
'xsmall' => array(
'media-query' => 'max-width: 767px',
'size' => 'bu_banners_half_xsmall',
),
'small' => array(
'media-query' => 'max-width: 991px',
'size' => 'bu_banners_half_small',
),
'medium' => array(
'media-query' => 'max-width: 1099px',
'size' => 'bu_banners_half_medium',
),
'large' => array(
'media-query' => 'max-width: 1499px',
'size' => 'bu_banners_half_large',
),
'xlarge' => array(
'media-query' => 'min-width: 1500px',
'size' => 'bu_banners_half_xlarge',
),
),
);
/**
* Filters the default image source sets for banners.
*
* @since 1.0.0
*
* @param array Default source sets.
*/
$source_sets = apply_filters( 'bu_banners_default_source_sets', $source_sets );
return $source_sets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment