![]() Server : LiteSpeed System : Linux premium84.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64 User : claqxcrl ( 523) PHP Version : 8.1.32 Disable Function : NONE Directory : /home/claqxcrl/claquemagazineawards.com/wp-content/themes/event-planners/inc/ |
<?php /** * Event Planners Theme Customizer * * @package Event Planners */ function event_planners_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'event_planners_custom_header_args', array( 'default-text-color' => '949494', 'width' => 1600, 'height' => 200, 'wp-head-callback' => 'event_planners_header_style', 'default-text-color' => false, 'header-text' => false, ) ) ); } add_action( 'after_setup_theme', 'event_planners_custom_header_setup' ); if ( ! function_exists( 'event_planners_header_style' ) ) : /** * Styles the header image and text displayed on the blog * * @see event_planners_custom_header_setup(). */ function event_planners_header_style() { $header_text_color = get_header_textcolor(); ?> <style type="text/css"> <?php //Check if user has defined any header image. if ( get_header_image() ) : ?> .header { background: url(<?php echo esc_url(get_header_image()); ?>) no-repeat; background-position: center top; background-size:cover; } <?php endif; ?> </style> <?php } endif; // event_planners_header_style /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ /** * Add postMessage support for site title and description for the Theme Customizer. * * @param WP_Customize_Manager $wp_customize Theme Customizer object. */ function event_planners_customize_register( $wp_customize ) { //Add a class for titles class event_planners_Info extends WP_Customize_Control { public $type = 'info'; public $label = ''; public function render_content() { ?> <h3 style="text-decoration: underline; color: #DA4141; text-transform: uppercase;"><?php echo esc_html( $this->label ); ?></h3> <?php } } $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->add_setting('color_scheme',array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color' )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => esc_html__('Color Scheme','event-planners'), 'description' => esc_html__('More color options in PRO Version','event-planners'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); // Slider Section $wp_customize->add_section( 'slider_section', array( 'title' => esc_html__('Slider Settings', 'event-planners'), 'priority' => null, 'description' => esc_html__('Featured Image Size Should be ( 1400 X 789 ) More slider settings available in PRO Version','event-planners'), ) ); $wp_customize->add_setting('page-setting7',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer' )); $wp_customize->add_control('page-setting7',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide one:','event-planners'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting8',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer' )); $wp_customize->add_control('page-setting8',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide two:','event-planners'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting9',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer' )); $wp_customize->add_control('page-setting9',array( 'type' => 'dropdown-pages', 'label' => esc_html__('Select page for slide three:','event-planners'), 'section' => 'slider_section' )); //Slider hide $wp_customize->add_setting('hide_slides',array( 'sanitize_callback' => 'event_planners_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_slides', array( 'section' => 'slider_section', 'label' => esc_html__('Uncheck To Show Slider','event-planners'), 'type' => 'checkbox' )); // Slider Section $wp_customize->add_section('header_top_bar',array( 'title' => esc_html__('Header Topbar','event-planners'), 'description' => esc_html__('More social icon available in PRO Version','event-planners'), 'priority' => null )); $wp_customize->add_setting('fb_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('fb_link',array( 'label' => esc_html__('Add facebook link here','event-planners'), 'section' => 'header_top_bar', 'setting' => 'fb_link' )); $wp_customize->add_setting('twitt_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('twitt_link',array( 'label' => esc_html__('Add twitter link here','event-planners'), 'section' => 'header_top_bar', 'setting' => 'twitt_link' )); $wp_customize->add_setting('insta_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('insta_link',array( 'label' => esc_html__('Add instagram link here','event-planners'), 'section' => 'header_top_bar', 'setting' => 'insta_link' )); $wp_customize->add_setting('linked_link',array( 'default' => null, 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('linked_link',array( 'label' => esc_html__('Add linkedin link here','event-planners'), 'section' => 'header_top_bar', 'setting' => 'linked_link' )); $wp_customize->add_setting('contact_no',array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('contact_no',array( 'label' => esc_html__('Add contact number here.','event-planners'), 'section' => 'header_top_bar', 'setting' => 'contact_no' )); $wp_customize->add_setting('contact_mail',array( 'default' => null, 'sanitize_callback' => 'sanitize_email' )); $wp_customize->add_control('contact_mail',array( 'label' => esc_html__('Add you email here','event-planners'), 'section' => 'header_top_bar', 'setting' => 'contact_mail' )); //Hide Header Top Bar $wp_customize->add_setting('hide_header_topbar',array( 'sanitize_callback' => 'event_planners_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_header_topbar', array( 'section' => 'header_top_bar', 'label' => esc_html__('Uncheck To Show This Section','event-planners'), 'type' => 'checkbox' )); //Hide Header Top Bar // Home Section One $wp_customize->add_section('section_thumb_with_content', array( 'title' => esc_html__('Home Section One','event-planners'), 'description' => esc_html__('Select Page from the dropdown for section','event-planners'), 'priority' => null )); $wp_customize->add_setting('section1_title',array( 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('section1_title',array( 'label' => __('Add title for section title','event-planners'), 'section' => 'section_thumb_with_content', 'setting' => 'section1_title' )); $wp_customize->add_setting('sec-column-left1', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer', )); $wp_customize->add_control( 'sec-column-left1',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column-left2', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer', )); $wp_customize->add_control( 'sec-column-left2',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column-left3', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer', )); $wp_customize->add_control( 'sec-column-left3',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); $wp_customize->add_setting('sec-column-left4', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer', )); $wp_customize->add_control( 'sec-column-left4',array('type' => 'dropdown-pages', 'section' => 'section_thumb_with_content', )); //Hide Section $wp_customize->add_setting('hide_home_secwith_content',array( 'sanitize_callback' => 'event_planners_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_home_secwith_content', array( 'section' => 'section_thumb_with_content', 'label' => esc_html__('Uncheck To Show This Section','event-planners'), 'type' => 'checkbox' )); // Hide Section // Home Section 2 $wp_customize->add_section('section_two', array( 'title' => esc_html__('Home Section Two','event-planners'), 'description' => esc_html__('Select Page from the dropdown','event-planners'), 'priority' => null )); $wp_customize->add_setting('page-column1', array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'event_planners_sanitize_integer', )); $wp_customize->add_control( 'page-column1',array('type' => 'dropdown-pages', 'section' => 'section_two', )); //Hide Section $wp_customize->add_setting('hide_sectiontwo',array( 'sanitize_callback' => 'event_planners_sanitize_checkbox', 'default' => true, )); $wp_customize->add_control( 'hide_sectiontwo', array( 'section' => 'section_two', 'label' => esc_html__('Uncheck To Show This Section','event-planners'), 'type' => 'checkbox' )); //Hide Section $wp_customize->add_section('footer_main',array( 'title' => esc_html__('Footer Area','event-planners'), 'description' => esc_html__('Manager Footer From Widgets >> Footer Column 1, Footer Column 2, Footer Column 3','event-planners'), 'priority' => null, )); $wp_customize->add_setting('event_planners_options[footer-info]', array( 'type' => 'info_control', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'sanitize_text_field' ) ); $wp_customize->add_control( new event_planners_Info( $wp_customize, 'footer_main', array( 'section' => 'footer_main', 'settings' => 'event_planners_options[footer-info]', 'priority' => null ) ) ); } add_action( 'customize_register', 'event_planners_customize_register' ); //Integer function event_planners_sanitize_integer( $input ) { if( is_numeric( $input ) ) { return intval( $input ); } } function event_planners_sanitize_checkbox( $checked ) { // Boolean check. return ( ( isset( $checked ) && true == $checked ) ? true : false ); } //setting inline css. function event_planners_custom_css() { wp_enqueue_style( 'event-planners-custom-style', get_template_directory_uri() . '/css/event-planners-custom-style.css' ); $color = get_theme_mod( 'color_scheme' ); //E.g. #e64d43 $header_text_color = get_header_textcolor(); $custom_css = " #sidebar ul li a:hover, .phone-no strong, .left a:hover, .blog_lists h4 a:hover, .recent-post h6 a:hover, .recent-post a:hover, .design-by a, .site-description, .logo h2 span, .fancy-title h2 span, .postmeta a:hover, .recent-post .morebtn:hover, .sitenav ul li a:hover, .sitenav ul li.current_page_item a, .sitenav ul li.menu-item-has-children.hover, .sitenav ul li.current-menu-parent a.parent, .left-fitbox a:hover h3, .right-fitbox a:hover h3, .tagcloud a { color: {$color} !important; } .pagination .nav-links span.current, .pagination .nav-links a:hover, #commentform input#submit:hover, .nivo-controlNav a.active, .wpcf7 input[type='submit'], a.ReadMore, .section2button, input.search-submit { background-color: {$color} !important; } .titleborder span:after{border-bottom-color: {$color} !important;} "; wp_add_inline_style( 'event-planners-custom-style', $custom_css ); } add_action( 'wp_enqueue_scripts', 'event_planners_custom_css' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function event_planners_customize_preview_js() { wp_enqueue_script( 'event_planners_customizer', get_template_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'event_planners_customize_preview_js' );