function digitalstore_preview_add_controls($wp_customize) { $options = digitalstore_get_theme_options(); // Additional control formats for the customize feature locate_template(array('includes/customize/class-wp-customize-controls.php'), true); /* Image Logo */ $wp_customize->add_setting('digitalstore_theme_options[logo_image]', array('default' => $options['logo_image'], 'section' => 'strings', 'capability' => digitalstore_option_page_capability(), 'type' => 'option')); $wp_customize->add_control(new DigitalStore_WP_Customize_Logo_Image_Control($wp_customize)); /* Skin */ $wp_customize->add_section('digitalstore_skins', array('title' => __('Skins', 'edd-digitalstore'), 'priority' => 6)); $wp_customize->add_setting('digitalstore_theme_options[theme_skin]', array('default' => $options['theme_skin'], 'section' => 'digitalstore_skins', 'capability' => digitalstore_option_page_capability(), 'type' => 'option')); $wp_customize->add_control('digitalstore_theme_options[theme_skin]', array('label' => __('Variations', 'edd-digitalstore'), 'section' => 'digitalstore_skins', 'type' => 'select', 'choices' => digitalstore_theme_skin_options())); /* Accent Color */ $wp_customize->add_setting('digitalstore_theme_options[accent_color]', array('default' => $options['accent_color'], 'control' => 'color', 'sanitize_callback' => 'digitalstore_sanitize_hex', 'capability' => digitalstore_option_page_capability(), 'type' => 'option')); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'digitalstore_theme_options[accent_color]', array('label' => __('Highlight Color', 'edd-digitalstore'), 'section' => 'digitalstore_skins'))); /* Footer Text */ $wp_customize->add_section('digitalstore_footer', array('title' => __('Footer', 'edd-digitalstore'), 'priority' => 45)); $wp_customize->add_setting('digitalstore_theme_options[footer_text]', array('default' => $options['footer_text'], 'capability' => digitalstore_option_page_capability(), 'sanitize_callback' => 'digitalstore_sanitize_footer_text', 'type' => 'option', 'transport' => 'postMessage')); $wp_customize->add_control(new DigitalStore_WP_Customize_Textarea_Control($wp_customize, 'digitalstore_theme_options[footer_text]', array('label' => __('Footer Text', 'edd-digitalstore'), 'section' => 'digitalstore_footer'))); }
/** * Digital Store Theme Updater * * @access private * @since 1.1 * @return void */ function digitalstore_theme_updater() { if (!class_exists('EDD_SL_Theme_Updater')) { // Load our custom theme updater include dirname(__FILE__) . '/EDD_SL_Theme_Updater.php'; } $options = digitalstore_get_theme_options(); $license = trim($options['license_key']); if (empty($license)) { return; } $edd_updater = new EDD_SL_Theme_Updater(array('remote_api_url' => EDD_DIGITAL_STORE_STORE_URL, 'version' => EDD_DIGITAL_STORE_VERSION, 'license' => $license, 'item_name' => EDD_DIGITAL_STORE_THEME_NAME, 'author' => 'Matt Varone and Pippin Williamson')); }
function digitalstore_print_theme_accent() { $options = digitalstore_get_theme_options(); if ($options['accent_color'] === digitalstore_get_default_accent_color($options['theme_skin'])) { return; } ?> <style type="text/css" media="screen"> #masthead a, #container a, #colophon a, #branding h1 a:hover, #access li a:hover, #access ul li:hover a, #access ul li:hover li a:hover, #access .digitalstore-checkout a:hover, #access-secondary a:hover, .entry-utility a:hover, .type-post .entry-meta a:hover, .breadcrumbs a:hover, .view-all:hover, #comments a:hover, .latest-add-to-cart:hover, #colophon #credits a:hover, .entry-content a:hover, .widget a:hover, .related-entry-title:hover, .related-entry-title, .display-listing h3 a:hover, .display-listing h4 a:hover, .downloads-meta h5 a:hover, h2.entry-title a:hover, #complementary ul.menu li a { color: #<?php echo $options['accent_color']; ?> !important } body, #masthead a, #container a, #colophon a, .entry-add-to-cart, a.edd-remove-from-cart, a.widget-download-title:hover, .entry-content a:hover, .widget a:hover, #access-secondary a:hover, .entry-utility a:hover, .type-post .entry-meta a:hover, .breadcrumbs a:hover, .view-all:hover, #comments a:hover, .latest-add-to-cart:hover, #colophon #credits a:hover, .digitalstore-pagination a:hover, #complementary ul.menu li a:hover { border-color: #<?php echo $options['accent_color']; ?> } </style> <?php }