403Webshell
Server IP : 103.255.250.91  /  Your IP : 216.73.217.146
Web Server : Apache
System : Linux charlie.thegoodhost.io 5.14.0-570.39.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Sep 4 05:08:52 EDT 2025 x86_64
User : tongkhen ( 1019)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/tongkhen/domains/mylaminateflooring.com.sg/wp-content/themes/blenders/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tongkhen/domains/mylaminateflooring.com.sg/wp-content/themes/blenders//functions.php
<?php
function register_theme_styles()
{

    wp_register_style(
        'bootstrap-css',
        'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css',
        [],
        '5.3.2'
    );

    wp_register_style(
        'bootstrap-icons-css',
        'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.2/font/bootstrap-icons.min.css',
        [],
        '1.11.2'
    );

    wp_register_style(
        'googlefont-poppins',
        'https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap',
        [],
        null
    );

    wp_register_style(
        'owlcarousel-css',
        'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.carousel.min.css',
        [],
        '2.3.4'
    );

    wp_register_style(
        'owltheme-css',
        'https://cdnjs.cloudflare.com/ajax/libs/OwlCarousel2/2.3.4/assets/owl.theme.default.min.css',
        ['owlcarousel-css'],
        '2.3.4'
    );

    wp_register_style(
        'theme-style',
        get_stylesheet_directory_uri() . '/style.css',
        ['bootstrap-css'],
        '1.0.3'.time()
    );

    wp_register_style(
        'theme-responsive',
        get_stylesheet_directory_uri() . '/css/responsive.css',
        ['theme-style'],
        '1.0.0'
    );

    wp_register_style(
        'theme-custom',
        get_stylesheet_directory_uri() . '/css/custom.css',
        ['theme-style'],
        '1.0.3'
    );


    wp_enqueue_style('bootstrap-css');
    wp_enqueue_style('bootstrap-icons-css');
    wp_enqueue_style('googlefont-poppins');
    wp_enqueue_style('owlcarousel-css');
    wp_enqueue_style('owltheme-css');
    wp_enqueue_style('theme-style');
    wp_enqueue_style('theme-responsive');
    wp_enqueue_style('theme-custom');

}
add_action('wp_enqueue_scripts', 'register_theme_styles');

function register_theme_scripts()
{
    wp_register_script(
        'bootstrap-js',
        'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.min.js',
        [],
        '5.3.2',
        true
    );

    // Owl Carousel (requires jQuery)
    wp_register_script(
        'owlcarousel-js',
        get_stylesheet_directory_uri() . '/js/owl.carousel.min.js',
        ['jquery'],
        '2.3.4',
        true
    );

    // Custom JS
    wp_register_script(
        'custom-js',
        get_stylesheet_directory_uri() . '/js/custom.js',
        ['jquery', 'bootstrap-js', 'owlcarousel-js'],
        '1.0.'.time(),
        true
    );

    wp_enqueue_script('bootstrap-js');
    wp_enqueue_script('owlcarousel-js');
    wp_enqueue_script('custom-js');

}
add_action('wp_enqueue_scripts', 'register_theme_scripts');

function register_site_header_menu()
{
    register_nav_menus([
        'site-header-menu' => __('Site Header Menu', 'appleorange'),
        'footer_services' => __('Footer Services Menu', 'appleorange'),
    ]);
}
add_action('after_setup_theme', 'register_site_header_menu');
add_theme_support('custom-logo', [
    'height' => 100,
    'width' => 300,
    'flex-height' => true,
    'flex-width' => true,
]);


// Theme Color Settings Code Start
add_action('customize_register', function ($wp_customize) {

    $wp_customize->add_section('theme_colors_section', [
        'title' => __('Theme Colors', 'appleorange'),
        'priority' => 35,
    ]);

    // Primary Color
    $wp_customize->add_setting('color_primary', [
        'default' => '#12284c',
        'transport' => 'refresh',
    ]);

    $wp_customize->add_control(new WP_Customize_Color_Control(
        $wp_customize,
        'color_primary',
        [
            'label' => __('Primary Color', 'appleorange'),
            'section' => 'theme_colors_section',
        ]
    ));

    // Secondary Color
    $wp_customize->add_setting('color_secondary', [
        'default' => '#ab0021',
        'transport' => 'refresh',
    ]);

    $wp_customize->add_control(new WP_Customize_Color_Control(
        $wp_customize,
        'color_secondary',
        [
            'label' => __('Secondary Color', 'appleorange'),
            'section' => 'theme_colors_section',
        ]
    ));
});
add_action('wp_head', function () {
    ?>
    <style>
        :root {
            --primary:
                <?php echo esc_html(get_theme_mod('color_primary', '#12284c'));
                ?>
            ;
            --primary-hov:
                <?php echo esc_html(get_theme_mod('color_primary', '#363636'));
                ?>
            ;
            --secondary:
                <?php echo esc_html(get_theme_mod('color_secondary', '#a90027'));
                ?>
            ;

            --secondary-hov:
                <?php echo esc_html(get_theme_mod('color_secondary', '#cc0033'));
                ?>
            ;
        }
    </style>
    <?php
});

// Theme Color Settings Code End

/*
// Theme Font Size Settings Code Start
add_action('customize_register', function ($wp_customize) {

    $wp_customize->add_section('theme_fonts_section', [
        'title'    => __('Theme Font Sizes', 'appleorange'),
        'priority' => 36,
    ]);

    $fonts = [

        // Announcement & Banner
        'font_announcement_bar' => ['Announcement Bar', '14px'],
        'font_banner_title'     => ['Banner Title', '45px'],

        // Header & Footer
        'font_menu'             => ['Header & Footer Menu', '16px'],
        'font_header_phone'     => ['Header Phone', '21px'],
        'font_footer_heading'   => ['Footer Heading', '18px'],

        // Sections
        'font_section_paragraph'=> ['Section Paragraph', '24px'],
        'font_section_heading'  => ['Section Heading', '50px'],

        // Boxes
        'font_box_paragraph'    => ['Box Paragraph', '18px'],
        'font_box_heading'      => ['Box Heading', '27px'],
        'font_box_hover_heading'=> ['Box Hover Heading', '26px'],

        // Misc
        'font_paragraph_small'  => ['Red Bar / Project Sub Heading', '17px'],
        'font_read_more'        => ['Read More Button', '20px'],
        'font_form'             => ['Form Labels & Buttons', '20px'],
    ];

    foreach ($fonts as $key => $data) {

        $wp_customize->add_setting($key, [
            'default'   => $data[1],
            'transport' => 'refresh',
        ]);

        $wp_customize->add_control($key, [
            'label'       => __($data[0], 'appleorange'),
            'section'     => 'theme_fonts_section',
            'type'        => 'text',
            'description' => __('Use valid CSS size (e.g. 18px, 1.2rem)', 'appleorange'),
        ]);
    }
});
add_action('wp_head', function () {
?>
<style>
:root {
    // Announcement & Banner 
    --font-announcement-bar: <?php echo esc_html(get_theme_mod('font_announcement_bar', '14px'));
    ?>;
    --font-banner-title: <?php echo esc_html(get_theme_mod('font_banner_title', '45px'));
    ?>;

    // Header & Footer 
    --font-menu: <?php echo esc_html(get_theme_mod('font_menu', '16px'));
    ?>;
    --font-header-phone: <?php echo esc_html(get_theme_mod('font_header_phone', '21px'));
    ?>;
    --font-footer-heading: <?php echo esc_html(get_theme_mod('font_footer_heading', '18px'));
    ?>;

    // Sections 
    --font-section-paragraph: <?php echo esc_html(get_theme_mod('font_section_paragraph', '24px'));
    ?>;
    --font-section-heading: <?php echo esc_html(get_theme_mod('font_section_heading', '50px'));
    ?>;

    // Boxes 
    --font-box-paragraph: <?php echo esc_html(get_theme_mod('font_box_paragraph', '18px'));
    ?>;
    --font-box-heading: <?php echo esc_html(get_theme_mod('font_box_heading', '27px'));
    ?>;
    --font-box-hover-heading: <?php echo esc_html(get_theme_mod('font_box_hover_heading', '26px'));
    ?>;

    // Misc 
    --font-paragraph-small: <?php echo esc_html(get_theme_mod('font_paragraph_small', '17px'));
    ?>;
    --font-read-more: <?php echo esc_html(get_theme_mod('font_read_more', '20px'));
    ?>;
    --font-form: <?php echo esc_html(get_theme_mod('font_form', '20px'));
    ?>;
}
</style>
<?php
});

// Theme Font Size Settings Code End
*/

add_action('customize_register', function ($wp_customize) {

    $wp_customize->add_section('appleorange_footer_section', [
        'title' => __('Footer Settings', 'appleorange'),
        'priority' => 160,
    ]);

    // Phone
    $wp_customize->add_setting('footer_phone', [
        'default' => '9828 6821',
        'transport' => 'refresh',
    ]);
    $wp_customize->add_control('footer_phone', [
        'label' => __('Phone Number', 'appleorange'),
        'section' => 'appleorange_footer_section',
        'type' => 'text',
    ]);

    // Email
    $wp_customize->add_setting('footer_email', [
        'default' => 'ask@appleorange.com.sg',
        'transport' => 'refresh',
    ]);
    $wp_customize->add_control('footer_email', [
        'label' => __('Email Address', 'appleorange'),
        'section' => 'appleorange_footer_section',
        'type' => 'email',
    ]);


    // Why Us
    $wp_customize->add_setting('footer_why_us', [
        'transport' => 'refresh',
    ]);
    $wp_customize->add_control('footer_why_us', [
        'label' => __('Why Us Text', 'appleorange'),
        'section' => 'appleorange_footer_section',
        'type' => 'textarea',
    ]);

    // Copyright
    $wp_customize->add_setting('footer_copyright', [
        'default' => '© ' . date('Y') . ' Floor Option Singapore',
        'transport' => 'refresh',
    ]);
    $wp_customize->add_control('footer_copyright', [
        'label' => __('Copyright Text', 'appleorange'),
        'section' => 'appleorange_footer_section',
        'type' => 'text',
    ]);

});

// Announcement Bar Code Start
add_action('customize_register', function ($wp_customize) {

    // Section
    $wp_customize->add_section('announcement_bar_section', [
        'title' => __('Announcement Bar', 'appleorange'),
        'priority' => 30,
    ]);

    // Enable / Disable
    $wp_customize->add_setting('announcement_enable', [
        'default' => false,
        'transport' => 'refresh',
    ]);

    $wp_customize->add_control('announcement_enable', [
        'label' => __('Enable Announcement Bar', 'appleorange'),
        'section' => 'announcement_bar_section',
        'type' => 'checkbox',
    ]);

    // Text
    $wp_customize->add_setting('announcement_text', [
        'default' => 'Free Measurement & Quotation Available!',
        'transport' => 'refresh',
    ]);

    $wp_customize->add_control('announcement_text', [
        'label' => __('Announcement Text', 'appleorange'),
        'section' => 'announcement_bar_section',
        'type' => 'text',
    ]);

    // Link (optional)
    $wp_customize->add_setting('announcement_link', [
        'transport' => 'refresh',
    ]);

    $wp_customize->add_control('announcement_link', [
        'label' => __('Announcement Link (optional)', 'appleorange'),
        'section' => 'announcement_bar_section',
        'type' => 'url',
        'description' => __('Leave empty if no link is needed', 'appleorange'),
    ]);
});

// Announcement Bar Code End

// Hero Section Page Start 
add_action('customize_register', function ($wp_customize) {

    $wp_customize->add_section('hero_banner_section', [
        'title' => __('Hero Banner', 'appleorange'),
        'priority' => 25,
    ]);

    // Background Image
    $wp_customize->add_setting('hero_bg_image');
    $wp_customize->add_control(new WP_Customize_Image_Control(
        $wp_customize,
        'hero_bg_image',
        [
            'label' => __('Banner Background Image', 'appleorange'),
            'section' => 'hero_banner_section',
        ]
    ));

    // Single Text Field (HTML allowed)
    $wp_customize->add_setting('hero_text', [
        'default' => 'ONE CALL, THAT’S ALL!<br><span class="text-danger">High-Quality Carpets, Wholesale Price</span><br>Luxury That Fits Your Budget!',
        'sanitize_callback' => 'wp_kses_post',
    ]);

    $wp_customize->add_control('hero_text', [
        'label' => __('Hero Text', 'appleorange'),
        'section' => 'hero_banner_section',
        'type' => 'textarea',
        'description' => __('You can use HTML like <br> or <span class="text-danger">', 'appleorange'),
    ]);
});

// Hero Section Page End

?>

Youez - 2016 - github.com/yon3zu
LinuXploit