array( 'value' => 'frankie', 'label' => __( 'Frankie', 'monster' ) ), 'vampire' => array( 'value' => 'vampire', 'label' => __( 'Vampire', 'monster' ) ), 'spider' => array( 'value' => 'spider', 'label' => __( 'Spider', 'monster' ) ), 'jack' => array( 'value' => 'jack', 'label' => __( 'Jack-o-lantern', 'monster' ) ), 'demon' => array( 'value' => 'demon', 'label' => __( 'Demon', 'monster' ) ), 'skull' => array( 'value' => 'skull', 'label' => __( 'Skull', 'monster' ) ) ); /** * Check the number of daily posts in the last week * If it's greater than or equal to 7 add the zombie monster */ $daily_posts_last_week = monster_daily_posts_in_last_week(); if ( 7 <= $daily_posts_last_week ) { $style['zombie']['value'] = 'zombie'; $style['zombie']['label'] = __( 'Zombie', 'monster' ); } /** * Check to see if the user has ever made a post on Oct. 31. * If so, add a new monster! */ if ( 'true' == monster_halloween_post_date() ) { $style['eyes']['value'] = 'eyes'; $style['eyes']['label'] = __( 'Monster Eyes', 'monster' ); } return apply_filters( 'monster_style', $style ); } /** * Returns the options array for Monster Theme. * * @since Monster 1.0 */ function monster_get_theme_options() { $saved = (array) get_option( 'monster_theme_options' ); $defaults = array( 'style' => 'frankie', ); $defaults = apply_filters( 'monster_theme_default_theme_options', $defaults ); $options = wp_parse_args( $saved, $defaults ); $options = array_intersect_key( $options, $defaults ); return $options; } /** * Renders the style setting field. */ function monster_settings_field_style() { $options = monster_get_theme_options(); foreach ( monster_style() as $button ) { ?>