MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/www/support/wp-content/themes/wp-moose/inc/customizer/setup.php
<?php

// Theme Options
require_once get_parent_theme_file_path( 'inc/customizer/sanitize-functions.php' );
require_once get_parent_theme_file_path( 'inc/customizer/options.php' );
/**
 * Appearance Settings
 */
// Include Sidebar Section.
require get_parent_theme_file_path( 'inc/customizer/sections/appearance-sidebar.php' );
// Include Container Section.
require get_parent_theme_file_path( 'inc/customizer/sections/appearance-container.php' );
// Include Color Section.
require get_parent_theme_file_path( 'inc/customizer/sections/appearance-colors.php' );
// Include Typography Section.
require get_parent_theme_file_path( 'inc/customizer/sections/appearance-typography.php' );
/**
 * Frontpage Settings
 */
// Include General Section.
require get_parent_theme_file_path( 'inc/customizer/sections/frontpage-general.php' );
// Include Hero Section.
require get_parent_theme_file_path( 'inc/customizer/sections/frontpage-hero.php' );
// Include Header Section.
require get_parent_theme_file_path( 'inc/customizer/sections/frontpage-header.php' );
/**
 * Posts Settings
 */
require get_parent_theme_file_path( 'inc/customizer/sections/archive.php' );
require get_parent_theme_file_path( 'inc/customizer/sections/single-post.php' );
/**
 * Header Settings
 */
require get_parent_theme_file_path( 'inc/customizer/sections/header.php' );
/**
 * Footer Settings
 */
require get_parent_theme_file_path( 'inc/customizer/sections/footer.php' );
/**
 * Footer Settings
 */
require get_parent_theme_file_path( 'inc/customizer/sections/preloader.php' );
if ( !function_exists( 'wp_moose_load_customize_helpers' ) ) {
    /**
     * Load customize custom controls and helper functions
     */
    function wp_moose_load_customize_helpers()
    {
        require_once trailingslashit( get_template_directory() ) . 'inc/customizer/helpers.php';
    }

}
add_action( 'customize_register', 'wp_moose_load_customize_helpers' );
if ( !function_exists( 'wp_moose_register_custom_controls_type' ) ) {
    /**
     * Register custom controls
     *
     * @param $wp_customize
     */
    function wp_moose_register_custom_controls_type( $wp_customize )
    {
        
        if ( method_exists( $wp_customize, 'register_control_type' ) ) {
            $wp_customize->register_control_type( 'Moose_Image_Radio_Button_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Gradient_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Select_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Slider_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Tabs_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Call_To_Action_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Sortable_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Switch_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Info_Customize_Control' );
            $wp_customize->register_control_type( 'Moose_Heading_Customize_Control' );
        }
    
    }

}
add_action( 'customize_register', 'wp_moose_register_custom_controls_type' );
if ( !function_exists( 'wp_moose_controls_scripts' ) ) {
    /**
     * Customizer Controls
     */
    function wp_moose_controls_scripts()
    {
        wp_enqueue_script(
            'wp-moose-custom-controls-script',
            trailingslashit( get_template_directory_uri() ) . 'dist/js/customizer-controls' . wp_moose_get_script_suffix() . '.js',
            array(
            'jquery',
            'customize-base',
            'jquery-ui-slider',
            'jquery-ui-sortable'
        ),
            WP_MOOSE_VERSION,
            true
        );
        wp_enqueue_style(
            'wp-moose-custom-controls-style',
            trailingslashit( get_template_directory_uri() ) . 'dist/css/customizer-controls' . wp_moose_get_stylesheet_suffix() . '.css',
            array( 'wp-color-picker' ),
            WP_MOOSE_VERSION
        );
        $localize = array();
        wp_localize_script( 'wp-moose-custom-controls-script', 'wpMoose', apply_filters( 'wp_moose_filter_customizer_js_localize', $localize ) );
    }

}
add_action( 'customize_controls_enqueue_scripts', 'wp_moose_controls_scripts' );
if ( !function_exists( 'wp_moose_add_theme_panels' ) ) {
    /**
     * Add theme panels
     *
     * @param WP_Customize_Manager $wp_customize theme Customizer object
     */
    function wp_moose_add_theme_panels( $wp_customize )
    {
        $wp_customize->add_panel( 'wp_moose_appearance_panel', array(
            'title'    => esc_html__( 'Appearance Settings', 'wp-moose' ),
            'priority' => 25,
        ) );
        $wp_customize->add_panel( 'wp_moose_frontpage_panel', array(
            'title'    => esc_html__( 'Front Page Settings', 'wp-moose' ),
            'priority' => 25,
        ) );
    }

}
add_action( 'customize_register', 'wp_moose_add_theme_panels' );
if ( !function_exists( 'wp_moose_customizer_register' ) ) {
    /**
     * Register customize sections and options.
     *
     * @param WP_Customize_Manager $wp_customize theme Customizer object
     */
    function wp_moose_customizer_register( $wp_customize )
    {
        // Change default customize objects
        wp_moose_change_customizer_object(
            $wp_customize,
            'section',
            'background_image',
            'panel',
            'wp_moose_appearance_panel'
        );
        wp_moose_change_customizer_object(
            $wp_customize,
            'section',
            'background_image',
            'priority',
            999
        );
        wp_moose_change_customizer_object(
            $wp_customize,
            'section',
            'colors',
            'panel',
            'wp_moose_appearance_panel'
        );
        wp_moose_change_customizer_object(
            $wp_customize,
            'section',
            'colors',
            'priority',
            60
        );
        /**
         * Register custom sections and options
         */
        // Appearance panel
        wp_moose_register_sidebar_options( $wp_customize, 'wp_moose_sidebar_section', 50 );
        wp_moose_register_container_options( $wp_customize, 'wp_moose_container_section', 50 );
        wp_moose_register_typography_options( $wp_customize, 'wp_moose_typography_section', 50 );
        wp_moose_register_colors_options( $wp_customize, 'colors' );
        // Frontpage panel
        wp_moose_register_frontpage_general_options( $wp_customize, 'wp_moose_frontpage_general_section' );
        wp_moose_register_frontpage_header_options( $wp_customize, 'wp_moose_frontpage_header_section' );
        wp_moose_register_hero_options( $wp_customize, 'wp_moose_hero_section' );
        // Posts panel
        wp_moose_register_posts_options( $wp_customize, 'wp_moose_archive_section', 25 );
        wp_moose_register_single_post_options( $wp_customize, 'wp_moose_single_post_section', 25 );
        // Header panel
        wp_moose_register_header_options( $wp_customize, 'wp_moose_header_section', 25 );
        // Footer panel
        wp_moose_register_footer_options( $wp_customize, 'wp_moose_footer_section', 25 );
        // Preloader panel
        wp_moose_register_preloader_options( $wp_customize, 'wp_moose_preloader_section', 25 );
    }

}
add_action( 'customize_register', 'wp_moose_customizer_register' );