This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.',
'type' => 'option',
) );
//DISPLAY BLOG DESCRIPTION - CONTROL
$wp_customize->add_control( 'baleen_display_description', array(
'settings' => 'baleen_theme_settings[display_description]',
'label' => 'Display blog description in header',
'section' => 'title_tagline',
'type' => 'checkbox',
) );
//TOP CONTENT SLIDE SET TO DISPLAY - CONTROL
$wp_customize->add_control( 'baleen_top_content_set', array(
'settings' => 'baleen_theme_settings[top_content_set]',
'label' => 'Slide Set for the front page',
'section' => 'baleen_top_content',
'type' => 'select',
'choices' => baleen_top_content_array(),
'priority' => 1,
) );
//TOP CONTENT ORDER - CONTROL
$wp_customize->add_control( 'baleen_top_content_order', array(
'settings' => 'baleen_theme_settings[top_content_order]',
'label' => 'Order for front page slides',
'section' => 'baleen_top_content',
'type' => 'select',
'choices' => array(
'Newest First' => 'Newest First',
'Oldest First' => 'Oldest First',
'Random' => 'Random',
),
'priority' => 2,
) );
//EXCERPT ON MAIN BLOG PAGE - CONTROL
$wp_customize->add_control( 'baleen_excerpt_main', array(
'settings' => 'baleen_theme_settings[excerpt_main]',
'label' => 'On the main blog page',
'section' => 'baleen_excerpt_or_fullpost',
'type' => 'select',
'choices' => array(
'Excerpt' => 'Excerpt',
'Full Post' => 'Full Post',
),
) );
//EXCERPT ON ARCHIVE PAGE - CONTROL
$wp_customize->add_control( 'baleen_excerpt_archive', array(
'settings' => 'baleen_theme_settings[excerpt_archive]',
'label' => 'On archive pages',
'section' => 'baleen_excerpt_or_fullpost',
'type' => 'select',
'choices' => array(
'Excerpt' => 'Excerpt',
'Full Post' => 'Full Post',
),
) );
//EXCERPT ON SEARCH PAGE - CONTROL
$wp_customize->add_control( 'baleen_excerpt_search', array(
'settings' => 'baleen_theme_settings[excerpt_search]',
'label' => 'On the search page',
'section' => 'baleen_excerpt_or_fullpost',
'type' => 'select',
'choices' => array(
'Excerpt' => 'Excerpt',
'Full Post' => 'Full Post',
),
) );
//SOCIAL MEDIA - FACEBOOK - CONTROL
$wp_customize->add_control( 'baleen_social_facebook', array(
'settings' => 'baleen_theme_settings[social_facebook]',
'label' => 'Facebook page URL',
'section' => 'baleen_social_media',
'priority' => 1,
) );
//SOCIAL MEDIA - TWITTER - CONTROL
$wp_customize->add_control( 'baleen_social_twitter', array(
'settings' => 'baleen_theme_settings[social_twitter]',
'label' => 'Twitter profile URL',
'section' => 'baleen_social_media',
'priority' => 2,
) );
//SOCIAL MEDIA - GOOGLE PLUS - CONTROL
$wp_customize->add_control( 'baleen_social_googleplus', array(
'settings' => 'baleen_theme_settings[social_googleplus]',
'label' => 'Google Plus profile URL',
'section' => 'baleen_social_media',
'priority' => 3,
) );
//SOCIAL MEDIA - YOUTUBE - CONTROL
$wp_customize->add_control( 'baleen_social_youtube', array(
'settings' => 'baleen_theme_settings[social_youtube]',
'label' => 'YouTube page URL',
'section' => 'baleen_social_media',
'priority' => 4,
) );
//SOCIAL MEDIA - PINTEREST - CONTROL
$wp_customize->add_control( 'baleen_social_pinterest', array(
'settings' => 'baleen_theme_settings[social_pinterest]',
'label' => 'Pinterest profile URL',
'section' => 'baleen_social_media',
'priority' => 5,
) );
//SOCIAL MEDIA - LINKEDIN - CONTROL
$wp_customize->add_control( 'baleen_social_linkedin', array(
'settings' => 'baleen_theme_settings[social_linkedin]',
'label' => 'LinkedIn profile URL',
'section' => 'baleen_social_media',
'priority' => 6,
) );
//SOCIAL MEDIA - CUSTOM TITLE - CONTROL
$wp_customize->add_control( 'baleen_social_customtitle', array(
'settings' => 'baleen_theme_settings[social_customtitle]',
'label' => 'Custom Social Media TITLE',
'section' => 'baleen_social_media',
'priority' => 7,
) );
//SOCIAL MEDIA - CUSTOM URL - CONTROL
$wp_customize->add_control( 'baleen_social_customurl', array(
'settings' => 'baleen_theme_settings[social_customurl]',
'label' => 'Custom Social Media URL',
'section' => 'baleen_social_media',
'priority' => 8,
) );
//SOCIAL MEDIA - DISPLAY RSS TAG - CONTROL
$wp_customize->add_control( 'baleen_social_displayrss', array(
'settings' => 'baleen_theme_settings[social_displayrss]',
'label' => 'Display RSS feed badge?',
'section' => 'baleen_social_media',
'type' => 'checkbox',
'priority' => 9,
) );
//SITE LICENSE INFORMATION - CONTROL
$wp_customize->add_control( new Baleen_Customize_Textarea_Control( $wp_customize, 'baleen_site_license', array(
//$wp_customize->add_control( 'baleen_site_license', array(
'label' => 'We recommend Creative Commons',
'section' => 'baleen_site_license_info',
'settings' => 'baleen_theme_settings[site_license]',
) ) );
}
add_action('customize_register', 'baleen_customize_register');
function baleen_remove_customizer_styles(){
global $wp_customize;
$wp_customize->remove_control('display_header_text');
$wp_customize->remove_section('colors');
}
add_action( 'customize_register', 'baleen_remove_customizer_styles', 20 );
//RETRIEVES AN ARRAY WITH TOP CONTENT SLIDE SETS TO USE IN THE SETTINGS CONTROL
function baleen_top_content_array() {
$slide_sets_raw = get_terms( 'slide_set' );
$slide_sets['none'] = 'No Set';
foreach ($slide_sets_raw as $s) {
$slide_sets[$s->slug] = $s->name;
}
return $slide_sets;
}
/*********************************************************************************
* Adds Help tabs for various theme functions *
**********************************************************************************/
add_action( 'load-post-new.php', 'theme_shortcodes_help_tab' , 80 );
add_action( 'load-post.php', 'theme_shortcodes_help_tab' , 80 );
function theme_shortcodes_help_tab() {
$content = 'The Baleen theme offers a wide range of custom shortcodes that allow users simple and powerful control over the layout of posts and pages. These include codes for testimonials, columns, icons, buttons, dropcaps, slideshows, and more. Here is a quick shortcode cheat sheet:
[button] - Enclose any link in a [button][/button] shortcode to style it like a button.
[column] - Use the [column][/column] tab to create columns in the body of your post or page. It takes four attributes: class="", offset="", color="", and background="". Color and background define those attributes for the column.
Class defines the width, and can accept the following: c25, c33, c40, c50, c66, c75, and c100 -- with each number defining a width by percentage.
Offset accepts: ocenter, o25, o33, o40, o50, o67, and o75. The offset indents your column by that percentage of the width of the post -- or centers it.
Close each column set with an [end_columns] tab.
[dropcap] - Enclose the first letter of a paragraph in a [dropcap][/dropcap] shortcode. Use the color="" attribute along with any html code color (like #e6e6e6).
[icon] - The [icon] shortcode accepts size="", alignment="", and color="" attributes. To insert an icon, choose from one of the following in name="":
android, apple, book, bubbles, code, cog, console, document, facebook, feed, globe, google-plus, headphones, instagram, linkedin, linux, mail, mobile, network, paragraph, paypal, pdf, pen, phone, pinterest, podcast, search, share, spinner, tablet, twitter, user, users, vimeo, windows, wordpress, youtube.
Icon names are case sensitive.
[slideshow] - Insert a [slideshow] anywhere in the content. Slideshows accept two attributes: slideset="" and order="". In the slideset attribute, simply include the name of the slideset you want to insert. You may order it "newest," "oldest," and "random."
[testimonial] - Encase your testimonials inside of a [testimonial][/testimonial] tag for a distinctive look. Inside of that shortcode, add the [testimonial-cite][/testimonial-cite] tag to denote the name of your happy client. The [testimonial] tag takes a color="" attribute, which changes the color of the background.