REDROOM
PHP 8.0.30
Path:
Logout
Edit File
Size: 14.41 KB
Close
/home/certprox/test.certproxywizard.com/wp-content/plugins/lvmr-header/includes/customizer.php
Text
Base64
<?php /** * LVMR Header Customizer Settings */ function lvmr_header_customize_register( $wp_customize ) { // Add Section $wp_customize->add_section( 'lvmr_header_section', array( 'title' => __( 'LVMR Header Settings', 'lvmr-header' ), 'priority' => 30, ) ); // Top Bar Section $wp_customize->add_section( 'lvmr_topbar_section', array( 'title' => __( 'LVMR Top Bar Settings', 'lvmr-header' ), 'priority' => 29, ) ); // Top Bar Enable $wp_customize->add_setting( 'lvmr_topbar_enable', array( 'default' => false, 'sanitize_callback' => 'wp_validate_boolean', ) ); $wp_customize->add_control( 'lvmr_topbar_enable', array( 'label' => __( 'Enable Top Bar', 'lvmr-header' ), 'section' => 'lvmr_topbar_section', 'type' => 'checkbox', ) ); // Top Bar Text $wp_customize->add_setting( 'lvmr_topbar_text', array( 'default' => 'Free U.S. shipping on subscriptions $100+ & standard orders $150+', 'sanitize_callback' => 'wp_kses_post', ) ); $wp_customize->add_control( 'lvmr_topbar_text', array( 'label' => __( 'Top Bar Text', 'lvmr-header' ), 'section' => 'lvmr_topbar_section', 'type' => 'textarea', ) ); // Top Bar BG Color $wp_customize->add_setting( 'lvmr_topbar_bg_color', array( 'default' => '#000a8b', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_topbar_bg_color', array( 'label' => __( 'Background Color', 'lvmr-header' ), 'section' => 'lvmr_topbar_section', ) ) ); // Top Bar Text Color $wp_customize->add_setting( 'lvmr_topbar_text_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_topbar_text_color', array( 'label' => __( 'Text Color', 'lvmr-header' ), 'section' => 'lvmr_topbar_section', ) ) ); // Sticky Header $wp_customize->add_setting( 'lvmr_header_sticky', array( 'default' => true, 'sanitize_callback' => 'wp_validate_boolean', ) ); $wp_customize->add_control( 'lvmr_header_sticky', array( 'label' => __( 'Sticky Header', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'checkbox', ) ); // Background Color $wp_customize->add_setting( 'lvmr_header_bg_color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_header_bg_color', array( 'label' => __( 'Background Color', 'lvmr-header' ), 'section' => 'lvmr_header_section', ) ) ); // Text Color $wp_customize->add_setting( 'lvmr_header_text_color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_header_text_color', array( 'label' => __( 'Text Color', 'lvmr-header' ), 'section' => 'lvmr_header_section', ) ) ); // Accent Color $wp_customize->add_setting( 'lvmr_header_accent_color', array( 'default' => '#0000ff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_header_accent_color', array( 'label' => __( 'Accent Color', 'lvmr-header' ), 'section' => 'lvmr_header_section', ) ) ); // Header Height (Desktop) $wp_customize->add_setting( 'lvmr_header_height', array( 'default' => '80', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_height', array( 'label' => __( 'Header Height (Desktop)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Header Height (Tablet) $wp_customize->add_setting( 'lvmr_header_height_tablet', array( 'default' => '70', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_height_tablet', array( 'label' => __( 'Header Height (Tablet)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Header Height (Mobile) $wp_customize->add_setting( 'lvmr_header_height_mobile', array( 'default' => '60', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_height_mobile', array( 'label' => __( 'Header Height (Mobile)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Logo Width (Desktop) $wp_customize->add_setting( 'lvmr_header_logo_width', array( 'default' => '150', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_logo_width', array( 'label' => __( 'Logo Width (Desktop)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Logo Width (Tablet) $wp_customize->add_setting( 'lvmr_header_logo_width_tablet', array( 'default' => '120', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_logo_width_tablet', array( 'label' => __( 'Logo Width (Tablet)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Logo Width (Mobile) $wp_customize->add_setting( 'lvmr_header_logo_width_mobile', array( 'default' => '100', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_logo_width_mobile', array( 'label' => __( 'Logo Width (Mobile)', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Cart Link $wp_customize->add_setting( 'lvmr_header_cart_link', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'lvmr_header_cart_link', array( 'label' => __( 'Cart Page Link', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'url', ) ); // Account Link $wp_customize->add_setting( 'lvmr_header_account_link', array( 'default' => '#', 'sanitize_callback' => 'esc_url_raw', ) ); $wp_customize->add_control( 'lvmr_header_account_link', array( 'label' => __( 'Account Page Link', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'url', ) ); // Logo Gap / Space $wp_customize->add_setting( 'lvmr_header_logo_gap', array( 'default' => '150', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_logo_gap', array( 'label' => __( 'Space Around Logo', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'description' => __( 'Increase this if your logo/text is overlapping the menu.', 'lvmr-header' ), 'type' => 'number', ) ); // Menu Items Gap $wp_customize->add_setting( 'lvmr_header_menu_gap', array( 'default' => '25', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_menu_gap', array( 'label' => __( 'Menu Items Gap (px)', 'lvmr-header' ), 'description' => __( 'Gap between menu items in the left and right nav.', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Gap Between Right Menu and Icons $wp_customize->add_setting( 'lvmr_header_icons_gap', array( 'default' => '20', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_icons_gap', array( 'label' => __( 'Menu → Icons Gap (px)', 'lvmr-header' ), 'description' => __( 'Space between the right menu and the cart/account icons.', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Container Horizontal Padding $wp_customize->add_setting( 'lvmr_header_padding', array( 'default' => '30', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_padding', array( 'label' => __( 'Container Padding (px)', 'lvmr-header' ), 'description' => __( 'Left & right padding inside the header bar.', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); // Border Radius $wp_customize->add_setting( 'lvmr_header_border_radius', array( 'default' => '40', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_header_border_radius', array( 'label' => __( 'Border Radius (px)', 'lvmr-header' ), 'description' => __( 'Roundness of the header container. 0 = square.', 'lvmr-header' ), 'section' => 'lvmr_header_section', 'type' => 'number', ) ); } add_action( 'customize_register', 'lvmr_header_customize_register' ); // ─── Menu Typography & Colors ─────────────────────────────────────────────── function lvmr_header_menu_customize_register( $wp_customize ) { $wp_customize->add_section( 'lvmr_menu_section', array( 'title' => __( 'LVMR Menu Typography & Colors', 'lvmr-header' ), 'priority' => 31, ) ); // --- Font Family (Google Font) --- $wp_customize->add_setting( 'lvmr_menu_font_family', array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'lvmr_menu_font_family', array( 'label' => __( 'Font Family', 'lvmr-header' ), 'description' => __( 'Enter any Google Font name, e.g. Inter, Roboto, Poppins. Leave empty to use the theme font.', 'lvmr-header' ), 'section' => 'lvmr_menu_section', 'type' => 'text', ) ); // --- Font Size --- $wp_customize->add_setting( 'lvmr_menu_font_size', array( 'default' => '14', 'sanitize_callback' => 'absint', ) ); $wp_customize->add_control( 'lvmr_menu_font_size', array( 'label' => __( 'Font Size (px)', 'lvmr-header' ), 'section' => 'lvmr_menu_section', 'type' => 'number', ) ); // --- Font Weight --- $wp_customize->add_setting( 'lvmr_menu_font_weight', array( 'default' => '500', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'lvmr_menu_font_weight', array( 'label' => __( 'Font Weight', 'lvmr-header' ), 'section' => 'lvmr_menu_section', 'type' => 'select', 'choices' => array( '300' => __( '300 – Light', 'lvmr-header' ), '400' => __( '400 – Normal', 'lvmr-header' ), '500' => __( '500 – Medium', 'lvmr-header' ), '600' => __( '600 – Semi Bold', 'lvmr-header' ), '700' => __( '700 – Bold', 'lvmr-header' ), '800' => __( '800 – Extra Bold', 'lvmr-header' ), ), ) ); // --- Text Transform --- $wp_customize->add_setting( 'lvmr_menu_text_transform', array( 'default' => 'capitalize', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'lvmr_menu_text_transform', array( 'label' => __( 'Text Transform', 'lvmr-header' ), 'section' => 'lvmr_menu_section', 'type' => 'select', 'choices' => array( 'none' => __( 'None', 'lvmr-header' ), 'uppercase' => __( 'UPPERCASE', 'lvmr-header' ), 'lowercase' => __( 'lowercase', 'lvmr-header' ), 'capitalize' => __( 'Capitalize', 'lvmr-header' ), ), ) ); // --- Letter Spacing --- $wp_customize->add_setting( 'lvmr_menu_letter_spacing', array( 'default' => '0', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'lvmr_menu_letter_spacing', array( 'label' => __( 'Letter Spacing (px)', 'lvmr-header' ), 'description' => __( 'e.g. 0, 0.5, 1, 2', 'lvmr-header' ), 'section' => 'lvmr_menu_section', 'type' => 'number', 'input_attrs' => array( 'step' => '0.5', 'min' => '-2', 'max' => '10' ), ) ); // --- Link Color --- $wp_customize->add_setting( 'lvmr_menu_link_color', array( 'default' => '#000000', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_menu_link_color', array( 'label' => __( 'Link Color', 'lvmr-header' ), 'section' => 'lvmr_menu_section', ) ) ); // --- Link Hover Color --- $wp_customize->add_setting( 'lvmr_menu_hover_color', array( 'default' => '#0000ff', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_menu_hover_color', array( 'label' => __( 'Link Hover Color', 'lvmr-header' ), 'section' => 'lvmr_menu_section', ) ) ); // --- Cart Badge Color --- $wp_customize->add_setting( 'lvmr_cart_badge_color', array( 'default' => '#f07c00', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'lvmr_cart_badge_color', array( 'label' => __( 'Cart Badge/Indicator Color', 'lvmr-header' ), 'section' => 'lvmr_menu_section', ) ) ); } add_action( 'customize_register', 'lvmr_header_menu_customize_register' );
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 1
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
customizer.php
14.41 KB
lrw-r--r--
2026-03-11 09:38:09
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).