Initial import of the bdmurphy Bookshelf work: the bd-bookshelf theme, bd-bookshelf-plugin, bd-bookshelfhelper and bd-simpleemail plugins, plus the specification documents, mockups and release archives.
147 lines
4.2 KiB
PHP
147 lines
4.2 KiB
PHP
<?php
|
|
/**
|
|
* Customizer Settings
|
|
*
|
|
* @package BD_Murphy
|
|
*/
|
|
|
|
if (!defined('ABSPATH')) {
|
|
exit;
|
|
}
|
|
|
|
function bdm_customize_register($wp_customize) {
|
|
$wp_customize->add_panel('bdm_colors', array(
|
|
'title' => __('Colors', 'bd-murphy'),
|
|
'priority' => 30,
|
|
));
|
|
|
|
$wp_customize->add_section('bdm_primary_colors', array(
|
|
'title' => __('Primary Colors', 'bd-murphy'),
|
|
'panel' => 'bdm_colors',
|
|
));
|
|
|
|
$wp_customize->add_setting('primary_color', array(
|
|
'default' => '#1B3A6B',
|
|
'sanitize_callback' => 'sanitize_hex_color',
|
|
));
|
|
|
|
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_color', array(
|
|
'label' => __('Primary Color (Navy)', 'bd-murphy'),
|
|
'section' => 'bdm_primary_colors',
|
|
)));
|
|
|
|
$wp_customize->add_setting('accent_color', array(
|
|
'default' => '#C8A96E',
|
|
'sanitize_callback' => 'sanitize_hex_color',
|
|
));
|
|
|
|
$wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'accent_color', array(
|
|
'label' => __('Accent Color (Gold)', 'bd-murphy'),
|
|
'section' => 'bdm_primary_colors',
|
|
)));
|
|
|
|
$wp_customize->add_panel('bdm_typography', array(
|
|
'title' => __('Typography', 'bd-murphy'),
|
|
'priority' => 35,
|
|
));
|
|
|
|
$wp_customize->add_section('bdm_heading_fonts', array(
|
|
'title' => __('Headings', 'bd-murphy'),
|
|
'panel' => 'bdm_typography',
|
|
));
|
|
|
|
$heading_fonts = array(
|
|
'Playfair Display' => 'Playfair Display',
|
|
'Merriweather' => 'Merriweather',
|
|
'Libre Baskerville' => 'Libre Baskerville',
|
|
'Lora' => 'Lora',
|
|
'Georgia' => 'Georgia',
|
|
);
|
|
|
|
$wp_customize->add_setting('heading_font', array(
|
|
'default' => 'Playfair Display',
|
|
'sanitize_callback' => 'sanitize_text_field',
|
|
));
|
|
|
|
$wp_customize->add_control('heading_font', array(
|
|
'label' => __('Heading Font', 'bd-murphy'),
|
|
'section' => 'bdm_heading_fonts',
|
|
'type' => 'select',
|
|
'choices' => $heading_fonts,
|
|
));
|
|
|
|
$wp_customize->add_section('bdm_body_fonts', array(
|
|
'title' => __('Body', 'bd-murphy'),
|
|
'panel' => 'bdm_typography',
|
|
));
|
|
|
|
$body_fonts = array(
|
|
'Lato' => 'Lato',
|
|
'Open Sans' => 'Open Sans',
|
|
'Source Sans Pro' => 'Source Sans Pro',
|
|
'Roboto' => 'Roboto',
|
|
'Calibri' => 'Calibri',
|
|
);
|
|
|
|
$wp_customize->add_setting('body_font', array(
|
|
'default' => 'Lato',
|
|
'sanitize_callback' => 'sanitize_text_field',
|
|
));
|
|
|
|
$wp_customize->add_control('body_font', array(
|
|
'label' => __('Body Font', 'bd-murphy'),
|
|
'section' => 'bdm_body_fonts',
|
|
'type' => 'select',
|
|
'choices' => $body_fonts,
|
|
));
|
|
|
|
$wp_customize->add_section('bdm_social_sharing', array(
|
|
'title' => __('Social Sharing', 'bd-murphy'),
|
|
'priority' => 60,
|
|
));
|
|
|
|
$wp_customize->add_setting('share_facebook', array(
|
|
'default' => true,
|
|
'sanitize_callback' => 'wp_validate_boolean',
|
|
));
|
|
|
|
$wp_customize->add_control('share_facebook', array(
|
|
'label' => __('Show Facebook', 'bd-murphy'),
|
|
'section' => 'bdm_social_sharing',
|
|
'type' => 'checkbox',
|
|
));
|
|
|
|
$wp_customize->add_setting('share_twitter', array(
|
|
'default' => true,
|
|
'sanitize_callback' => 'wp_validate_boolean',
|
|
));
|
|
|
|
$wp_customize->add_control('share_twitter', array(
|
|
'label' => __('Show X/Twitter', 'bd-murphy'),
|
|
'section' => 'bdm_social_sharing',
|
|
'type' => 'checkbox',
|
|
));
|
|
|
|
$wp_customize->add_setting('share_linkedin', array(
|
|
'default' => true,
|
|
'sanitize_callback' => 'wp_validate_boolean',
|
|
));
|
|
|
|
$wp_customize->add_control('share_linkedin', array(
|
|
'label' => __('Show LinkedIn', 'bd-murphy'),
|
|
'section' => 'bdm_social_sharing',
|
|
'type' => 'checkbox',
|
|
));
|
|
|
|
$wp_customize->add_setting('share_whatsapp', array(
|
|
'default' => true,
|
|
'sanitize_callback' => 'wp_validate_boolean',
|
|
));
|
|
|
|
$wp_customize->add_control('share_whatsapp', array(
|
|
'label' => __('Show WhatsApp', 'bd-murphy'),
|
|
'section' => 'bdm_social_sharing',
|
|
'type' => 'checkbox',
|
|
));
|
|
}
|
|
add_action('customize_register', 'bdm_customize_register'); |