AlkantarClanX12

Your IP : 216.73.217.24


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/themes/lbx-egypt/app/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/themes/lbx-egypt/app/setup.php

<?php

/**
 * Theme setup.
 */

namespace App;

use function Roots\bundle;

/**
 * Register the theme assets.
 *
 * @return void
 */
add_action('wp_enqueue_scripts', function () {
    wp_enqueue_script('sage/vendor.js', asset('scripts/vendor.js')->uri(), ['jquery'], null, true);
    wp_enqueue_script('sage/app.js', asset('scripts/app.js')->uri(), ['sage/vendor.js'], null, true);

    wp_add_inline_script('sage/vendor.js', asset('scripts/manifest.js')->contents(), 'before');

    if (is_single() && comments_open() && get_option('thread_comments')) {
        wp_enqueue_script('comment-reply');
    }

    wp_enqueue_style('sage/tailwind.css', asset('styles/tailwind.css')->uri(), false, null);
    wp_enqueue_style('sage/app.css', asset('styles/app.css')->uri(), false, null);
    // bundle('app')->enqueue();
}, 9);

/**
 * Add preload scripts
 *
 * @return void
 */
add_action('wp_head', function () {
    $handles = apply_filters('genius/scripts/preload', [
        'sage/vendor.js',
        'sage/app.js'
    ]);

    collect($handles)
        ->filter(function ($handle) {
            return true; // Original code bug preloads even if queued.
            // return ! in_array($handle, wp_scripts()->queue);
        })
        ->filter(function ($handle) {
            return isset(wp_scripts()->registered[$handle]);
        })
        ->each(function ($handle) {
            $uri = wp_scripts()->registered[$handle]->src;
            echo "<link rel='preload' href='$uri' as='script'/>\n";
        });
}, 5);

/**
 * Add preload styles
 *
 * @return void
 */
add_action('wp_head', function () {
    $handles = apply_filters('genius/styles/preload', [
        'sage/tailwind.css',
        'sage/app.css',
        'child-theme-styles'
    ]);

    collect($handles)
        ->filter(function ($handle) {
            return true; // Original code bug preloads even if queued.
            // return ! in_array($handle, wp_styles()->queue);
        })
        ->filter(function ($handle) {
            return isset(wp_styles()->registered[$handle]);
        })
        ->each(function ($handle) {
            $uri = wp_styles()->registered[$handle]->src;
            echo "<link rel='preload' href='$uri' as='style'/>\n";
        });
}, 5);

/**
 * Set media print on scripts
 *
 * string $html    html style link tag
 * string $handle  script handle ie "genius/isolated/scriptname"
 *
 * @return string
 */
add_filter('style_loader_tag', function (string $html, string $handle): string {
    if ('development' === env('WP_ENV') || is_admin()) {
        return $html;
    }

    $handles = apply_filters('genius/styles/print', [
        'sage/app.css',
        'ugb-style-css',
        'ugb-style-css-premium',
        'wp-block-library',
        'simple-staff-list',
        'rplg-css',                // Business Reviews (below the fold, production only)
        'swiper-css',              // Business Reviews carousel (below the fold, production only)
        'lbx-saved-favorites',     // Saved favorites (non-critical)
    ]);

    return in_array($handle, $handles)
        ? preg_replace("/id='[^']*'/i", "media=\"print\" onload=\"this.media='all'\" ", $html)
        : $html;
}, 999, 2);

/**
 * Defer isolated scripts based on
 * registered handle name structure
 *
 * string $html    html script tag
 * string $handle  script handle ie "genius/isolated/scriptname"
 *
 * @return string
 */
add_filter( 'script_loader_tag', function (string $html, string $handle): string {
    return false !== strpos($handle, "genius/isolated/")
        ? str_replace(' src', ' defer src', $html)
        : $html;
}, 10, 2 );

/**
 * Register the theme assets with the block editor.
 *
 * @return void
 */
add_action('enqueue_block_editor_assets', function () {
    if ($manifest = asset('scripts/editor.asset.php')->load()) {
        wp_enqueue_script('sage/vendor.js', asset('scripts/vendor.js')->uri(), ...array_values($manifest));
        wp_enqueue_script('sage/editor.js', asset('scripts/editor.js')->uri(), ['sage/vendor.js'], null, true);

        wp_add_inline_script('sage/vendor.js', asset('scripts/manifest.js')->contents(), 'before');
    }

    wp_enqueue_style('sage/editor.css', asset('styles/editor.css')->uri(), false, null);
    // bundle('editor')->enqueue();
}, 100);

/**
 * Register the script to change the dynamic URL with Polylang plugin in the SRP.
 *
 * @return void
 */
add_action('wp_enqueue_scripts', function () {
  if ( function_exists ( 'pll_the_languages' ) ) {
    wp_register_script('leadbox-langSwitcher-script-defer', asset('scripts/bladeScripts/polylangLangSwitcher.js')->uri(), [], false, true);
    wp_enqueue_script('leadbox-langSwitcher-script-defer');
  }
}, 10);

/**
 * Leadbox DataLayer v2 (LBT-1395) — enqueue the tracking bootstrap script
 * only when the feature is toggled on in Leadbox Settings.
 *
 * @return void
 */
add_action('wp_enqueue_scripts', function () {
    if (function_exists('is_lbx_datalayer_enabled') && is_lbx_datalayer_enabled()) {
        enqueueIsolatedScript('leadbox-datalayer');
    }
}, 10);

/**
 * Register the initial theme setup.
 *
 * @return void
 */
add_action('after_setup_theme', function () {
    /**
     * Enable features from the Soil plugin if activated.
     * @link https://roots.io/plugins/soil/
     */
    add_theme_support('soil', [
        'clean-up',
        'nav-walker',
        'nice-search',
        'relative-urls'
    ]);

    /**
     * Disable full-site editing support.
     *
     * @link https://wptavern.com/gutenberg-10-5-embeds-pdfs-adds-verse-block-color-options-and-introduces-new-patterns
     */
    remove_theme_support('block-templates');

    /**
     * Register the navigation menus.
     * @link https://developer.wordpress.org/reference/functions/register_nav_menus/
     */
    register_nav_menus([
        'primary_navigation' => __('Primary Navigation', 'sage')
    ]);

    /**
     * Disable the default block patterns.
     * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-the-default-block-patterns
     */
    remove_theme_support('core-block-patterns');

    /**
     * Enable plugins to manage the document title.
     * @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
     */
    add_theme_support('title-tag');

    /**
     * Enable post thumbnail support.
     * @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
     */
    add_theme_support('post-thumbnails');

    /**
     * Enable responsive embed support.
     * @link https://wordpress.org/gutenberg/handbook/designers-developers/developers/themes/theme-support/#responsive-embedded-content
     */
    add_theme_support('responsive-embeds');

    /**
     * Enable HTML5 markup support.
     * @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5
     */
    add_theme_support('html5', [
        'caption',
        'comment-form',
        'comment-list',
        'gallery',
        'search-form',
        'script',
        'style'
    ]);

    /**
     * Enable selective refresh for widgets in customizer.
     * @link https://developer.wordpress.org/themes/advanced-topics/customizer-api/#theme-support-in-sidebars
     */
    add_theme_support('customize-selective-refresh-widgets');
}, 20);

/**
 * Register the theme sidebars.
 *
 * @return void
 */
add_action('widgets_init', function () {
    $config = [
        'before_widget' => '<section class="widget %1$s %2$s">',
        'after_widget' => '</section>',
        'before_title' => '<h3>',
        'after_title' => '</h3>'
    ];

    register_sidebar([
        'name' => __('Primary', 'sage'),
        'id' => 'sidebar-primary'
    ] + $config);

    register_sidebar([
        'name' => __('Footer', 'sage'),
        'id' => 'sidebar-footer'
    ] + $config);
});

Home - Capital GMC Buick Regina

No data

Welcome to Capital GMC BUICK – REGINA

Thank you for choosing Capital GMC Buick | Regina, your premier certified Buick and GMC dealership proudly serving drivers in Regina and the surrounding communities. Whether you’re searching for a brand-new Buick or GMC vehicle or a meticulously inspected pre-owned model, we have a diverse selection to match your needs and lifestyle.

Beyond our impressive inventory, we offer a seamless and stress-free financing experience through our well-connected finance centre, where our team of experts is dedicated to securing the best loan or lease options for you, quickly, transparently, and hassle-free.

But our commitment to you doesn’t stop at the sale. Our state-of-the-art service centre is staffed with skilled Buick and GMC technicians who use the latest equipment and genuine OEM parts to keep your vehicle running at its best. From routine maintenance to complex repairs, we’ve got you covered.

Experience top-tier customer service, quality vehicles, and expert care, all in one place. Visit Capital GMC Buick | Regina today or call us at 306-205-8072 with any questions. We’re here to help!

Ask a Question