Skip to content

Commit

Permalink
Theme Customizer
Browse files Browse the repository at this point in the history
Adding theme customization options, removed glypicons form footer.
  • Loading branch information
andrewmbacon committed Jun 25, 2014
1 parent 3420a12 commit 3ecd506
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 92 deletions.
91 changes: 0 additions & 91 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,97 +132,6 @@ function huskypress_parentSite_register( $wp_customize )



function huskypress_customize_register( $wp_customize )
{
//1. Define a new section (if desired) to the Theme Customizer
$wp_customize->add_section( 'huskypress_options',
array(
'title' => __( 'Template Options', 'mytheme' ), //Visible title of section
'priority' => 35, //Determines what order this appears in
'capability' => 'edit_theme_options', //Capability needed to tweak
'description' => __('Allows you to customize header color and school, college, or division settings for Hale', 'huskypress'), //Descriptive tooltip
)
);
$wp_customize->add_setting( 'secondarytitle', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'type' => 'option', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
$wp_customize->add_control('secondarytitle', array(
'type' => 'text',
'label' => 'School, College, Division, Department, etc.',
'section' => 'huskypress_options'
)
);
$wp_customize->add_setting( 'secondarylink', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'type' => 'option', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
$wp_customize->add_control('secondarylink', array(
'type' => 'text',
'label' => 'Link To School, College, Division, Department (Must be UConn.edu or UCHC.edu)',
'section' => 'huskypress_options'
)
);
$wp_customize->add_setting( 'homepagelayout', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => '3-3', //Default setting/value to save
'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);

// new stuff added
$wp_customize->add_setting( 'themeColor', //Give it a SERIALIZED name (so all theme settings can live under one db record)
array(
'default' => 'blue', //Default setting/value to save
'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'?
'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting.
'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)?
)
);
$wp_customize->add_control('themeColor', array(
'type' => 'radio',
'label' => 'Theme Color',
'section' => 'huskypress_options',
'choices' => array(
'blue'=>'Blue',
'red' => 'Red',
'orange' => 'Orange',
'green' => 'Green',
'purple'=>'Purple'
)
)
);
$wp_customize->add_control('homepagelayout', array(
'type' => 'radio',
'label' => 'Homepage Layout',
'section' => 'huskypress_options',
'choices' => array(
'2L'=>'Large left',
'2L_sub' => 'Large left, subdivided',
'2R'=>'Large right',
'2R_sub'=>'Large right, subdivided',
'3'=>'Three even',
'3W'=>'Three columns, wide center',
'3W_sub'=>'Three columns, wide center, subdivided',
'1-2'=>'Large top, two bottom',
'1-3'=>'Large top, three bottom',
'2L-3'=>'Large top left, three bottom',
'2R-3'=>'Large top right, three bottom',
'3-3'=>'Large center top, large center bottom',
'3-4'=>'Large center top, four bottom'
)
)
);
}
add_action( 'customize_register', 'huskypress_customize_register' );



Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ Text Domain: cs
max-width: 100%;
}

#footer .glyphicon {
display: none;
}

img {
height: auto;
max-width: 100%;
Expand Down
4 changes: 3 additions & 1 deletion style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ url('../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.ttf') for




#footer .glyphicon {
display:none;
}



Expand Down

0 comments on commit 3ecd506

Please sign in to comment.