From dfa24763f5a3750aee4e9c4e2ae202da72d3f5c5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 11:41:17 +0000 Subject: [PATCH 1/2] chore(deps): update dependency stylelint-config-standard-scss to v17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7485efe4..339d3c45 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "prettier": "^3.4.0", "sass": "^1.83.0", "stylelint": "^16.12.0", - "stylelint-config-standard-scss": "^13.0.0", + "stylelint-config-standard-scss": "^17.0.0", "vite": "^6.0.0", "vite-plugin-live-reload": "^3.0.3" }, From 5359f4133daa39a8a0b1a6a4a811293db73cf8a3 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Thu, 29 Jan 2026 11:41:24 +0000 Subject: [PATCH 2/2] Apply fixes from StyleCI [ci skip] [skip ci] --- app/Admin/AdminOptions.php | 4 +-- app/Controllers/Api/ApiController.php | 2 +- app/Controllers/PageController.php | 4 +-- app/CustomFields/Blocks.php | 2 +- app/CustomFields/Blocks/example.php | 5 ++-- app/CustomFields/PostFields.php | 4 +-- app/Handlers/AjaxHandlers/contact.php | 8 +++--- app/Handlers/AjaxHandlers/login.php | 8 +++--- app/helpers.php | 36 +++++++++++++++++++-------- bootstrap/app.php | 2 +- config/admin.php | 8 +++--- resources/functions.php | 6 ++--- resources/index.php | 2 +- 13 files changed, 52 insertions(+), 39 deletions(-) diff --git a/app/Admin/AdminOptions.php b/app/Admin/AdminOptions.php index ccdeaf63..e0458f22 100644 --- a/app/Admin/AdminOptions.php +++ b/app/Admin/AdminOptions.php @@ -24,7 +24,7 @@ public function index(): void 'gallery', 'search-form', 'script', - 'style' + 'style', ]); remove_theme_support('block-templates'); remove_theme_support('core-block-patterns'); @@ -67,7 +67,7 @@ public function registerScripts(): void wp_localize_script('app', 'data', [ 'ajax_url' => admin_url('admin-ajax.php'), - 'nonce' => wp_create_nonce('ajax-nonce'), + 'nonce' => wp_create_nonce('ajax-nonce'), ]); } diff --git a/app/Controllers/Api/ApiController.php b/app/Controllers/Api/ApiController.php index c6eb22c3..c0be6021 100644 --- a/app/Controllers/Api/ApiController.php +++ b/app/Controllers/Api/ApiController.php @@ -7,7 +7,7 @@ class ApiController public function index(): array { return [ - 'title' => 'title' + 'title' => 'title', ]; } } diff --git a/app/Controllers/PageController.php b/app/Controllers/PageController.php index 394649ec..ade5549b 100644 --- a/app/Controllers/PageController.php +++ b/app/Controllers/PageController.php @@ -35,9 +35,9 @@ public function list(): array } $this->data['posts'] = Timber::get_posts([ - 'post_type' => 'post', + 'post_type' => 'post', 'posts_per_page' => 10, - 'paged' => $paged, + 'paged' => $paged, ]); $this->data['categories'] = Timber::get_terms('category'); diff --git a/app/CustomFields/Blocks.php b/app/CustomFields/Blocks.php index 1843fa6c..186698d3 100644 --- a/app/CustomFields/Blocks.php +++ b/app/CustomFields/Blocks.php @@ -4,5 +4,5 @@ * post/page blocks */ add_action('carbon_fields_register_fields', function () { - include __DIR__ . '/Blocks/example.php'; + include __DIR__.'/Blocks/example.php'; }); diff --git a/app/CustomFields/Blocks/example.php b/app/CustomFields/Blocks/example.php index 13fbfb87..1a11f40e 100644 --- a/app/CustomFields/Blocks/example.php +++ b/app/CustomFields/Blocks/example.php @@ -5,10 +5,9 @@ wp_register_style( 'crb-my-shiny-gutenberg-block-stylesheet', - get_stylesheet_directory_uri() . '../app/CustomFields/Blocks/example.css' + get_stylesheet_directory_uri().'../app/CustomFields/Blocks/example.css' ); - Block::make(__('My Gutenberg Block')) ->add_fields([ Field::make('text', 'heading', __('Block Heading')), @@ -18,5 +17,5 @@ ->set_description(__('Description for the block')) ->set_editor_style('crb-my-shiny-gutenberg-block-stylesheet') ->set_render_callback(function ($fields, $attributes, $inner_blocks) { - include(__DIR__ . '/example.view.php'); + include __DIR__.'/example.view.php'; }); diff --git a/app/CustomFields/PostFields.php b/app/CustomFields/PostFields.php index 4c06485d..c64ba65b 100644 --- a/app/CustomFields/PostFields.php +++ b/app/CustomFields/PostFields.php @@ -4,8 +4,8 @@ * post/page fields */ add_action('carbon_fields_register_fields', function () { - include __DIR__ . '/Fields/home.php'; - include __DIR__ . '/Fields/about.php'; + include __DIR__.'/Fields/home.php'; + include __DIR__.'/Fields/about.php'; // Container::make( 'comment_meta', 'Comment fields' ) // ->add_fields( array( // Field::make( 'text', 'comment_rating', 'Rating' ), diff --git a/app/Handlers/AjaxHandlers/contact.php b/app/Handlers/AjaxHandlers/contact.php index e468df0e..033f143a 100644 --- a/app/Handlers/AjaxHandlers/contact.php +++ b/app/Handlers/AjaxHandlers/contact.php @@ -20,15 +20,15 @@ } $isMailSent = send_email('test', [ - 'subject' => 'test form', + 'subject' => 'test form', 'site_name' => get_bloginfo('name'), - 'name' => $name, - 'mail' => $mail, + 'name' => $name, + 'mail' => $mail, ]); if ($isMailSent) { wp_send_json([ - 'type' => 'success', + 'type' => 'success', 'message' => 'Your request has been successfully sent, thank you!', ]); } else { diff --git a/app/Handlers/AjaxHandlers/login.php b/app/Handlers/AjaxHandlers/login.php index bb783360..689a35ec 100644 --- a/app/Handlers/AjaxHandlers/login.php +++ b/app/Handlers/AjaxHandlers/login.php @@ -16,21 +16,21 @@ } $credentials = [ - 'user_login' => $email, + 'user_login' => $email, 'user_password' => $password, - 'remember' => true, + 'remember' => true, ]; $user = wp_signon($credentials, false); if (is_wp_error($user)) { wp_send_json([ - 'type' => 'error', + 'type' => 'error', 'message' => json_decode($user->get_error_message()), ]); } wp_send_json([ - 'type' => 'success', + 'type' => 'success', 'message' => 'Your successfully enter', ]); diff --git a/app/helpers.php b/app/helpers.php index 1d0b6cdb..9d3625ae 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -5,8 +5,10 @@ if (!function_exists('send_email')) { /** * Send a custom email. + * * @param string $templateFilename - * @param array $templateData + * @param array $templateData + * * @return bool|null */ function send_email(string $templateFilename, array $templateData): ?bool @@ -19,19 +21,23 @@ function send_email(string $templateFilename, array $templateData): ?bool /** * Compile an email template. + * * @param string $filename - * @param array $data + * @param array $data + * * @return string */ function compile_email_template(string $filename, array $data): string { - return Timber::compile('/resources/views/emails/' . $filename . '.twig', $data); + return Timber::compile('/resources/views/emails/'.$filename.'.twig', $data); } /** * Dispatch an email. + * * @param string $subject * @param string $body + * * @return bool */ function dispatch_email(string $subject, string $body): bool @@ -41,7 +47,7 @@ function dispatch_email(string $subject, string $body): bool $toEmail = $adminEmail; $headers[] = 'Content-type: text/html; charset=utf-8'; - $headers[] = 'From: ' . $fromEmail; + $headers[] = 'From: '.$fromEmail; return wp_mail($toEmail, $subject, $body, $headers); } @@ -50,24 +56,26 @@ function dispatch_email(string $subject, string $body): bool if (!function_exists('add_ajax_action')) { /** * Registers an AJAX action with WordPress. + * * @param string $name The name of the AJAX action. */ function add_ajax_action(string $name): void { - $action_path = APP_PATH . '/Handlers/AjaxHandlers/' . $name . '.php'; + $action_path = APP_PATH.'/Handlers/AjaxHandlers/'.$name.'.php'; add_ajax_action_impl($name, 'wp_ajax', $action_path); add_ajax_action_impl($name, 'wp_ajax_nopriv', $action_path); } /** * Helper function to implement AJAX action registration. - * @param string $name The name of the AJAX action. - * @param string $hook The WordPress hook to associate with the action. + * + * @param string $name The name of the AJAX action. + * @param string $hook The WordPress hook to associate with the action. * @param string $action_path Path to the PHP file that handles the action. */ function add_ajax_action_impl(string $name, string $hook, string $action_path): void { - add_action($hook . "_$name", function () use ($action_path) { + add_action($hook."_$name", function () use ($action_path) { require $action_path; }); } @@ -76,19 +84,21 @@ function add_ajax_action_impl(string $name, string $hook, string $action_path): if (!function_exists('dd')) { /** * Debug function to dump and die. Outputs the given variable and stops execution. + * * @param mixed $result The variable to be dumped. */ function dd(mixed $result): void { echo '
';
         print_r($result);
-        die();
+        exit;
     }
 }
 
 if (!function_exists('crb_get_i18n_suffix')) {
     /**
      * Get the suffix for internationalization, typically a language code.
+     *
      * @return string The suffix for the current language, or an empty string if not set.
      */
     function crb_get_i18n_suffix(): string
@@ -97,19 +107,23 @@ function crb_get_i18n_suffix(): string
         if (!defined('ICL_LANGUAGE_CODE')) {
             return $suffix;
         }
-        return '_' . ICL_LANGUAGE_CODE;
+
+        return '_'.ICL_LANGUAGE_CODE;
     }
 }
 
 if (!function_exists('crb_get_i18n_theme_option')) {
     /**
      * Retrieves a theme option value with internationalization support.
+     *
      * @param string $option_name The name of the theme option.
+     *
      * @return mixed The value of the theme option for the current language.
      */
     function crb_get_i18n_theme_option(string $option_name): mixed
     {
         $suffix = crb_get_i18n_suffix();
-        return carbon_get_theme_option($option_name . $suffix);
+
+        return carbon_get_theme_option($option_name.$suffix);
     }
 }
diff --git a/bootstrap/app.php b/bootstrap/app.php
index 170d0ddb..8ef1d598 100644
--- a/bootstrap/app.php
+++ b/bootstrap/app.php
@@ -4,7 +4,7 @@
 use App\Admin\HiddenData;
 use Core\AppConfig;
 
-$configPath = __DIR__ . '/../config/admin.php';
+$configPath = __DIR__.'/../config/admin.php';
 $config = include $configPath;
 
 new AppConfig($config);
diff --git a/config/admin.php b/config/admin.php
index 7202a93a..99eea218 100644
--- a/config/admin.php
+++ b/config/admin.php
@@ -4,9 +4,9 @@
  * basic admin theme options.
  */
 return [
-    'show_posts' => true,
-    'show_pages' => true,
+    'show_posts'      => true,
+    'show_pages'      => true,
     'enable_comments' => true,
-    'show_tools' => true,
-    'show_admin_bar' => true,
+    'show_tools'      => true,
+    'show_admin_bar'  => true,
 ];
diff --git a/resources/functions.php b/resources/functions.php
index 7f084207..fc2628ff 100644
--- a/resources/functions.php
+++ b/resources/functions.php
@@ -2,10 +2,10 @@
 
 use Carbon_Fields\Carbon_Fields;
 
-const APP_PATH = __DIR__ . '/../app';
-const BASE_PATH = __DIR__ . '/..';
+const APP_PATH = __DIR__.'/../app';
+const BASE_PATH = __DIR__.'/..';
 
-if (!file_exists($composer = BASE_PATH . '/vendor/autoload.php')) {
+if (!file_exists($composer = BASE_PATH.'/vendor/autoload.php')) {
     wp_die('Error locating autoloader. Please run composer install.');
 }
 
diff --git a/resources/index.php b/resources/index.php
index cb0f74f5..1aa810cb 100644
--- a/resources/index.php
+++ b/resources/index.php
@@ -1,3 +1,3 @@