File manager - Edit - /home/aussies6/public_html/wp-content/themes/topshop/customizer/customizer-options.php
Back
<?php /** * Defines customizer options * * @package Customizer Library Demo */ function customizer_library_topshop_options() { // Theme defaults $primary_color = '#29a6e5'; $secondary_color = '#266ee4'; $nav_bg_color = '#FFFFFF'; $footer_bg_color = '#FFFFFF'; $body_font_color = '#4F4F4F'; $heading_font_color = '#5E5E5E'; // Stores all the controls that will be added $options = array(); // Stores all the sections to be added $sections = array(); // Adds the sections to the $options array $options['sections'] = $sections; // Layout Settings $section = 'topshop-layout'; $sections[] = array( 'id' => $section, 'title' => __( 'Layout Options', 'topshop' ), 'priority' => '30' ); $choices = array( 'topshop-layout-full-width' => __( 'Full Width Layout', 'topshop' ), 'topshop-layout-boxed' => __( 'Boxed Layout', 'topshop' ) ); $options['topshop-site-layout'] = array( 'id' => 'topshop-site-layout', 'label' => __( 'Site Layout', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $choices, 'description' => __( 'Select between a Full Width or Boxed layout', 'topshop' ), 'default' => 'topshop-layout-full-width' ); // WooCommerce style Layout if ( topshop_is_woocommerce_activated() ) : $options['topshop-woocommerce-shop-fullwidth'] = array( 'id' => 'topshop-woocommerce-shop-fullwidth', 'label' => __( 'Make Shop page full width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'default' => 0, ); $options['topshop-woocommerce-shop-archive-fullwidth'] = array( 'id' => 'topshop-woocommerce-shop-archive-fullwidth', 'label' => __( 'Make Shop archive pages full width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'default' => 0, ); $options['topshop-woocommerce-shop-single-fullwidth'] = array( 'id' => 'topshop-woocommerce-shop-single-fullwidth', 'label' => __( 'Make Shop single pages full width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'default' => 0, ); endif; $options['topshop-remove-page-title'] = array( 'id' => 'topshop-remove-page-title', 'label' => __( 'Remove Page Titles', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Select to remove all page titles', 'topshop' ), 'default' => 0, ); $choices = array( 'topshop-header-layout-standard' => __( 'Standard Layout', 'topshop' ), 'topshop-header-layout-centered' => __( 'Centered Layout', 'topshop' ), 'topshop-header-layout-three' => __( 'Standard Social Layout', 'topshop' ) ); $options['topshop-header-layout'] = array( 'id' => 'topshop-header-layout', 'label' => __( 'Header Layout', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $choices, 'default' => 'topshop-header-layout-standard' ); $options['topshop-header-search'] = array( 'id' => 'topshop-header-search', 'label' => __( 'Show Search', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Enable to a slogan for your site. This uses the site Tagline', 'topshop' ), 'default' => 0, ); $options['topshop-sticky-header'] = array( 'id' => 'topshop-sticky-header', 'label' => __( 'Sticky Header', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Select this box to make the main navigation sticky', 'topshop' ), 'default' => 0, ); $options['topshop-show-header-top-bar'] = array( 'id' => 'topshop-show-header-top-bar', 'label' => __( 'Show Top Bar', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'This will show/hide the top bar in the header<br /><br /><a href="https://kairaweb.com/documentation/topshop-hooks-developers/" target="_blank">TopShop Premium has hooks</a> integrated for developers to hook on to', 'topshop' ), 'default' => 0, ); $options['topshop-header-remove-acc'] = array( 'id' => 'topshop-header-remove-acc', 'label' => __( 'Remove "Sign In/Account" link', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'default' => 0, ); $options['topshop-header-remove-cart'] = array( 'id' => 'topshop-header-remove-cart', 'label' => __( 'Remove WooCommerce Cart', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'default' => 0, ); $choices = array( 'fa-shopping-cart' => __( 'Shopping Cart', 'topshop' ), 'fa-shopping-basket' => __( 'Shopping Basket', 'topshop' ), 'fa-shopping-bag' => __( 'Shopping Bag', 'topshop' ) ); $options['topshop-cart-icon'] = array( 'id' => 'topshop-cart-icon', 'label' => __( 'Cart Icon', 'topshop' ), 'section' => $section, 'type' => 'select', 'description' => __( 'Due to the AJAX, This will only change when you open the site again in a new tab', 'topshop' ), 'choices' => $choices, 'default' => 'fa-shopping-cart' ); // Blog Settings $section = 'topshop-slider'; $sections[] = array( 'id' => $section, 'title' => __( 'Slider Options', 'topshop' ), 'priority' => '35' ); $choices = array( 'topshop-slider-default' => __( 'Default Slider', 'topshop' ), 'topshop-meta-slider' => __( 'Meta Slider', 'topshop' ), 'topshop-no-slider' => __( 'None', 'topshop' ) ); $options['topshop-slider-type'] = array( 'id' => 'topshop-slider-type', 'label' => __( 'Choose a Slider', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $choices, 'default' => 'topshop-slider-default' ); $options['topshop-slider-cats'] = array( 'id' => 'topshop-slider-cats', 'label' => __( 'Slider Categories', 'topshop' ), 'section' => $section, 'type' => 'text', 'description' => __( 'Enter the ID\'s of the post categories you want to display in the slider. Eg: "13,17,19" (no spaces and only comma\'s)<br /><a href="https://kairaweb.com/documentation/setting-up-the-default-slider/" target="_blank"><b>Follow instructions here</b></a>', 'topshop' ) ); $options['topshop-meta-slider-shortcode'] = array( 'id' => 'topshop-meta-slider-shortcode', 'label' => __( 'Slider Shortcode', 'topshop' ), 'section' => $section, 'type' => 'text', 'description' => __( 'For a more advanced slider we recommend <a href="https://getdpd.com/cart/hoplink/15318?referrer=9jtzbgs34v8k4c0gs" target="_blank">Meta Slider</a><br /><br />Enter the slider shortcode here', 'topshop' ) ); $options['topshop-slider-linkto-post'] = array( 'id' => 'topshop-slider-linkto-post', 'label' => __( 'Link Slide to post', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Select this box to make the slide link to the post', 'topshop' ), 'default' => 0, ); $options['topshop-slider-remove-title'] = array( 'id' => 'topshop-slider-remove-title', 'label' => __( 'Remove Slider Title', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Select this box to remove the text on the slide', 'topshop' ), 'default' => 0, ); $options['topshop-slider-auto-scroll'] = array( 'id' => 'topshop-slider-auto-scroll', 'label' => __( 'Stop Auto Slide', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Click to stop the slider scrolling automatically', 'topshop' ), 'default' => 0, ); // Colors $section = 'topshop-styling'; $font_choices = customizer_library_get_font_choices(); $sections[] = array( 'id' => $section, 'title' => __( 'Styling Options', 'topshop' ), 'priority' => '38' ); $options['topshop-main-color'] = array( 'id' => 'topshop-main-color', 'label' => __( 'Main Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $primary_color, ); $options['topshop-main-color-hover'] = array( 'id' => 'topshop-main-color-hover', 'label' => __( 'Secondary Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $secondary_color, ); $options['topshop-nav-color'] = array( 'id' => 'topshop-nav-color', 'label' => __( 'Navigation Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $nav_bg_color, ); $options['topshop-body-font'] = array( 'id' => 'topshop-body-font', 'label' => __( 'Body Font', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $font_choices, 'default' => 'Open Sans' ); $options['topshop-body-font-color'] = array( 'id' => 'topshop-body-font-color', 'label' => __( 'Body Font Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $body_font_color, ); $options['topshop-heading-font'] = array( 'id' => 'topshop-heading-font', 'label' => __( 'Headings Font', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $font_choices, 'default' => 'Raleway' ); $options['topshop-heading-font-color'] = array( 'id' => 'topshop-heading-font-color', 'label' => __( 'Heading Font Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $heading_font_color, ); $options['topshop-footer-color'] = array( 'id' => 'topshop-footer-color', 'label' => __( 'Footer Color', 'topshop' ), 'section' => $section, 'type' => 'color', 'default' => $footer_bg_color, ); $options['topshop-custom-css'] = array( 'id' => 'topshop-custom-css', 'label' => __( 'Custom CSS', 'topshop' ), 'section' => $section, 'type' => 'textarea', 'default' => __( '', 'topshop'), 'description' => __( 'Add custom CSS to your theme', 'topshop' ) ); // Blog Settings $section = 'topshop-blog'; $sections[] = array( 'id' => $section, 'title' => __( 'Blog Options', 'topshop' ), 'priority' => '50' ); $choices = array( 'blog-post-side-layout' => __( 'Side Layout', 'topshop' ), 'blog-post-top-layout' => __( 'Top Layout', 'topshop' ) ); $options['topshop-blog-layout'] = array( 'id' => 'topshop-blog-layout', 'label' => __( 'Blog Post Layout', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $choices, 'default' => 'blog-post-side-layout' ); $options['topshop-setting-blog-full-width'] = array( 'id' => 'topshop-setting-blog-full-width', 'label' => __( 'Blog Full Width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Click to make the blog page Full Width', 'topshop' ), 'default' => 0, ); $options['topshop-setting-blog-cats-full-width'] = array( 'id' => 'topshop-setting-blog-cats-full-width', 'label' => __( 'Blog Archive/Category Full Width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Click to make the blog archive & categories pages Full Width', 'topshop' ), 'default' => 0, ); $options['topshop-setting-blog-single-full-width'] = array( 'id' => 'topshop-setting-blog-single-full-width', 'label' => __( 'Blog Single Full Width', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Click to make the blog single pages Full Width', 'topshop' ), 'default' => 0, ); $options['topshop-single-remove-title'] = array( 'id' => 'topshop-single-remove-title', 'label' => __( 'Remove Single Page Titles', 'topshop' ), 'section' => $section, 'type' => 'checkbox', 'description' => __( 'Select to remove all single page titles', 'topshop' ), 'default' => 0, ); $options['topshop-blog-title'] = array( 'id' => 'topshop-blog-title', 'label' => __( 'Blog Page Title', 'topshop' ), 'section' => $section, 'type' => 'text', 'default' => 'Blog' ); $options['topshop-blog-cats'] = array( 'id' => 'topshop-blog-cats', 'label' => __( 'Exclude Blog Categories', 'topshop' ), 'section' => $section, 'type' => 'text', 'description' => __( 'Enter the ID\'s of the post categories you\'d like to EXCLUDE from the Blog, enter only the ID\'s with a minus sign (-) before them, separated by a comma (,)<br />Eg: "-13, -17, -19"<br />If you enter the ID\'s without the minus then it\'ll show ONLY posts in those categories.', 'topshop' ) ); $choices = array( 'blog-use-images-loop' => __( 'Images Carousel', 'topshop' ), 'blog-use-featured-image' => __( 'Use only the featured image', 'topshop' ) ); $options['topshop-blog-list-image-type'] = array( 'id' => 'topshop-blog-list-image-type', 'label' => __( 'Blog List Image', 'topshop' ), 'section' => $section, 'type' => 'select', 'choices' => $choices, 'default' => 'blog-use-featured-image' ); // Social Settings $section = 'topshop-social'; $sections[] = array( 'id' => $section, 'title' => __( 'Social Links', 'topshop' ), 'priority' => '80' ); $options['topshop-social-email'] = array( 'id' => 'topshop-social-email', 'label' => __( 'Email Address', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-skype'] = array( 'id' => 'topshop-social-skype', 'label' => __( 'Skype Name', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-facebook'] = array( 'id' => 'topshop-social-facebook', 'label' => __( 'Facebook', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-twitter'] = array( 'id' => 'topshop-social-twitter', 'label' => __( 'Twitter', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-google-plus'] = array( 'id' => 'topshop-social-google-plus', 'label' => __( 'Google Plus', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-youtube'] = array( 'id' => 'topshop-social-youtube', 'label' => __( 'YouTube', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-vimeo'] = array( 'id' => 'topshop-social-vimeo', 'label' => __( 'Vimeo', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-instagram'] = array( 'id' => 'topshop-social-instagram', 'label' => __( 'Instagram', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-pinterest'] = array( 'id' => 'topshop-social-pinterest', 'label' => __( 'Pinterest', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-linkedin'] = array( 'id' => 'topshop-social-linkedin', 'label' => __( 'LinkedIn', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-behance'] = array( 'id' => 'topshop-social-behance', 'label' => __( 'Behance', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-medium'] = array( 'id' => 'topshop-social-medium', 'label' => __( 'Medium', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-vk'] = array( 'id' => 'topshop-social-vk', 'label' => __( 'Vkontakte', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-tumblr'] = array( 'id' => 'topshop-social-tumblr', 'label' => __( 'Tumblr', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-flickr'] = array( 'id' => 'topshop-social-flickr', 'label' => __( 'Flickr', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-git'] = array( 'id' => 'topshop-social-git', 'label' => __( 'Git', 'topshop' ), 'section' => $section, 'type' => 'text', ); $options['topshop-social-bbucket'] = array( 'id' => 'topshop-social-bbucket', 'label' => __( 'Bit Bucket', 'topshop' ), 'section' => $section, 'type' => 'text', ); // Site Text Settings $section = 'topshop-website'; $sections[] = array( 'id' => $section, 'title' => __( 'Website Text', 'topshop' ), 'priority' => '50' ); $options['topshop-header-info-text'] = array( 'id' => 'topshop-header-info-text', 'label' => __( 'Header Info Text', 'topshop' ), 'section' => $section, 'type' => 'text', 'default' => __( 'Call Us: 082 444 BOOM', 'topshop'), 'description' => __( 'This is the text in the header', 'topshop' ) ); $options['topshop-website-txt-copy'] = array( 'id' => 'topshop-website-txt-copy', 'label' => __( 'Site Copy Text', 'topshop' ), 'section' => $section, 'type' => 'text', 'default' => __( 'TopShop theme, by <a href="https://kairaweb.com/">Kaira</a>', 'topshop'), 'description' => __( 'Enter the text in the bottom bar of the footer', 'topshop' ) ); $options['topshop-website-error-head'] = array( 'id' => 'topshop-website-error-head', 'label' => __( '404 Error Page Heading', 'topshop' ), 'section' => $section, 'type' => 'text', 'default' => __( 'Oops! <span>404</span>', 'topshop'), 'description' => __( 'Enter the heading for the 404 Error page', 'topshop' ) ); $options['topshop-website-error-msg'] = array( 'id' => 'topshop-website-error-msg', 'label' => __( 'Error 404 Message', 'topshop' ), 'section' => $section, 'type' => 'textarea', 'default' => __( 'It looks like that page does not exist. <br />Return home or try a search', 'topshop'), 'description' => __( 'Enter the default text on the 404 error page (Page not found)', 'topshop' ) ); $options['topshop-website-nosearch-msg'] = array( 'id' => 'topshop-website-nosearch-msg', 'label' => __( 'No Search Results', 'topshop' ), 'section' => $section, 'type' => 'textarea', 'default' => __( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'topshop'), 'description' => __( 'Enter the default text for when no search results are found', 'topshop' ) ); // Adds the sections to the $options array $options['sections'] = $sections; $customizer_library = Customizer_Library::Instance(); $customizer_library->add_options( $options ); // To delete custom mods use: customizer_library_remove_theme_mods(); } add_action( 'init', 'customizer_library_topshop_options' );
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings