AlkantarClanX12
Your IP : 216.73.217.24
<?php
/**
* Class for Admin Tools
*
* @package PopupMaker
* @copyright Copyright (c) 2024, Code Atlantic LLC
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class PUM_Admin_Tools
*/
class PUM_Admin_Tools {
/**
* @var array
*/
public static $notices = [];
/**
* Initializes the "Tools" page.
*/
public static function init() {
add_action( 'admin_notices', [ __CLASS__, 'notices' ] );
add_action( 'admin_init', [ __CLASS__, 'emodal_process_import' ] );
add_action( 'pum_tools_page_tab_betas', [ __CLASS__, 'betas_display' ] );
add_action( 'pum_tools_page_tab_error_log', [ __CLASS__, 'errorlog_display' ] );
add_action( 'pum_tools_page_tab_action_scheduler', [ __CLASS__, 'action_scheduler_display' ] );
add_action( 'pum_tools_page_tab_import', [ __CLASS__, 'import_display' ] );
add_action( 'pum_save_enabled_betas', [ __CLASS__, 'save_enabled_betas' ] );
add_action( 'pum_empty_error_log', [ __CLASS__, 'error_log_empty' ] );
}
/**
* Displays any saved admin notices.
*/
public static function notices() {
// Ignored because this is a simple boolean check after a redirect for success indicator.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['imported'] ) ) {
?>
<div class="updated">
<p><?php esc_html_e( 'Successfully Imported your themes & modals from Easy Modal.', 'popup-maker' ); ?></p>
</div>
<?php
}
// Ignored because this is a simple boolean check after a redirect for success indicator.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( isset( $_GET['success'] ) && get_option( 'pum_settings_admin_notice' ) ) {
self::$notices[] = [
// Ignored because this is a simple boolean check after a redirect for success indicator.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
'type' => (bool) $_GET['success'] ? 'success' : 'error',
'message' => get_option( 'pum_settings_admin_notice' ),
];
delete_option( 'pum_settings_admin_notice' );
}
if ( ! empty( self::$notices ) ) {
foreach ( self::$notices as $notice ) {
?>
<div class="notice notice-<?php echo esc_attr( $notice['type'] ); ?> is-dismissible">
<p><strong><?php esc_html( $notice['message'] ); ?></strong></p>
<button type="button" class="notice-dismiss">
<span class="screen-reader-text"><?php esc_html_e( 'Dismiss this notice.', 'popup-maker' ); ?></span>
</button>
</div>
<?php
}
}
}
/**
* Render settings page with tabs.
*/
public static function page() {
$active_tab = self::get_active_tab();
wp_enqueue_style( 'pum-admin-general' );
?>
<div class="wrap">
<form id="pum-tools" method="post" action="">
<?php wp_nonce_field( basename( __FILE__ ), 'pum_tools_nonce' ); ?>
<button class="right top button-primary"><?php esc_html_e( 'Save', 'popup-maker' ); ?></button>
<h1><?php esc_html_e( 'Popup Maker Tools', 'popup-maker' ); ?></h1>
<h2 id="popmake-tabs" class="nav-tab-wrapper">
<?php
foreach ( self::tabs() as $tab_id => $tab_name ) {
$tab_url = add_query_arg(
[
'tools-updated' => false,
'tab' => $tab_id,
]
);
printf( '<a href="%s" title="%s" class="nav-tab %s">%s</a>', esc_url( $tab_url ), esc_attr( $tab_name ), $active_tab === $tab_id ? ' nav-tab-active' : '', esc_html( $tab_name ) );
}
?>
</h2>
<div id="tab_container">
<?php do_action( 'pum_tools_page_tab_' . $active_tab ); ?>
<?php do_action( 'popmake_tools_page_tab_' . $active_tab ); ?>
</div>
</form>
</div>
<?php
}
/**
* Tabs & labels
*
* @return array $tabs
* @since 1.0
*/
public static function tabs() {
static $tabs;
if ( ! isset( $tabs ) ) {
$tabs = apply_filters(
'pum_tools_tabs',
[
'betas' => __( 'Beta Versions', 'popup-maker' ),
'error_log' => __( 'Error Log', 'popup-maker' ),
'import' => __( 'Import / Export', 'popup-maker' ),
]
);
/** @deprecated 1.7.0 */
$tabs = apply_filters( 'popmake_tools_tabs', $tabs );
}
return $tabs;
}
/**
* Return an array of all extensions with beta support
*
* Extensions should be added as 'extension-slug' => 'Extension Name'
*
* @return array $extensions The array of extensions
* @since 1.5
*/
public static function get_beta_enabled_extensions() {
return apply_filters( 'pum_beta_enabled_extensions', [] );
}
/**
* @return int|null|string
*/
public static function get_active_tab() {
$tabs = self::tabs();
// Ignored because this is a simple check for a valid tab in the URL.
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
$tab = isset( $_GET['tab'] ) ? sanitize_key( wp_unslash( $_GET['tab'] ) ) : '';
return array_key_exists( $tab, $tabs ) ? $tab : key( $tabs );
}
/**
* Display beta opt-ins
*
* @since 1.3
*/
public static function betas_display() {
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
$has_beta = self::get_beta_enabled_extensions();
do_action( 'pum_tools_betas_before' );
?>
<div class="postbox pum-beta-support">
<h3><span><?php esc_html_e( 'Enable Beta Versions', 'popup-maker' ); ?></span></h3>
<div class="inside">
<p><?php esc_html_e( 'Checking any of the below checkboxes will opt you in to receive pre-release update notifications. You can opt-out at any time. Pre-release updates do not install automatically, you will still have the opportunity to ignore update notifications.', 'popup-maker' ); ?></p>
<table class="form-table pum-beta-support">
<tbody>
<?php foreach ( $has_beta as $slug => $product ) : ?>
<tr>
<?php $checked = self::extension_has_beta_support( $slug ); ?>
<th scope="row"><?php echo esc_html( $product ); ?></th>
<td>
<input type="checkbox" name="enabled_betas[<?php echo esc_attr( $slug ); ?>]" id="enabled_betas[<?php echo esc_attr( $slug ); ?>]"<?php echo checked( $checked, true, false ); ?> value="1" />
<label for="enabled_betas[<?php echo esc_attr( $slug ); ?>]">
<?php
printf(
/* translators: 1. Product name. */
esc_html__( 'Get updates for pre-release versions of %s', 'popup-maker' ),
esc_attr( $product )
);
?>
</label>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="pum_action" value="save_enabled_betas" />
<?php wp_nonce_field( 'pum_save_betas_nonce', 'pum_save_betas_nonce' ); ?>
<?php submit_button( __( 'Save', 'popup-maker' ), 'secondary', 'submit', false ); ?>
</div>
</div>
<?php
do_action( 'pum_tools_betas_after' );
}
/**
* Displays the contents of the Error Log tab
*
* @since 1.12.0
*/
public static function errorlog_display() {
$enabled = PUM_Utils_Logging::instance()->enabled();
?>
<h2>Error Log<?php echo esc_html( $enabled ? '' : ' (disabled)' ); ?></h2>
<?php if ( $enabled ) : ?>
<a target="_blank" rel="noreferrer noopener" href="<?php echo esc_url( PUM_Utils_Logging::instance()->get_file_url() ); ?>" download="pum-debug.log" class="button button-primary button-with-icon"><i class="dashicons dashicons-download"></i>Download Error Log</a>
<form action="" method="POST">
<input type="hidden" name="pum_action" value="empty_error_log" />
<?php wp_nonce_field( 'pum_popup_empty_log_nonce', 'pum_popup_empty_log_nonce' ); ?>
<?php submit_button( 'Empty Error Log', '', 'popmake-empty-log', false ); ?>
</form>
<?php endif; ?>
<div id="log-viewer">
<pre><?php echo wp_kses( self::display_error_log(), wp_kses_allowed_html( 'data' ) ); ?></pre>
</div>
<?php
}
/**
* Displays the content for the Scheduled Actions tab.
*
* @uses ActionScheduler_AdminView::render_admin_ui()
* @since 1.12.0
*/
public static function action_scheduler_display() {
if ( class_exists( 'ActionScheduler_AdminView' ) ) {
$test = new ActionScheduler_AdminView();
$test->render_admin_ui();
}
}
/**
* Displays the contents for the Import tab
*
* @since 1.12.0
*/
public static function import_display() {
?>
<h2>Using Easy Modal?</h2>
<p>Click this button to import popups from the Easy Modal plugin.</p>
<button id="popmake_emodal_v2_import" name="popmake_emodal_v2_import" class="button button-large">
<?php esc_html_e( 'Import From Easy Modal v2', 'popup-maker' ); ?>
</button>
<?php
wp_nonce_field( 'popmake_emodal_v2_import', 'popmake_emodal_v2_import_nonce' );
}
/**
* Add a button to import easy modal data.
*
* @deprecated
*/
public static function emodal_v2_import_button() {
self::import_display();
}
/**
* Empties error log when user clicks on button
*
* @since 1.12.0
*/
public static function error_log_empty() {
if ( ! is_user_logged_in() || ! current_user_can( 'manage_options' ) ) {
return;
}
if ( ! isset( $_POST['pum_popup_empty_log_nonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['pum_popup_empty_log_nonce'] ) ), 'pum_popup_empty_log_nonce' ) ) {
return;
}
PUM_Utils_Logging::instance()->clear_log();
}
/**
* Process em import.
*/
public static function emodal_process_import() {
if (
! isset( $_REQUEST['popmake_emodal_v2_import'] ) ||
! isset( $_REQUEST['popmake_emodal_v2_import_nonce'] ) ||
! wp_verify_nonce( sanitize_key( wp_unslash( $_REQUEST['popmake_emodal_v2_import_nonce'] ) ), 'popmake_emodal_v2_import_nonce' ) ||
! current_user_can( 'manage_options' )
) {
return;
}
popmake_emodal_v2_import();
wp_safe_redirect( admin_url( 'edit.php?post_type=popup&page=pum-tools&imported=1' ), 302 );
}
/**
* Save enabled betas
*
* @since 1.5
*/
public static function save_enabled_betas() {
if ( ! isset( $_POST['pum_save_betas_nonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_POST['pum_save_betas_nonce'] ) ), 'pum_save_betas_nonce' ) ) {
return;
}
if ( ! current_user_can( 'manage_options' ) ) {
return;
}
if ( ! empty( $_POST['enabled_betas'] ) ) {
$enabled_betas = array_filter(
array_map(
[
__CLASS__,
'enabled_betas_sanitize_value',
],
// Ignored as this is a list of checked boxes (booleans).
// phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
wp_unslash( $_POST['enabled_betas'] )
)
);
PUM_Utils_Options::update( 'enabled_betas', $enabled_betas );
} else {
PUM_Utils_Options::delete( 'enabled_betas' );
}
}
/**
* Sanitize the supported beta values by making them booleans
*
* @param mixed $value The value being sent in, determining if beta support is enabled.
*
* @return bool
* @since 1.5
*/
public static function enabled_betas_sanitize_value( $value ) {
return filter_var( $value, FILTER_VALIDATE_BOOLEAN );
}
/**
* Check if a given extensions has beta support enabled
*
* @param string $slug The slug of the extension to check.
*
* @return bool True if enabled, false otherwise
* @since 1.5
*/
public static function extension_has_beta_support( $slug ) {
$enabled_betas = PUM_Utils_Options::get( 'enabled_betas', [] );
$return = false;
if ( array_key_exists( $slug, $enabled_betas ) ) {
$return = true;
}
return $return;
}
/**
* Retrieves error log and prepares it for displaying
*
* @uses PUM_Utils_Logging::get_log()
* @since 1.12.0
*/
public static function display_error_log() {
$logger = PUM_Utils_Logging::instance();
if ( ! $logger->enabled() ) {
return __( 'Debug logging is disabled.', 'popup-maker' );
}
// $logger->log( 'Log viewed from Tools page' );
return $logger->get_log();
}
}
Home - Capital GMC Buick Regina
Skip to content
{{ $t(category) }}
Error
{{vehicle.modelData.year}} {{vehicle.modelData.make}} {{vehicle.modelData.model}}
Starting from {{vehicle.modelData.startingPrice | moneyFormat(lang)}}
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
Capital GMC Buick – Regina
Contact Us
Have a question or need assistance? Fill out the form and we will reach out to you as soon as possible.
Notice: JavaScript is required for this content.
CLOSE
Schedule a Visit
Let us know when you are coming and how we can assist you. We can ensure someone will be on hand to help you out at the desired date and time.
Notice: JavaScript is required for this content.
CLOSE
Find a Career
Have a look at our list of available positions and apply online today to join our team!
×
Opportunities to Grow
The auto industry is constantly changing and we want to continue to grow. We offer growth, leadership & mentorship programs to allow our staff to grow with us.
×
Competitive Salary
We have a significant earning potential with incentive-based pay in most roles. We also offer an employee referral bonus with paid bonuses.
×
Health & Dental
We offer a comprehensive benefits package including extended health, dental, and vision care. We also include paramedical, life insurance, paid sick leave, short & long-term disability coverages.
×
Vacation
We value our employees and want everyone to take their vacation time. We offer a minimum of 2 weeks vacation each year.
×
Training & Development
We have many opportunities for paid education and training in-house as well as training from the Manufacturer.
×
$10,000 Cash Giveaway – Terms & Conditions
All October long, stop by Capital GMC Buick Cadillac, to enter for your chance to win $10,000 cash. No purchase is required, but entries must be made in-store.
The contest is open to residents of Saskatchewan who are 18+. Dealership employees and their households are not eligible. Entries will be accepted from October 1 to October 31, 2025. A random draw will take place on November 1, 2025.
The prize is one $10,000 award, paid by cheque, and must be accepted as awarded. Winner will be contacted by phone or email and must respond within 7 days or another entry may be drawn. Odds of winning depend on the number of entries received.By entering, you agree that Capital Automotive Group may use your name and photo for winner announcements. The contest is governed by the laws of Saskatchewan.
Notice: JavaScript is required for this content.
CLOSE