2016-07-03 07:32:02 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class DisplayFeaturedImageGenesisDoSetting
|
2017-10-24 18:04:55 -04:00
|
|
|
* @package Display_Featured_Image_Genesis
|
2016-07-03 07:32:02 -04:00
|
|
|
* @copyright 2016 Robin Cornett
|
|
|
|
|
*/
|
|
|
|
|
class DisplayFeaturedImageGenesisGetSetting {
|
|
|
|
|
|
2016-07-03 07:42:41 -04:00
|
|
|
/**
|
|
|
|
|
* Define the default plugin settings.
|
2017-10-24 18:04:55 -04:00
|
|
|
* @return array
|
2016-07-03 07:42:41 -04:00
|
|
|
* @since 2.6.0
|
|
|
|
|
*/
|
2016-07-03 07:32:02 -04:00
|
|
|
public function defaults() {
|
|
|
|
|
return apply_filters( 'displayfeaturedimagegenesis_defaults', array(
|
2017-10-31 19:47:25 -04:00
|
|
|
'less_header' => 0,
|
|
|
|
|
'default' => '',
|
|
|
|
|
'exclude_front' => 0,
|
|
|
|
|
'keep_titles' => 0,
|
|
|
|
|
'move_excerpts' => 0,
|
|
|
|
|
'is_paged' => 0,
|
|
|
|
|
'feed_image' => 0,
|
|
|
|
|
'thumbnails' => 0,
|
|
|
|
|
'post_types' => array(),
|
|
|
|
|
'skip' => array(),
|
|
|
|
|
'fallback' => array(),
|
|
|
|
|
'max_height' => '',
|
|
|
|
|
'always_default' => 0,
|
|
|
|
|
'centeredX' => 1,
|
|
|
|
|
'centeredY' => 1,
|
|
|
|
|
'fade' => 750,
|
2017-11-02 09:20:02 -04:00
|
|
|
'shortcodes' => 0,
|
2017-10-31 19:47:25 -04:00
|
|
|
'backstretch_hook' => 'genesis_after_header',
|
|
|
|
|
'backstretch_priority' => 10,
|
|
|
|
|
'large_hook' => 'genesis_before_loop',
|
|
|
|
|
'large_priority' => 12,
|
2017-11-01 08:08:53 -04:00
|
|
|
'large' => array(),
|
2016-07-03 07:32:02 -04:00
|
|
|
) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Retrieve plugin setting.
|
|
|
|
|
* @return array All plugin settings.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
|
|
|
|
*/
|
|
|
|
|
public function get_display_setting() {
|
|
|
|
|
$defaults = $this->defaults();
|
|
|
|
|
$setting = get_option( 'displayfeaturedimagegenesis', $defaults );
|
2017-10-24 18:04:55 -04:00
|
|
|
|
2016-07-03 07:32:02 -04:00
|
|
|
return wp_parse_args( $setting, $defaults );
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|