You appear to be a bot. Output may be restricted
Description
Get featured content settings.
Get all settings recognized by this module. This function will return all settings whether or not they have been stored in the database yet. This ensures that all keys are available at all times. In the event that you only require one setting, you may pass its name as the first parameter to the function and only that value will be returned.
Usage
$mixed = Featured_Content::get_setting( $key );
Parameters
- $key
- ( string ) optional default: all – The key of a recognized setting.
Returns
mixed Array of all settings by default. A single value if passed as first parameter.
Source
File name: twentyfourteen/inc/featured-content.php
Lines:
1 to 19 of 19
public static function get_setting( $key = 'all' ) { $saved = (array) get_option( 'featured-content' ); $defaults = array( 'hide-tag' => 1, 'tag-id' => 0, 'tag-name' => _x( 'featured', 'featured content default tag slug', 'twentyfourteen' ), ); $options = wp_parse_args( $saved, $defaults ); $options = array_intersect_key( $options, $defaults ); if ( 'all' !== $key ) { return isset( $options[ $key ] ) ? $options[ $key ] : false; } return $options; }