*/
if ( ! class_exists( 'WP_Customize_Control' ) ) {return NULL;}
class GridPal_Customize_Static_Text_Control extends WP_Customize_Control {
public $type = 'gridpal-static-text';
public function __construct( $manager, $id, $args = array() ) {
parent::__construct( $manager, $id, $args );
}
protected function render_content() {
if ( ! empty( $this->label ) ) :
?>label ); ?>description ) ) :
?>
description );
?>
button_tag);
if (!empty($this->button_class)) {
echo ' class="' . esc_attr($this->button_class) . '"';
}
if ('button' == $this->button_tag) {
echo ' type="button"';
}
else {
echo ' href="' . esc_url($this->button_href) . '"' . (empty($this->button_tag) ? '' : ' target="' . esc_attr($this->button_target) . '"');
}
if (!empty($this->button_onclick)) {
echo ' onclick="' . esc_js($this->button_onclick) . '"';
}
if (!empty($this->button_tag_id)) {
echo ' id="' . esc_attr($this->button_tag_id) . '"';
}
echo '>';
echo esc_html($this->label);
echo '' . esc_html($this->button_tag) . '>';
?>
default;
}
}
function gridpal_sanitize_date_box_style( $input, $setting ) {
$valid = array('square','round');
if ( in_array( $input, $valid ) ) {
return $input;
} else {
return $setting->default;
}
}
function gridpal_sanitize_posts_navigation_type( $input, $setting ) {
$valid = array('normalnavi','numberednavi');
if ( in_array( $input, $valid ) ) {
return $input;
} else {
return $setting->default;
}
}
function gridpal_sanitize_email( $input, $setting ) {
if ( '' != $input && is_email( $input ) ) {
$input = sanitize_email( $input );
return $input;
} else {
return $setting->default;
}
}
function gridpal_sanitize_read_more_length( $input, $setting ) {
$input = absint( $input ); // Force the value into non-negative integer.
return ( 0 < $input ) ? $input : $setting->default;
}
function gridpal_sanitize_positive_integer( $input, $setting ) {
$input = absint( $input ); // Force the value into non-negative integer.
return ( 0 < $input ) ? $input : $setting->default;
}
function gridpal_sanitize_positive_float( $input, $setting ) {
$input = (float) $input;
return ( 0 < $input ) ? $input : $setting->default;
}
function gridpal_register_theme_customizer( $wp_customize ) {
if(method_exists('WP_Customize_Manager', 'add_panel')):
$wp_customize->add_panel('gridpal_main_options_panel', array( 'title' => esc_html__('Theme Options', 'gridpal'), 'priority' => 10, ));
endif;
$wp_customize->get_section( 'title_tagline' )->panel = 'gridpal_main_options_panel';
$wp_customize->get_section( 'title_tagline' )->priority = 20;
$wp_customize->get_section( 'header_image' )->panel = 'gridpal_main_options_panel';
$wp_customize->get_section( 'header_image' )->priority = 26;
$wp_customize->get_section( 'background_image' )->panel = 'gridpal_main_options_panel';
$wp_customize->get_section( 'background_image' )->priority = 27;
$wp_customize->get_section( 'colors' )->panel = 'gridpal_main_options_panel';
$wp_customize->get_section( 'colors' )->priority = 40;
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
$wp_customize->get_setting( 'background_color' )->transport = 'postMessage';
$wp_customize->get_control( 'background_color' )->description = esc_html__('To change Background Color, need to remove background image first:- go to Appearance : Customize : Theme Options : Background Image', 'gridpal');
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial( 'blogname', array(
'selector' => '.gridpal-site-title a',
'render_callback' => 'gridpal_customize_partial_blogname',
) );
$wp_customize->selective_refresh->add_partial( 'blogdescription', array(
'selector' => '.gridpal-site-description',
'render_callback' => 'gridpal_customize_partial_blogdescription',
) );
}
/* Getting started options */
$wp_customize->add_section( 'gridpal_section_getting_started', array( 'title' => esc_html__( 'Getting Started', 'gridpal' ), 'description' => esc_html__( 'Thanks for your interest in GridPal! If you have any questions or run into any trouble, please visit us the following links. We will get you fixed up!', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 5, ) );
$wp_customize->add_setting( 'gridpal_options[documentation]', array( 'default' => '', 'sanitize_callback' => '__return_false', ) );
$wp_customize->add_control( new GridPal_Customize_Button_Control( $wp_customize, 'gridpal_documentation_control', array( 'label' => esc_html__( 'Documentation', 'gridpal' ), 'section' => 'gridpal_section_getting_started', 'settings' => 'gridpal_options[documentation]', 'type' => 'button', 'button_tag' => 'a', 'button_class' => 'button button-primary', 'button_href' => esc_url( 'https://themesdna.com/gridpal-wordpress-theme/' ), 'button_target' => '_blank', ) ) );
$wp_customize->add_setting( 'gridpal_options[contact]', array( 'default' => '', 'sanitize_callback' => '__return_false', ) );
$wp_customize->add_control( new GridPal_Customize_Button_Control( $wp_customize, 'gridpal_contact_control', array( 'label' => esc_html__( 'Contact Us', 'gridpal' ), 'section' => 'gridpal_section_getting_started', 'settings' => 'gridpal_options[contact]', 'type' => 'button', 'button_tag' => 'a', 'button_class' => 'button button-primary', 'button_href' => esc_url( 'https://themesdna.com/contact/' ), 'button_target' => '_blank', ) ) );
/* Menu options */
$wp_customize->add_section( 'gridpal_section_menu_options', array( 'title' => esc_html__( 'Menu Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 100 ) );
$wp_customize->add_setting( 'gridpal_options[primary_menu_text]', array( 'default' => esc_html__( 'Menu', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'gridpal_primary_menu_text_control', array( 'label' => esc_html__( 'Primary Menu Mobile Text', 'gridpal' ), 'section' => 'gridpal_section_menu_options', 'settings' => 'gridpal_options[primary_menu_text]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[disable_primary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_primary_menu_control', array( 'label' => esc_html__( 'Disable Primary Menu', 'gridpal' ), 'section' => 'gridpal_section_menu_options', 'settings' => 'gridpal_options[disable_primary_menu]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[secondary_menu_text]', array( 'default' => esc_html__( 'Menu', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'gridpal_secondary_menu_text_control', array( 'label' => esc_html__( 'Secondary Menu Mobile Text', 'gridpal' ), 'section' => 'gridpal_section_menu_options', 'settings' => 'gridpal_options[secondary_menu_text]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[disable_menu_social_bar]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_menu_social_bar_control', array( 'label' => esc_html__( 'Disable Secondary Menu + Social Area', 'gridpal' ), 'description' => esc_html__('If you checked this option, secondary menu and all buttons will disappear. There is no any effect from these options: "Disable Secondary Menu", "Hide Social Area", "Hide Search Button", "Show Login/Logout Button".', 'gridpal'), 'section' => 'gridpal_section_menu_options', 'settings' => 'gridpal_options[disable_menu_social_bar]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[disable_secondary_menu]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_secondary_menu_control', array( 'label' => esc_html__( 'Disable Secondary Menu', 'gridpal' ), 'description' => esc_html__('This option has no effect if you have checked the option: "Disable Secondary Menu + Social Area".', 'gridpal'), 'section' => 'gridpal_section_menu_options', 'settings' => 'gridpal_options[disable_secondary_menu]', 'type' => 'checkbox', ) );
/* Header options */
$wp_customize->add_section( 'gridpal_section_header', array( 'title' => esc_html__( 'Header Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 120 ) );
$wp_customize->add_setting( 'gridpal_options[hide_tagline]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_tagline_control', array( 'label' => esc_html__( 'Hide Tagline', 'gridpal' ), 'section' => 'gridpal_section_header', 'settings' => 'gridpal_options[hide_tagline]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_header_content]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_header_content_control', array( 'label' => esc_html__( 'Hide Header Content', 'gridpal' ), 'section' => 'gridpal_section_header', 'settings' => 'gridpal_options[hide_header_content]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_header_image]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_header_image_control', array( 'label' => esc_html__( 'Hide Header Image from Everywhere', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[hide_header_image]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[remove_header_image_link]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_remove_header_image_link_control', array( 'label' => esc_html__( 'Remove Link from Header Image', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[remove_header_image_link]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_header_image_details]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_header_image_details_control', array( 'label' => esc_html__( 'Hide both Title and Description from Header Image', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[hide_header_image_details]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_header_image_description]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_header_image_description_control', array( 'label' => esc_html__( 'Hide Description from Header Image', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[hide_header_image_description]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[header_image_custom_text]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_header_image_custom_text_control', array( 'label' => esc_html__( 'Add Custom Title/Custom Description to Header Image', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[header_image_custom_text]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[header_image_custom_title]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_header_image_custom_title_control', array( 'label' => esc_html__( 'Header Image Custom Title', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[header_image_custom_title]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[header_image_custom_description]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_header_image_custom_description_control', array( 'label' => esc_html__( 'Header Image Custom Description', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[header_image_custom_description]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[header_image_destination]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_header_image_destination_control', array( 'label' => esc_html__( 'Header Image Destination URL', 'gridpal' ), 'description' => esc_html__( 'Enter the URL a visitor should go when he/she click on the header image. If you did not enter a URL below, header image will be linked to the homepage of your website.', 'gridpal' ), 'section' => 'header_image', 'settings' => 'gridpal_options[header_image_destination]', 'type' => 'text' ) );
/* Posts grid options */
$wp_customize->add_section( 'gridpal_section_posts_grid', array( 'title' => esc_html__( 'Posts Grid Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 160 ) );
$wp_customize->add_setting( 'gridpal_options[hide_posts_heading]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_posts_heading_control', array( 'label' => esc_html__( 'Hide HomePage Posts Heading', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_posts_heading]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[posts_heading]', array( 'default' => esc_html__( 'Recent Posts', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'gridpal_posts_heading_control', array( 'label' => esc_html__( 'HomePage Posts Heading', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[posts_heading]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[hide_thumbnail_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_thumbnail_home_control', array( 'label' => esc_html__( 'Hide Thumbnails of Featured Images from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_thumbnail_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_default_thumbnail]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_default_thumbnail_control', array( 'label' => esc_html__( 'Hide Default Thumbnail Image', 'gridpal' ), 'description' => esc_html__( 'The default thumbnail image is shown when there is no featured image is set.', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_default_thumbnail]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[thumbnail_link_home]', array( 'default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_yes_no' ) );
$wp_customize->add_control( 'gridpal_thumbnail_link_home_control', array( 'label' => esc_html__( 'Thumbnails Links', 'gridpal' ), 'description' => esc_html__('Do you want thumbnails in the posts grid to be linked to their posts?', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[thumbnail_link_home]', 'type' => 'select', 'choices' => array( 'yes' => esc_html__('Yes', 'gridpal'), 'no' => esc_html__('No', 'gridpal') ) ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_title_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_title_home_control', array( 'label' => esc_html__( 'Hide Post Headers from Posts Grid', 'gridpal' ), 'description' => esc_html__('If you check this option, it will hide post titles and post author images(if author images are enabled).', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_post_title_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[post_title_link_home]', array( 'default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_yes_no' ) );
$wp_customize->add_control( 'gridpal_post_title_link_home_control', array( 'label' => esc_html__( 'Posts Titles Links', 'gridpal' ), 'description' => esc_html__('Do you want post titles in the posts grid to be linked to their posts?', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[post_title_link_home]', 'type' => 'select', 'choices' => array( 'yes' => esc_html__('Yes', 'gridpal'), 'no' => esc_html__('No', 'gridpal') ) ) );
$wp_customize->add_setting( 'gridpal_options[show_post_author_image_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_show_post_author_image_home_control', array( 'label' => esc_html__( 'Show Post Author Images on Posts Grid', 'gridpal' ), 'description' => esc_html__('This option has no effect if you have checked the option: "Hide Post Headers from Posts Grid".', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[show_post_author_image_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[author_image_link]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_author_image_link_control', array( 'label' => esc_html__( 'Link Author Image to Author Posts URL', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[author_image_link]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_author_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_author_home_control', array( 'label' => esc_html__( 'Hide Post Author Names from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_post_author_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_posted_date_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_posted_date_home_control', array( 'label' => esc_html__( 'Hide Posted Date Boxes from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_posted_date_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_posted_date_year_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_posted_date_year_home_control', array( 'label' => esc_html__( 'Hide Years from Posted Date Boxes', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_posted_date_year_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[date_box_style]', array( 'default' => 'round', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_date_box_style' ) );
$wp_customize->add_control( 'gridpal_date_box_style_control', array( 'label' => esc_html__( 'Posted Date Boxes Style', 'gridpal' ), 'description' => esc_html__('Select "round" or "square" style for posted date boxes.', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[date_box_style]', 'type' => 'select', 'choices' => array( 'square' => esc_html__('Square', 'gridpal'), 'round' => esc_html__('Round', 'gridpal') ) ) );
$wp_customize->add_setting( 'gridpal_options[hide_comments_link_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_comments_link_home_control', array( 'label' => esc_html__( 'Hide Comment Links from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_comments_link_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[comments_count_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_comments_count_home_control', array( 'label' => esc_html__( 'Display Comments Counts only on Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[comments_count_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_snippet]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_snippet_control', array( 'label' => esc_html__( 'Hide Post Snippets from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_post_snippet]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[read_more_length]', array( 'default' => 17, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_read_more_length' ) );
$wp_customize->add_control( 'gridpal_read_more_length_control', array( 'label' => esc_html__( 'Auto Post Summary Length', 'gridpal' ), 'description' => esc_html__('Enter the number of words need to display in the post summary. Default is 20 words.', 'gridpal'), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[read_more_length]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_categories_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_categories_home_control', array( 'label' => esc_html__( 'Hide Post Categories from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_post_categories_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_tags_home]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_tags_home_control', array( 'label' => esc_html__( 'Hide Post Tags from Posts Grid', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[hide_post_tags_home]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[disable_posts_grid]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_posts_grid_control', array( 'label' => esc_html__( 'Activate Non-Grid Posts', 'gridpal' ), 'description' => __( 'Check this option if you want to disable posts grid and display posts in normal way.', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[disable_posts_grid]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[featured_nongrid_media_under_post_title]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_featured_nongrid_media_under_post_title_control', array( 'label' => esc_html__( 'Move Featured Image to Bottom of Non-Grid Post Title', 'gridpal' ), 'section' => 'gridpal_section_posts_grid', 'settings' => 'gridpal_options[featured_nongrid_media_under_post_title]', 'type' => 'checkbox', ) );
/* Post options */
$wp_customize->add_section( 'gridpal_section_post', array( 'title' => esc_html__( 'Post Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 180 ) );
$wp_customize->add_setting( 'gridpal_options[thumbnail_link]', array( 'default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_yes_no' ) );
$wp_customize->add_control( 'gridpal_thumbnail_link_control', array( 'label' => esc_html__( 'Featured Image Link', 'gridpal' ), 'description' => esc_html__('Do you want the featured image in a single post to be linked to its post?', 'gridpal'), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[thumbnail_link]', 'type' => 'select', 'choices' => array( 'yes' => esc_html__('Yes', 'gridpal'), 'no' => esc_html__('No', 'gridpal') ) ) );
$wp_customize->add_setting( 'gridpal_options[hide_thumbnail]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_thumbnail_control', array( 'label' => esc_html__( 'Hide Featured Image from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_thumbnail]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[featured_media_under_post_title]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_featured_media_under_post_title_control', array( 'label' => esc_html__( 'Move Featured Image to Bottom of Full Post Title', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[featured_media_under_post_title]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_title]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_title_control', array( 'label' => esc_html__( 'Hide Post Header from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_post_title]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[remove_post_title_link]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_remove_post_title_link_control', array( 'label' => esc_html__( 'Remove Link from Full Post Title', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[remove_post_title_link]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_categories]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_categories_control', array( 'label' => esc_html__( 'Hide Post Categories from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_post_categories]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_author]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_author_control', array( 'label' => esc_html__( 'Hide Post Author from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_post_author]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_posted_date]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_posted_date_control', array( 'label' => esc_html__( 'Hide Posted Date from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_posted_date]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_comments_link]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_comments_link_control', array( 'label' => esc_html__( 'Hide Comment Link from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_comments_link]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_edit]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_edit_control', array( 'label' => esc_html__( 'Hide Post Edit Link', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_post_edit]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_tags]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_tags_control', array( 'label' => esc_html__( 'Hide Post Tags from Full Post', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_post_tags]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_author_bio_box]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_author_bio_box_control', array( 'label' => esc_html__( 'Hide Author Bio Box', 'gridpal' ), 'section' => 'gridpal_section_post', 'settings' => 'gridpal_options[hide_author_bio_box]', 'type' => 'checkbox', ) );
/* Navigation options */
$wp_customize->add_section( 'gridpal_section_navigation', array( 'title' => esc_html__( 'Post/Posts Navigation Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 185 ) );
$wp_customize->add_setting( 'gridpal_options[hide_post_navigation]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_post_navigation_control', array( 'label' => esc_html__( 'Hide Post Navigation from Full Posts', 'gridpal' ), 'section' => 'gridpal_section_navigation', 'settings' => 'gridpal_options[hide_post_navigation]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_posts_navigation]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_posts_navigation_control', array( 'label' => esc_html__( 'Hide Posts Navigation from Home/Archive/Search Pages', 'gridpal' ), 'section' => 'gridpal_section_navigation', 'settings' => 'gridpal_options[hide_posts_navigation]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[posts_navigation_type]', array( 'default' => 'numberednavi', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_posts_navigation_type' ) );
$wp_customize->add_control( 'gridpal_posts_navigation_type_control', array( 'label' => esc_html__( 'Posts Navigation Type', 'gridpal' ), 'description' => esc_html__('Select posts navigation type you need. If you activate WP-PageNavi plugin, this navigation will be replaced by WP-PageNavi navigation.', 'gridpal'), 'section' => 'gridpal_section_navigation', 'settings' => 'gridpal_options[posts_navigation_type]', 'type' => 'select', 'choices' => array( 'normalnavi' => esc_html__('Normal Navigation', 'gridpal'), 'numberednavi' => esc_html__('Numbered Navigation', 'gridpal') ) ) );
/* Page options */
$wp_customize->add_section( 'gridpal_section_page', array( 'title' => esc_html__( 'Page Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 190 ) );
$wp_customize->add_setting( 'gridpal_options[thumbnail_link_page]', array( 'default' => 'yes', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_yes_no' ) );
$wp_customize->add_control( 'gridpal_thumbnail_link_page_control', array( 'label' => esc_html__( 'Featured Image Link', 'gridpal' ), 'description' => esc_html__('Do you want the featured image in a page to be linked to its page?', 'gridpal'), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[thumbnail_link_page]', 'type' => 'select', 'choices' => array( 'yes' => esc_html__('Yes', 'gridpal'), 'no' => esc_html__('No', 'gridpal') ) ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_thumbnail]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_thumbnail_control', array( 'label' => esc_html__( 'Hide Featured Image from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_thumbnail]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[featured_media_under_page_title]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_featured_media_under_page_title_control', array( 'label' => esc_html__( 'Move Featured Image to Bottom of Page Title', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[featured_media_under_page_title]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_title]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_title_control', array( 'label' => esc_html__( 'Hide Page Header from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_title]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[remove_page_title_link]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_remove_page_title_link_control', array( 'label' => esc_html__( 'Remove Link from Single Page Title', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[remove_page_title_link]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_date]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_date_control', array( 'label' => esc_html__( 'Hide Posted Date from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_date]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_author]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_author_control', array( 'label' => esc_html__( 'Hide Page Author from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_author]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_comments]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_comments_control', array( 'label' => esc_html__( 'Hide Comment Link from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_comments]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_page_edit]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_page_edit_control', array( 'label' => esc_html__( 'Hide Edit Link from Single Page', 'gridpal' ), 'section' => 'gridpal_section_page', 'settings' => 'gridpal_options[hide_page_edit]', 'type' => 'checkbox', ) );
/* Social profiles options */
$wp_customize->add_section( 'gridpal_section_social', array( 'title' => esc_html__( 'Social Links Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 240, ));
$wp_customize->add_setting( 'gridpal_options[hide_header_social_buttons]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_header_social_buttons_control', array( 'label' => esc_html__( 'Hide Social Area', 'gridpal' ), 'description' => esc_html__('If you checked this option, all buttons will disappear. There is no any effect from these options: "Hide Search Button", "Show Login/Logout Button".', 'gridpal'), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[hide_header_social_buttons]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[hide_search_button]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_search_button_control', array( 'label' => esc_html__( 'Hide Search Button', 'gridpal' ), 'description' => esc_html__('This option has no effect if you have checked the option: "Hide Social Area".', 'gridpal'), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[hide_search_button]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[show_login_button]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_show_login_button_control', array( 'label' => esc_html__( 'Show Login/Logout Button', 'gridpal' ), 'description' => esc_html__('This option has no effect if you have checked the option: "Hide Social Area".', 'gridpal'), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[show_login_button]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[twitterlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_twitterlink_control', array( 'label' => esc_html__( 'Twitter URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[twitterlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[facebooklink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_facebooklink_control', array( 'label' => esc_html__( 'Facebook URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[facebooklink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[googlelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_googlelink_control', array( 'label' => esc_html__( 'Google Plus URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[googlelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[pinterestlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_pinterestlink_control', array( 'label' => esc_html__( 'Pinterest URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[pinterestlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[linkedinlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_linkedinlink_control', array( 'label' => esc_html__( 'Linkedin Link', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[linkedinlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[instagramlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_instagramlink_control', array( 'label' => esc_html__( 'Instagram Link', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[instagramlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[vklink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_vklink_control', array( 'label' => esc_html__( 'VK Link', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[vklink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[flickrlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_flickrlink_control', array( 'label' => esc_html__( 'Flickr Link', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[flickrlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[youtubelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_youtubelink_control', array( 'label' => esc_html__( 'Youtube URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[youtubelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[vimeolink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_vimeolink_control', array( 'label' => esc_html__( 'Vimeo URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[vimeolink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[soundcloudlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_soundcloudlink_control', array( 'label' => esc_html__( 'Soundcloud URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[soundcloudlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[messengerlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_messengerlink_control', array( 'label' => esc_html__( 'Messenger URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[messengerlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[whatsapplink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_whatsapplink_control', array( 'label' => esc_html__( 'WhatsApp URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[whatsapplink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[lastfmlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_lastfmlink_control', array( 'label' => esc_html__( 'Lastfm URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[lastfmlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[mediumlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_mediumlink_control', array( 'label' => esc_html__( 'Medium URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[mediumlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[githublink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_githublink_control', array( 'label' => esc_html__( 'Github URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[githublink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[bitbucketlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_bitbucketlink_control', array( 'label' => esc_html__( 'Bitbucket URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[bitbucketlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[tumblrlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_tumblrlink_control', array( 'label' => esc_html__( 'Tumblr URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[tumblrlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[digglink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_digglink_control', array( 'label' => esc_html__( 'Digg URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[digglink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[deliciouslink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_deliciouslink_control', array( 'label' => esc_html__( 'Delicious URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[deliciouslink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[stumblelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_stumblelink_control', array( 'label' => esc_html__( 'Stumbleupon URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[stumblelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[mixlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_mixlink_control', array( 'label' => esc_html__( 'Mix URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[mixlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[redditlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_redditlink_control', array( 'label' => esc_html__( 'Reddit URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[redditlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[dribbblelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_dribbblelink_control', array( 'label' => esc_html__( 'Dribbble URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[dribbblelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[flipboardlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_flipboardlink_control', array( 'label' => esc_html__( 'Flipboard URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[flipboardlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[bloggerlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_bloggerlink_control', array( 'label' => esc_html__( 'Blogger URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[bloggerlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[etsylink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_etsylink_control', array( 'label' => esc_html__( 'Etsy URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[etsylink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[behancelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_behancelink_control', array( 'label' => esc_html__( 'Behance URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[behancelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[amazonlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_amazonlink_control', array( 'label' => esc_html__( 'Amazon URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[amazonlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[meetuplink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_meetuplink_control', array( 'label' => esc_html__( 'Meetup URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[meetuplink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[mixcloudlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_mixcloudlink_control', array( 'label' => esc_html__( 'Mixcloud URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[mixcloudlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[slacklink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_slacklink_control', array( 'label' => esc_html__( 'Slack URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[slacklink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[snapchatlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_snapchatlink_control', array( 'label' => esc_html__( 'Snapchat URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[snapchatlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[spotifylink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_spotifylink_control', array( 'label' => esc_html__( 'Spotify URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[spotifylink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[yelplink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_yelplink_control', array( 'label' => esc_html__( 'Yelp URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[yelplink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[wordpresslink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_wordpresslink_control', array( 'label' => esc_html__( 'WordPress URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[wordpresslink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[twitchlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_twitchlink_control', array( 'label' => esc_html__( 'Twitch URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[twitchlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[telegramlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_telegramlink_control', array( 'label' => esc_html__( 'Telegram URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[telegramlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[bandcamplink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_bandcamplink_control', array( 'label' => esc_html__( 'Bandcamp URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[bandcamplink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[quoralink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_quoralink_control', array( 'label' => esc_html__( 'Quora URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[quoralink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[foursquarelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_foursquarelink_control', array( 'label' => esc_html__( 'Foursquare URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[foursquarelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[deviantartlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_deviantartlink_control', array( 'label' => esc_html__( 'DeviantArt URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[deviantartlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[imdblink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_imdblink_control', array( 'label' => esc_html__( 'IMDB URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[imdblink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[codepenlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_codepenlink_control', array( 'label' => esc_html__( 'Codepen URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[codepenlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[jsfiddlelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_jsfiddlelink_control', array( 'label' => esc_html__( 'JSFiddle URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[jsfiddlelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[stackoverflowlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_stackoverflowlink_control', array( 'label' => esc_html__( 'Stack Overflow URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[stackoverflowlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[stackexchangelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_stackexchangelink_control', array( 'label' => esc_html__( 'Stack Exchange URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[stackexchangelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[bsalink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_bsalink_control', array( 'label' => esc_html__( 'BuySellAds URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[bsalink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[web500pxlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_web500pxlink_control', array( 'label' => esc_html__( '500px URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[web500pxlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[ellolink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_ellolink_control', array( 'label' => esc_html__( 'Ello URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[ellolink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[discordlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_discordlink_control', array( 'label' => esc_html__( 'Discord URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[discordlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[goodreadslink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_goodreadslink_control', array( 'label' => esc_html__( 'Goodreads URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[goodreadslink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[odnoklassnikilink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_odnoklassnikilink_control', array( 'label' => esc_html__( 'Odnoklassniki URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[odnoklassnikilink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[houzzlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_houzzlink_control', array( 'label' => esc_html__( 'Houzz URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[houzzlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[pocketlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_pocketlink_control', array( 'label' => esc_html__( 'Pocket URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[pocketlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[xinglink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_xinglink_control', array( 'label' => esc_html__( 'XING URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[xinglink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[googleplaylink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_googleplaylink_control', array( 'label' => esc_html__( 'Google Play URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[googleplaylink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[slidesharelink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_slidesharelink_control', array( 'label' => esc_html__( 'SlideShare URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[slidesharelink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[dropboxlink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_dropboxlink_control', array( 'label' => esc_html__( 'Dropbox URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[dropboxlink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[paypallink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_paypallink_control', array( 'label' => esc_html__( 'PayPal URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[paypallink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[viadeolink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_viadeolink_control', array( 'label' => esc_html__( 'Viadeo URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[viadeolink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[wikipedialink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_wikipedialink_control', array( 'label' => esc_html__( 'Wikipedia URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[wikipedialink]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[skypeusername]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) );
$wp_customize->add_control( 'gridpal_skypeusername_control', array( 'label' => esc_html__( 'Skype Username', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[skypeusername]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[emailaddress]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_email' ) );
$wp_customize->add_control( 'gridpal_emailaddress_control', array( 'label' => esc_html__( 'Email Address', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[emailaddress]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[rsslink]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_url_raw' ) );
$wp_customize->add_control( 'gridpal_rsslink_control', array( 'label' => esc_html__( 'RSS Feed URL', 'gridpal' ), 'section' => 'gridpal_section_social', 'settings' => 'gridpal_options[rsslink]', 'type' => 'text' ) );
/* Footer options */
$wp_customize->add_section( 'gridpal_section_footer', array( 'title' => esc_html__( 'Footer Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 280 ) );
$wp_customize->add_setting( 'gridpal_options[footer_text]', array( 'default' => '', 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_footer_text_control', array( 'label' => esc_html__( 'Footer copyright notice', 'gridpal' ), 'section' => 'gridpal_section_footer', 'settings' => 'gridpal_options[footer_text]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[hide_footer_widgets]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_footer_widgets_control', array( 'label' => esc_html__( 'Hide Footer Widgets', 'gridpal' ), 'section' => 'gridpal_section_footer', 'settings' => 'gridpal_options[hide_footer_widgets]', 'type' => 'checkbox', ) );
/* Search and 404 options */
$wp_customize->add_section( 'gridpal_section_search_404', array( 'title' => esc_html__( 'Search and 404 Pages Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 340 ) );
$wp_customize->add_setting( 'gridpal_options[no_search_heading]', array( 'default' => esc_html__( 'Nothing Found', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_no_search_heading_control', array( 'label' => esc_html__( 'No Search Results Heading', 'gridpal' ), 'description' => esc_html__( 'Enter a heading to display when no search results are found.', 'gridpal' ), 'section' => 'gridpal_section_search_404', 'settings' => 'gridpal_options[no_search_heading]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[no_search_results]', array( 'default' => esc_html__( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_no_search_results_control', array( 'label' => esc_html__( 'No Search Results Message', 'gridpal' ), 'description' => esc_html__( 'Enter a message to display when no search results are found.', 'gridpal' ), 'section' => 'gridpal_section_search_404', 'settings' => 'gridpal_options[no_search_results]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[error_404_heading]', array( 'default' => esc_html__( 'Oops! That page can not be found.', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_error_404_heading_control', array( 'label' => esc_html__( '404 Error Page Heading', 'gridpal' ), 'description' => esc_html__( 'Enter the heading for the 404 error page.', 'gridpal' ), 'section' => 'gridpal_section_search_404', 'settings' => 'gridpal_options[error_404_heading]', 'type' => 'text' ) );
$wp_customize->add_setting( 'gridpal_options[error_404_message]', array( 'default' => esc_html__( 'It looks like nothing was found at this location. Maybe try one of the links below or a search?', 'gridpal' ), 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_html', ) );
$wp_customize->add_control( 'gridpal_error_404_message_control', array( 'label' => esc_html__( 'Error 404 Message', 'gridpal' ), 'description' => esc_html__( 'Enter a message to display on the 404 error page.', 'gridpal' ), 'section' => 'gridpal_section_search_404', 'settings' => 'gridpal_options[error_404_message]', 'type' => 'text', ) );
$wp_customize->add_setting( 'gridpal_options[hide_404_search]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_hide_404_search_control', array( 'label' => esc_html__( 'Hide Search Box from 404 Page', 'gridpal' ), 'section' => 'gridpal_section_search_404', 'settings' => 'gridpal_options[hide_404_search]', 'type' => 'checkbox', ) );
/* Other options */
$wp_customize->add_section( 'gridpal_section_other_options', array( 'title' => esc_html__( 'Other Options', 'gridpal' ), 'panel' => 'gridpal_main_options_panel', 'priority' => 600 ) );
$wp_customize->add_setting( 'gridpal_options[disable_loading_animation]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_loading_animation_control', array( 'label' => esc_html__( 'Disable Site Loading Animation', 'gridpal' ), 'section' => 'gridpal_section_other_options', 'settings' => 'gridpal_options[disable_loading_animation]', 'type' => 'checkbox', ) );
$wp_customize->add_setting( 'gridpal_options[disable_fitvids]', array( 'default' => false, 'type' => 'option', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'gridpal_sanitize_checkbox', ) );
$wp_customize->add_control( 'gridpal_disable_fitvids_control', array( 'label' => esc_html__( 'Disable FitVids.JS', 'gridpal' ), 'description' => esc_html__( 'You can disable fitvids.js script if you are not using videos on your website or if you do not want fluid width videos in your post content.', 'gridpal' ), 'section' => 'gridpal_section_other_options', 'settings' => 'gridpal_options[disable_fitvids]', 'type' => 'checkbox', ) );
/* Upgrade to pro options */
$wp_customize->add_section( 'gridpal_section_upgrade', array( 'title' => esc_html__( 'Upgrade to Pro Version', 'gridpal' ), 'priority' => 400 ) );
$wp_customize->add_setting( 'gridpal_options[upgrade_text]', array( 'default' => '', 'sanitize_callback' => '__return_false', ) );
$wp_customize->add_control( new GridPal_Customize_Static_Text_Control( $wp_customize, 'gridpal_upgrade_text_control', array(
'label' => esc_html__( 'GridPal Pro', 'gridpal' ),
'section' => 'gridpal_section_upgrade',
'settings' => 'gridpal_options[upgrade_text]',
'description' => esc_html__( 'Do you enjoy GridPal? Upgrade to GridPal Pro now and get:', 'gridpal' ).
'' .
'- ' . esc_html__( 'Color Options', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Font Options', 'gridpal' ) . '
' .
'- ' . esc_html__( '1/2/3/4/5/6/7/8/9/10 Columns Options for Posts Grids', 'gridpal' ) . '
' .
'- ' . esc_html__( '10+ Thumbnail Sizes Options for Posts Grids', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Switch between Masonry Grid (JavaScript based) and CSS only Grid', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Display Ads/Custom Contents between Posts in the Grid', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Switch between Boxed or Full Layout Type', 'gridpal' ) . '
' .
'- ' . esc_html__( '10+ Layout Styles for Posts/Pages', 'gridpal' ) . '
' .
'- ' . esc_html__( '10+ Layout Styles for Non-Singular Pages', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Width Change Options for Full Website/Main Content/Left Sidebar/Right Sidebar', 'gridpal' ) . '
' .
'- ' . esc_html__( '10+ Custom Page Templates', 'gridpal' ) . '
' .
'- ' . esc_html__( '10+ Custom Post Templates', 'gridpal' ) . '
' .
'- ' . esc_html__( '3 Header Layouts with Width options - (Logo + Primary Menu + Social Buttons) / (Logo + Header Banner) / (Full Width Header)', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Footer with Layout Options (1/2/3/4/5/6 columns)', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Ability to Change Website Width/Layout Type/Layout Style/Header Style/Footer Style of any Post/Page', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Capability to Add Different Header Images for Each Post/Page with Unique Link, Title and Description', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Grid Featured Posts Widget (Recent/Categories/Tags/PostIDs based) - with capability to display posts according to Likes/Views/Comments/Dates/... and there are many options', 'gridpal' ) . '
' .
'- ' . esc_html__( 'List Featured Posts Widget (Recent/Categories/Tags/PostIDs based) - with capability to display posts according to Likes/Views/Comments/Dates/... and there are many options', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Tabbed Widget (Recent/Categories/Tags/PostIDs based) - with capability to display posts according to Likes/Views/Comments/Dates/... and there are many options.', 'gridpal' ) . '
' .
'- ' . esc_html__( 'About and Social Widget - 60+ Social Buttons', 'gridpal' ) . '
' .
'- ' . esc_html__( 'News Ticker (Recent/Categories/Tags/PostIDs based) - It can display posts according to Likes/Views/Comments/Dates/... and there are many options.', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Settings Panel to Control Options in Each Post', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Settings Panel to Control Options in Each Page', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Built-in Posts Views Counter', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Built-in Posts Likes System', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Built-in Infinite Scroll and Load More Button', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Post Share Buttons Styles with Options - 25+ Social Networks are Supported', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Related Posts (Categories/Tags/Author/PostIDs based) with Many Options - For both single posts and post summaries', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Sticky Header/Sticky Sidebars with enable/disable capability', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Author Bio Box with Social Buttons - 60+ Social Buttons', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Ability to Enable/Disable Mobile View from Primary and Secondary Menus', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Post Navigation with Thumbnails', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Ability to add Ads under Post Title and under Post Content', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Ability to Disable Google Fonts - for faster loading', 'gridpal' ) . '
' .
'- ' . esc_html__( 'More Widget Areas', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Built-in Contact Form', 'gridpal' ) . '
' .
'- ' . esc_html__( 'WooCommerce Compatible', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Yoast SEO Breadcrumbs Support', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Full RTL Language Support', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Search Engine Optimized', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Random Posts Button in Header', 'gridpal' ) . '
' .
'- ' . esc_html__( 'Many Useful Customizer Theme options', 'gridpal' ) . '
' .
'- ' . esc_html__( 'More Features...', 'gridpal' ) . '
' .
'
'.
' ' . esc_html__( 'Upgrade To GridPal PRO', 'gridpal' ) . ''
) ) );
}
add_action( 'customize_register', 'gridpal_register_theme_customizer' );
/**
* Render the site title for the selective refresh partial.
*
* @return void
*/
function gridpal_customize_partial_blogname() {
bloginfo( 'name' );
}
/**
* Render the site tagline for the selective refresh partial.
*
* @return void
*/
function gridpal_customize_partial_blogdescription() {
bloginfo( 'description' );
}
function gridpal_customizer_js_scripts() {
wp_enqueue_script('gridpal-theme-customizer-js', get_template_directory_uri() . '/assets/js/customizer.js', array( 'jquery', 'customize-preview' ), NULL, true);
}
add_action( 'customize_preview_init', 'gridpal_customizer_js_scripts' );