Make WordPress Core


Ignore:
Timestamp:
10/29/2013 04:28:11 PM (11 years ago)
Author:
lancewillett
Message:

Twenty Fourteen: implement an alternate "slider" view for home page featured content. Props iamtakashi for the design and implementation. Slider JavaScript code adapted from FlexSlider v2.2.0 props WooThemes and mbmufffin. See #25550.

File:
1 edited

Legend:

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

    r25864 r25979  
    3131        'settings' => 'accent_color',
    3232    ) ) );
     33
     34    // Add the featured content section.
     35    $wp_customize->add_section( 'featured_content', array(
     36        'title'    => __( 'Featured Content', 'twentyfourteen' ),
     37        'priority' => 120,
     38    ) );
     39
     40    // Add the featured content layout setting and control.
     41    $wp_customize->add_setting( 'featured_content_layout', array(
     42        'default'    => 'grid',
     43        'type'       => 'theme_mod',
     44        'capability' => 'edit_theme_options',
     45    ) );
     46
     47    $wp_customize->add_control( 'featured_content_layout', array(
     48        'label'   => __( 'Layout', 'twentyfourteen' ),
     49        'section' => 'featured_content',
     50        'type'    => 'select',
     51        'choices' => array(
     52            'grid'   => __( 'Grid', 'twentyfourteen' ),
     53            'slider' => __( 'Slider', 'twentyfourteen' ),
     54        ),
     55    ) );
    3356}
    3457add_action( 'customize_register', 'twentyfourteen_customize_register' );
Note: See TracChangeset for help on using the changeset viewer.