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/public_html/support/wp-content/themes/wp-moose/inc/theme-setup.php
<?php

if ( !function_exists( 'wp_moose_scripts_styles' ) ) {
    /**
     * Enqueue our scripts and styles.
     */
    function wp_moose_scripts_styles()
    {
        // Theme Stylesheet
        wp_enqueue_style(
            'wp-moose-style',
            wp_moose_asset_resolve( 'css/style' . wp_moose_get_stylesheet_suffix() . '.css' ),
            array(),
            WP_MOOSE_VERSION
        );
        wp_enqueue_script( 'jquery' );
        wp_enqueue_script(
            'wp-moose-scripts',
            wp_moose_asset_resolve( 'js/app' . wp_moose_get_script_suffix() . '.js' ),
            array(),
            WP_MOOSE_VERSION,
            true
        );
        // Comment reply link
        if ( is_singular() && comments_open() ) {
            wp_enqueue_script( 'comment-reply' );
        }
    }

}
add_action( 'wp_enqueue_scripts', 'wp_moose_scripts_styles', 20 );
if ( !function_exists( 'wp_moose_enqueue_fonts' ) ) {
    /**
     * Enqueue fonts
     */
    function wp_moose_enqueue_fonts()
    {
        wp_enqueue_style(
            'font-awesome-5-all',
            wp_moose_asset_resolve( 'vendor/font-awesome/css/all.min.css' ),
            array(),
            WP_MOOSE_VENDOR_VERSION
        );
    }

}
add_action( 'wp_footer', 'wp_moose_enqueue_fonts' );
if ( !function_exists( 'wp_moose_admin_scripts_styles' ) ) {
    /**
     * Enqueue our scripts and styles for admin.
     */
    function wp_moose_admin_scripts_styles()
    {
        wp_enqueue_style(
            'wp-moose-admin-style',
            wp_moose_asset_resolve( 'css/admin' . wp_moose_get_stylesheet_suffix() . '.css' ),
            array(),
            WP_MOOSE_VERSION
        );
        wp_enqueue_script(
            'wp-moose-admin-script',
            wp_moose_asset_resolve( 'js/app' . wp_moose_get_script_suffix() . '.js' ),
            array(),
            WP_MOOSE_VERSION
        );
    }

}
add_action( 'admin_enqueue_scripts', 'wp_moose_admin_scripts_styles' );
if ( !function_exists( 'wp_moose_setup' ) ) {
    /**
     * Sets up theme defaults and registers support for various WordPress features.
     *
     * Note that this function is hooked into the after_setup_theme hook, which
     * runs before the init hook. The init hook is too late for some features, such
     * as indicating support for post thumbnails.
     */
    function wp_moose_setup()
    {
        // Make theme available for translation.
        load_theme_textdomain( 'moose', get_template_directory() . '/languages' );
        // Add default posts and comments RSS feed links to head.
        add_theme_support( 'automatic-feed-links' );
        // Let WordPress manage the document title.
        add_theme_support( 'title-tag' );
        // Enable support for custom logo.
        add_theme_support( 'custom-logo', [
            'flex-width'  => true,
            'flex-height' => true,
        ] );
        // Enable support for custom background
        add_theme_support( 'custom-background' );
        // Enable support for Post Thumbnails.
        add_theme_support( 'post-thumbnails' );
        // Support align wide
        add_theme_support( 'align-wide' );
        // Gutenberg custom stylesheet
        add_theme_support( 'editor-styles' );
        add_editor_style( 'dist/css/editor-style.css' );
        add_image_size( 'wp-moose-feature', 480, 360 );
        // Register nav menus.
        register_nav_menus( array(
            'primary' => esc_html__( 'Primary Menu', 'wp-moose' ),
            'footer'  => esc_html__( 'Footer Menu', 'wp-moose' ),
        ) );
        // Add support for HTML5 markup.
        add_theme_support( 'html5', [
            'comment-form',
            'comment-list',
            'gallery',
            'caption'
        ] );
        // Enable support for selective refresh of widgets in Customizer.
        add_theme_support( 'customize-selective-refresh-widgets' );
        // Starter Content
        add_theme_support( 'starter-content', array(
            'widgets'   => array(
            'sidebar-primary' => array( 'search', 'text_about', 'text_business_info' ),
            'footer-left'     => array( 'text_business_info' ),
            'footer-center'   => array( 'text_about' ),
            'footer-right'    => array( 'recent-posts', 'categories' ),
        ),
            'posts'     => array(
            'home' => array(
            'template' => 'templates/container.php',
        ),
            'about',
            'contact',
            'blog',
        ),
            'options'   => array(
            'show_on_front'  => 'page',
            'page_on_front'  => '{{home}}',
            'page_for_posts' => '{{blog}}',
        ),
            'nav_menus' => array(
            'primary' => array(
            'name'  => __( 'Primary Menu', 'wp-moose' ),
            'items' => array(
            'link_home',
            'page_about',
            'page_contact',
            'page_blog'
        ),
        ),
        ),
        ) );
    }

}
add_action( 'after_setup_theme', 'wp_moose_setup' );
if ( !function_exists( 'wp_moose_widgets_init' ) ) {
    /**
     * Register widgets area.
     *
     * @see https://developer.wordpress.org/themes/functionality/sidebars/#registering-a-sidebar
     */
    function wp_moose_widgets_init()
    {
        $sidebar_class = 'widgets form-controls form-default form-primary rounded-md clearfix mb-gutter p-gutter ' . get_wp_moose_sidebar_container_style() . ' %2$s';
        $hero_class = 'form-controls form-default form-primary clearfix p-half-gutter %2$s';
        $footer_class = 'widgets form-controls form-default form-primary clearfix p-half-gutter %2$s';
        $title_class = 'widget-title mb-half-gutter';
        register_sidebar( [
            'name'          => esc_html__( 'Primary Sidebar', 'wp-moose' ),
            'id'            => 'sidebar-primary',
            'description'   => esc_html__( 'Add widgets here to appear in your Primary Sidebar.', 'wp-moose' ),
            'before_widget' => '<aside id="%1$s" class="' . $sidebar_class . '">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h2 class="' . $title_class . '">',
            'after_title'   => '</h2>',
        ] );
        register_sidebar( [
            'name'          => esc_html__( 'After Posts Widget Area', 'wp-moose' ),
            'id'            => 'sidebar-after-posts-widget-area',
            'description'   => esc_html__( 'Add widgets here to appear after post.', 'wp-moose' ),
            'before_widget' => '<aside id="%1$s" class="widgets clearfix mb-gutter %2$s">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h2 class="' . $title_class . '">',
            'after_title'   => '</h2>',
        ] );
        register_sidebar( [
            'name'          => esc_html__( 'Footer Left', 'wp-moose' ),
            'id'            => 'footer-left',
            'before_widget' => '<aside id="%1$s" class="' . $footer_class . '">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h3 class="' . $title_class . '">',
            'after_title'   => '</h3>',
        ] );
        register_sidebar( [
            'name'          => esc_html__( 'Footer Center', 'wp-moose' ),
            'id'            => 'footer-center',
            'before_widget' => '<aside id="%1$s" class="' . $footer_class . '">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h3 class="' . $title_class . '">',
            'after_title'   => '</h3>',
        ] );
        register_sidebar( [
            'name'          => esc_html__( 'Footer Right', 'wp-moose' ),
            'id'            => 'footer-right',
            'before_widget' => '<aside id="%1$s" class="' . $footer_class . '">',
            'after_widget'  => '</aside>',
            'before_title'  => '<h3 class="' . $title_class . '">',
            'after_title'   => '</h3>',
        ] );
    }

}
add_action( 'widgets_init', 'wp_moose_widgets_init' );