Make WordPress Core


Ignore:
Timestamp:
11/07/2013 08:24:24 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: move all controls for managing Featured Content to the Customizer. Also implement smart fallbacks to not using a custom tag with the "featured" tag and sticky posts. Props obenland and celloexpressions, see #25549.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/inc/customizer.php

    r26021 r26037  
    2929        'label'    => __( 'Accent Color', 'twentyfourteen' ),
    3030        'section'  => 'colors',
    31         'settings' => 'accent_color',
    3231    ) ) );
    3332
     
    3534    add_filter( 'theme_mod_accent_light', 'twentyfourteen_accent_light' );
    3635
    37     // Add the featured content section.
     36    // Add the featured content section in case it's not already there.
    3837    $wp_customize->add_section( 'featured_content', array(
    3938        'title'    => __( 'Featured Content', 'twentyfourteen' ),
    40         'priority' => 120,
     39        'priority' => 130,
    4140    ) );
    4241
    4342    // Add the featured content layout setting and control.
    4443    $wp_customize->add_setting( 'featured_content_layout', array(
    45         'default'    => 'grid',
    46         'type'       => 'theme_mod',
    47         'capability' => 'edit_theme_options',
     44        'default' => 'grid',
    4845    ) );
    4946
     
    5350        'type'    => 'select',
    5451        'choices' => array(
    55             'grid'   => __( 'Grid', 'twentyfourteen' ),
     52            'grid'   => __( 'Grid',   'twentyfourteen' ),
    5653            'slider' => __( 'Slider', 'twentyfourteen' ),
    5754        ),
Note: See TracChangeset for help on using the changeset viewer.