public static function get_setting($key = 'all')
{
$saved = (array) get_option('featured-content');
/**
* Filter Featured Content's default settings.
*
* @module theme-tools
*
* @since 2.7.0
*
* @param array $args {
* Array of Featured Content Settings
*
* @type int hide-tag Default is 1.
* @type int tag-id Default is 0.
* @type string tag-name Default is empty.
* @type int show-all Default is 0.
* }
*/
$defaults = apply_filters('featured_content_default_settings', array('hide-tag' => 1, 'tag-id' => 0, 'tag-name' => '', 'show-all' => 0));
$options = wp_parse_args($saved, $defaults);
$options = array_intersect_key($options, $defaults);
if ('all' != $key) {
return isset($options[$key]) ? $options[$key] : false;
}
return $options;
}