Skip to content

Commit 92a6662

Browse files
theMasudRanaup1512001AishwarryaPandeimrraajsanketio
authored
Release v1.0.4 (#85)
* refactor: update changelog script to use npx and remove conventional-changelog-cli dependency - Changed the changelog script in package.json to use npx for conventional-changelog-cli. - Removed conventional-changelog-cli from dependencies in package-lock.json. - Cleaned up unnecessary dependencies related to conventional changelog generation. * chore: update CHANGELOG for version 1.0.1 with bug fixes and new features * chore: remove unused dependency scrivo/highlight.php from composer files * feat: add .distignore file to exclude unnecessary files from WordPress.org distribution * feat: add localization support and update package.json for repository and bugs metadata * feat: add readme.txt with plugin details and installation instructions * feat: update license and version in carousel-kit.php; add index.php for plugin structure * feat: add screenshot for plugin preview in WordPress.org * feat: update .distignore to refine exclusions for WordPress.org distribution * fix(styles): remove unnecessary grid-template-columns property * refactor(styles): improve transition effects and clean up unused properties * fix: CSS linting issues * refactor: Remove unrelated changes from current PR * feat: add placeholder logos and update hero carousel pattern * feat: update .distignore to exclude README.md and enhance carousel-kit.php for direct access protection * feat: Updated pot file * feat: update PHP requirement to 8.2, bump stable tag to 1.0.3, and add changelog entries for fixes * chore: format package.json for consistency in spacing * chore: remove upgrade notice section from readme.txt * chore: remove version field from package.json * feat: update PHP requirement to 8.2 and reorder contributors in plugin header * chore: remove version field from package-lock.json * docs: add link to full changelog in readme.txt * chore: remove version field from package-lock.json * fix: update file paths in phpcs and phpstan configuration * feat: implement autoloader for PHP classes and refactor constant definitions * fix: ignore phpcs warning for including pattern file from a fixed directory * fix: update script paths in composer.json and improve constant definitions in tests * fix: update POT-Creation-Date and add missing autoloader error message * chore: update @wordpress/scripts to version 31.5.0 * feat: add new screenshot image and remove outdated PNG file * fix: clean up .distignore by removing unnecessary files and directories * fix: remove outdated screenshots description from readme * fix: update dist target to exclude additional configuration and development files * fix: ensure direct access to Autoloader.php exits gracefully * fix: update package dependencies for minimatch and serialize-javascript * fix: update script paths in composer.json to use local binaries * feat: update README with minimum requirements and add uninstall functionality * fix: update WordPress minimum requirement to 6.6 in README, INSTALLATION, and readme.txt * fix: update contributors list in plugin header and readme.txt * fix: update package-lock.json to remove unused dependency and upgrade svgo and immutable versions * fix: update tested up to version in readme.txt from 6.9.1 to 6.9 * fix: correct release link in INSTALLATION.md and update node_modules exclusion in phpstan.neon.dist * fix: update @wordpress/scripts version to allow minor updates * chore(release): Prepare v1.0.4 release (#76) * chore: update version to 1.0.4 and enhance readme with changelog details * fix: update stable tag in readme.txt to 1.0.4 * fix: update changelog links to point to the correct repository * fix: update contributors list in README and readme.txt * docs: update Composer installation instructions in INSTALLATION.md * docs: fix formatting in Composer installation instructions in INSTALLATION.md * fix: correct release link format in CHANGELOG.md for version 1.0.1 * fix: remove hardcoded plugin version from Makefile and update installation instructions in INSTALLATION.md * docs: update note on WPackagist availability in INSTALLATION.md Co-authored-by: Utsav Patel <75293077+up1512001@users.noreply.github.com> * Fix: Wide Alignment + Block Tree Selection (#70) * fix: resolve slide translation and Block Tree selection issues with wide alignment * feat: add hooks for observing DOM mutations and resize events in carousel * fix: adjust full and wide alignment styles for carousel container * fix: clarify comment on full alignment breaking out of container * fix: refactor slide count change detection logic in useEmblaQueryLoopObserver * fix: improve slide count detection and optimize viewport scroll handling * fix: add BlockEditorSelectors interface for improved type safety in edit component * fix: ensure viewportEl is set only when node is not null to avoid state updates during unmount * fix: add box-sizing property to ensure no horizontal scroll bar in editor * fix: improve resize observer logic to prevent unnecessary reinitializations * fix: refactor viewportEl state management to prevent unnecessary reinitializations * fix: update documentation for Embla observers to clarify initialization logic * fix: enhance resize observer to track column size changes * fix: improve first slide observation logic to prevent unnecessary re-observations * fix: consolidate resize and mutation observers into a unified hook for improved carousel init * fix: update comment to reflect change from manual debounced ResizeObserver in useCarouselObservers * fix: handle empty template case by destroying Embla instance to prevent stale references Co-authored-by: Aviral Mittal aviral.ideabox@gmail.com Co-authored-by: Vishal Kotak vishalkotak200@gmail.com Co-authored-by: Aishwarrya Pande <169024277+AishwarryaPande@users.noreply.github.com> Co-authored-by: Raj Patel <71687258+imrraaj@users.noreply.github.com> Co-authored-by: Sanket Parmar <7807348+sanketio@users.noreply.github.com> * fix: add direct access protection to example pattern files (#84) Co-authored-by: rtCamp <1128395+rtCamp@users.noreply.github.com> Co-authored-by: Gagan Deep Singh <1535505+gagan0123@users.noreply.github.com> Co-authored-by: Sagar Tamang <8264719+mi5t4n@users.noreply.github.com> Co-authored-by: Aviral Mittal <68884287+aviral-mittal@users.noreply.github.com> Co-authored-by: Vishal Kotak <34092861+vishal4669@users.noreply.github.com> * feat: add new asset images and replace old screenshot (#86) --------- Co-authored-by: Utsav Patel <75293077+up1512001@users.noreply.github.com> Co-authored-by: Aishwarrya Pande <169024277+AishwarryaPande@users.noreply.github.com> Co-authored-by: Raj Patel <71687258+imrraaj@users.noreply.github.com> Co-authored-by: Sanket Parmar <7807348+sanketio@users.noreply.github.com> Co-authored-by: rtCamp <1128395+rtCamp@users.noreply.github.com> Co-authored-by: Gagan Deep Singh <1535505+gagan0123@users.noreply.github.com> Co-authored-by: Sagar Tamang <8264719+mi5t4n@users.noreply.github.com> Co-authored-by: Aviral Mittal <68884287+aviral-mittal@users.noreply.github.com> Co-authored-by: Vishal Kotak <34092861+vishal4669@users.noreply.github.com>
1 parent 750b114 commit 92a6662

43 files changed

Lines changed: 2192 additions & 1635 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.distignore

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Exclude from WordPress.org distribution
2+
3+
# Git/Version Control
4+
.git/
5+
.github/
6+
.gitignore
7+
8+
# Development Configuration
9+
.editorconfig
10+
.eslintignore
11+
.eslintrc.json
12+
.husky/
13+
.npmrc
14+
.nvmrc
15+
.stylelintignore
16+
babel.config.js
17+
commitlint.config.js
18+
jest.config.js
19+
Makefile
20+
phpcs.xml.dist
21+
phpstan.neon.dist
22+
phpunit.xml.dist
23+
tsconfig.json
24+
25+
# Source files (build output is included)
26+
src/
27+
28+
# Tests
29+
tests/
30+
31+
# Documentation
32+
docs/
33+
DEVELOPMENT.md
34+
35+
# WordPress.org assets (separate from plugin)
36+
wp-assets/
37+
38+
# Dependencies
39+
node_modules/
40+
vendor/bin
41+
vendor/antecedent
42+
vendor/brain
43+
vendor/hamcrest
44+
vendor/mockery
45+
vendor/myclabs
46+
vendor/nikic
47+
vendor/phar-io
48+
vendor/phpcompatibility
49+
vendor/phpcsstandards
50+
vendor/phpstan
51+
vendor/phpunit
52+
vendor/sebastian
53+
vendor/sirbrillig
54+
vendor/slevomat
55+
vendor/squizlabs
56+
vendor/staabm
57+
vendor/szepeviktor
58+
vendor/theseer
59+
vendor/wpackagist-plugin
60+
vendor/yoast
61+
62+
# Package files
63+
package.json
64+
package-lock.json
65+
composer.json
66+
composer.lock
67+
blueprint.json
68+
69+
# Other
70+
*.log
71+
*.map
72+
*.zip
73+
.distignore
74+
.DS_Store
75+
Thumbs.db

CHANGELOG.md

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,66 @@
1-
## [1.0.3](https://github.com/rtCamp/carousel-system-interactivity-api/compare/v1.0.2...v1.0.3) (2026-02-24)
1+
## [1.0.4](https://github.com/rtCamp/carousel-kit/compare/v1.0.3...v1.0.4) (2026-03-09)
2+
3+
### Bug Fixes
4+
5+
* clean up .distignore by removing unnecessary files and directories ([353646b](https://github.com/rtCamp/carousel-kit/commit/353646bf85f1d986644fbf1d745688702f4a35e0))
6+
* correct release link in INSTALLATION.md and update node_modules exclusion in phpstan.neon.dist ([1eea8d8](https://github.com/rtCamp/carousel-kit/commit/1eea8d8c4b8ea49a526b871d738dbb91501ffd69))
7+
* CSS linting issues ([1149c55](https://github.com/rtCamp/carousel-kit/commit/1149c55b55056d0171eef66465f9c6e22b02dae4))
8+
* ensure direct access to Autoloader.php exits gracefully ([d33bf17](https://github.com/rtCamp/carousel-kit/commit/d33bf17e1caed94489850677743dcf659caa35de))
9+
* **examples:** swap misplaced editor images and remove hardcoded aspect ratio ([162b07e](https://github.com/rtCamp/carousel-kit/commit/162b07ee577ebe80236ec87172a523307fb4a3de))
10+
* ignore phpcs warning for including pattern file from a fixed directory ([02d49a7](https://github.com/rtCamp/carousel-kit/commit/02d49a7a1468f82670253e7b7c12b861ccc2edd5))
11+
* remove outdated screenshots description from readme ([7ffdd9a](https://github.com/rtCamp/carousel-kit/commit/7ffdd9a1c44d4747b37f25757a91c8dc70e79371))
12+
* **styles:** remove unnecessary grid-template-columns property ([818d69c](https://github.com/rtCamp/carousel-kit/commit/818d69c5537e8ab76ff40df0a255b1c5d182f934))
13+
* update @wordpress/scripts version to allow minor updates ([03ce762](https://github.com/rtCamp/carousel-kit/commit/03ce7623a1597ed8959f2f3f6fa8393e2c01065d))
14+
* update contributors list in plugin header and readme.txt ([295b2b3](https://github.com/rtCamp/carousel-kit/commit/295b2b3787df7c757d383333dbfe84f97a913590))
15+
* update dist target to exclude additional configuration and development files ([71381db](https://github.com/rtCamp/carousel-kit/commit/71381dbca6e7afa216020b69906d811013c0a5bc))
16+
* update file paths in phpcs and phpstan configuration ([4077c28](https://github.com/rtCamp/carousel-kit/commit/4077c28f7aea1ce5de64c18f8948fa943ca8317a))
17+
* update package dependencies for minimatch and serialize-javascript ([6a05ac9](https://github.com/rtCamp/carousel-kit/commit/6a05ac9ea01e17077197bfd09a8335aca627c3aa))
18+
* update package-lock.json to remove unused dependency and upgrade svgo and immutable versions ([c9e877d](https://github.com/rtCamp/carousel-kit/commit/c9e877d164acdffe37d9eb91b5f03bc3cd65b084))
19+
* update POT-Creation-Date and add missing autoloader error message ([3bdc9e0](https://github.com/rtCamp/carousel-kit/commit/3bdc9e06e8fbdbaffd17d8c50a9e6b57dbb44ea3))
20+
* update script paths in composer.json and improve constant definitions in tests ([9c73548](https://github.com/rtCamp/carousel-kit/commit/9c7354831f124705fe3fc8cd56a9c32e6da159bc))
21+
* update script paths in composer.json to use local binaries ([46f0f7a](https://github.com/rtCamp/carousel-kit/commit/46f0f7a2ed3d204a5a479cd6eaee7509a9546640))
22+
* update tested up to version in readme.txt from 6.9.1 to 6.9 ([6a23832](https://github.com/rtCamp/carousel-kit/commit/6a23832624a693ca4a8ef1fd4d7ed9e2ffe4f04d))
23+
* update WordPress minimum requirement to 6.6 in README, INSTALLATION, and readme.txt ([320a3ec](https://github.com/rtCamp/carousel-kit/commit/320a3ec09184f44d823219b3747e3d4c2dc60a1d))
24+
25+
### Features
26+
27+
* add localization support and update package.json for repository and bugs metadata ([2268cb8](https://github.com/rtCamp/carousel-kit/commit/2268cb830b65828c5164133b00af4432fbd7ac29))
28+
* add new screenshot image and remove outdated PNG file ([e1b9e23](https://github.com/rtCamp/carousel-kit/commit/e1b9e2345755ccf94ffd049b9da3c84cc5dac09a))
29+
* add placeholder logos and update hero carousel pattern ([bdd4b52](https://github.com/rtCamp/carousel-kit/commit/bdd4b525217de55385df163ed21095cd302bebbc))
30+
* add readme.txt with plugin details and installation instructions ([e8cdd4a](https://github.com/rtCamp/carousel-kit/commit/e8cdd4a8e77d324cc61068f9be19bd884564b382))
31+
* add screenshot for plugin preview in WordPress.org ([c3826fc](https://github.com/rtCamp/carousel-kit/commit/c3826fc212ad49201fefc0b9ff2106fc163d9232))
32+
* implement autoloader for PHP classes and refactor constant definitions ([a0a1b45](https://github.com/rtCamp/carousel-kit/commit/a0a1b45c8f2f481799c50c34b5bc4eeb13eb34d4))
33+
* update .distignore to exclude README.md and enhance carousel-kit.php for direct access protection ([e5ee596](https://github.com/rtCamp/carousel-kit/commit/e5ee596077a1f3a5d1311823d39db3aa1b2c734e))
34+
* update license and version in carousel-kit.php; add index.php for plugin structure ([4e5fe9f](https://github.com/rtCamp/carousel-kit/commit/4e5fe9f83ae717c14dcc0b21ddac72a81c8662c7))
35+
* update PHP requirement to 8.2 and reorder contributors in plugin header ([3a52e05](https://github.com/rtCamp/carousel-kit/commit/3a52e059d48a864e47c43b89ca006ad9eda0b6f3))
36+
* update README with minimum requirements and add uninstall functionality ([22cb27c](https://github.com/rtCamp/carousel-kit/commit/22cb27cab704d3531e61b2c7351899470fd973f5))
37+
* Updated pot file ([cd5e061](https://github.com/rtCamp/carousel-kit/commit/cd5e06180f91a6a74599dabb1418c14011c90d61))
38+
39+
40+
## [1.0.3](https://github.com/rtCamp/carousel-kit/compare/v1.0.2...v1.0.3) (2026-02-24)
241

342

443
### Bug Fixes
544

6-
* enable loop on editor ([fe4566a](https://github.com/rtCamp/carousel-system-interactivity-api/commit/fe4566afcf72e1e663c7eb481a7957d62c2d3365))
7-
* state corruption when clicking between slides ([637e4a5](https://github.com/rtCamp/carousel-system-interactivity-api/commit/637e4a507eb2c58576c4004d5460e8aa7295db9f))
45+
* enable loop on editor ([fe4566a](https://github.com/rtCamp/carousel-kit/commit/fe4566afcf72e1e663c7eb481a7957d62c2d3365))
46+
* state corruption when clicking between slides ([637e4a5](https://github.com/rtCamp/carousel-kit/commit/637e4a507eb2c58576c4004d5460e8aa7295db9f))
847

9-
## [1.0.2](https://github.com/rtCamp/carousel-system-interactivity-api/compare/v1.0.1...v1.0.2) (2026-02-23)
48+
## [1.0.2](https://github.com/rtCamp/carousel-kit/compare/v1.0.1...v1.0.2) (2026-02-23)
1049

1150

1251
### Bug Fixes
1352

14-
* **demo:** 4 slides per view ([e13817c](https://github.com/rtCamp/carousel-system-interactivity-api/commit/e13817c8e49e0e071580efbf95ff4c77d677e114))
15-
* replace PNG images with optimized WEBP format ([eb60082](https://github.com/rtCamp/carousel-system-interactivity-api/commit/eb6008251039ea700262c63db89a266072ee6c3f))
16-
* replace urls with webp alts ([000f894](https://github.com/rtCamp/carousel-system-interactivity-api/commit/000f894a9818bd8181977cb038231e0ea3d82386))
53+
* **demo:** 4 slides per view ([e13817c](https://github.com/rtCamp/carousel-kit/commit/e13817c8e49e0e071580efbf95ff4c77d677e114))
54+
* replace PNG images with optimized WEBP format ([eb60082](https://github.com/rtCamp/carousel-kit/commit/eb6008251039ea700262c63db89a266072ee6c3f))
55+
* replace urls with webp alts ([000f894](https://github.com/rtCamp/carousel-kit/commit/000f894a9818bd8181977cb038231e0ea3d82386))
1756

1857
### Features
1958

20-
* setup wizard styles ([0be0bf7](https://github.com/rtCamp/carousel-system-interactivity-api/commit/0be0bf7cde8c9035cca1086dce7dce005e0d39b2))
21-
* slide appender and setup ([a42331d](https://github.com/rtCamp/carousel-system-interactivity-api/commit/a42331d10b225379408ddf8c0649e83484496a1e))
59+
* setup wizard styles ([0be0bf7](https://github.com/rtCamp/carousel-kit/commit/0be0bf7cde8c9035cca1086dce7dce005e0d39b2))
60+
* slide appender and setup ([a42331d](https://github.com/rtCamp/carousel-kit/commit/a42331d10b225379408ddf8c0649e83484496a1e))
2261

2362

24-
# [1.0.1](https://github.com/rtCamp/carousel-system-interactivity-api/compare/1.0.0...1.0.1) (2026-02-16)
63+
# [1.0.1](https://github.com/rtCamp/carousel-kit/compare/v1.0.0...v1.0.1) (2026-02-16)
2564

2665
### Bug Fixes
2766

@@ -33,15 +72,12 @@
3372

3473
### Bug Fixes
3574

36-
* Gap issue fixed for the carousel items ([5277b89](https://github.com/rtCamp/carousel-system-interactivity-api/commit/5277b89545c973f13c22f6d1d7cf21e19958305f))
75+
* Gap issue fixed for the carousel items ([5277b89](https://github.com/rtCamp/carousel-kit/commit/5277b89545c973f13c22f6d1d7cf21e19958305f))
3776

3877

3978
### Features
4079

41-
* Add example carousels for hero, logo showcase, and testimonials ([d2b6e4a](https://github.com/rtCamp/carousel-system-interactivity-api/commit/d2b6e4ae0f915f6edfb6ddf637c4a88878375e4b))
42-
* Add slide to scroll option ([f2adab3](https://github.com/rtCamp/carousel-system-interactivity-api/commit/f2adab310015347400a1c2e6437b3a68566a6c9d))
43-
* Enhance vertical axis support and adjust slide dimensions in carousel styles ([2ec3e40](https://github.com/rtCamp/carousel-system-interactivity-api/commit/2ec3e40e8e34655d3417b25e16feaee41451c604))
44-
* Refactor context handling and define global window interface for carousel context ([5aab80e](https://github.com/rtCamp/carousel-system-interactivity-api/commit/5aab80edd103ee66d8e212359eb0f8d2ad01acb7))
45-
46-
47-
80+
* Add example carousels for hero, logo showcase, and testimonials ([d2b6e4a](https://github.com/rtCamp/carousel-kit/commit/d2b6e4ae0f915f6edfb6ddf637c4a88878375e4b))
81+
* Add slide to scroll option ([f2adab3](https://github.com/rtCamp/carousel-kit/commit/f2adab310015347400a1c2e6437b3a68566a6c9d))
82+
* Enhance vertical axis support and adjust slide dimensions in carousel styles ([2ec3e40](https://github.com/rtCamp/carousel-kit/commit/2ec3e40e8e34655d3417b25e16feaee41451c604))
83+
* Refactor context handling and define global window interface for carousel context ([5aab80e](https://github.com/rtCamp/carousel-kit/commit/5aab80edd103ee66d8e212359eb0f8d2ad01acb7))

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Configuration
22
PLUGIN_SLUG := carousel-kit
3-
PLUGIN_VERSION := 1.0.0
43
BUILD_DIR := build-dist
54
ZIP_NAME := $(PLUGIN_SLUG).zip
65

@@ -50,17 +49,23 @@ dist:
5049
--exclude='.*' \
5150
--exclude='node_modules' \
5251
--exclude='tests' \
52+
--exclude='wp-assets' \
5353
--exclude='phpunit.xml.dist' \
5454
--exclude='phpcs.xml.dist' \
55+
--exclude='phpstan.neon.dist' \
56+
--exclude='babel.config.js' \
57+
--exclude='commitlint.config.js' \
58+
--exclude='jest.config.js' \
5559
--exclude='webpack.config.js' \
5660
--exclude='package.json' \
5761
--exclude='package-lock.json' \
62+
--exclude='blueprint.json' \
5863
--exclude='tsconfig.json' \
5964
--exclude='composer.json' \
6065
--exclude='composer.lock' \
6166
--exclude='Makefile' \
62-
--exclude='README.md' \
6367
--exclude='CHANGELOG.md' \
68+
--exclude='DEVELOPMENT.md' \
6469
--exclude='src' \
6570
--exclude='$(BUILD_DIR)' \
6671
--exclude='*.zip' \

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Easily create dynamic, accessible, and customizable carousels for any content ty
2929

3030
| Requirement | Minimum | Recommended |
3131
| ----------- | ------------ | ----------- |
32-
| WordPress | 6.5+ | 6.6+ |
33-
| PHP | 7.4+ | 8.2+ |
32+
| WordPress | 6.6+ | 6.9+ |
33+
| PHP | 8.2+ | 8.2+ |
3434
| Gutenberg | Not required ||
3535

36-
> **Note:** The Interactivity API became stable in WordPress 6.5. This plugin works with WordPress core—no Gutenberg plugin required.
36+
> **Note:** This plugin works with WordPress core—no Gutenberg plugin required.
3737
3838
## Browser Support
3939

@@ -80,6 +80,10 @@ Yes. The carousel follows W3C accessibility guidelines with proper ARIA roles, l
8080

8181
Yes. Each carousel instance maintains its own independent state.
8282

83+
### What data is removed on uninstall?
84+
85+
On uninstall, Carousel Kit removes its cached pattern transient (`carousel_kit_patterns_cache`). It does not remove your posts or block content.
86+
8387
## Changelog
8488

8589
See [CHANGELOG.md](CHANGELOG.md) for full release history.
@@ -94,13 +98,16 @@ Have a feature request? [Open an issue](https://github.com/rtCamp/carousel-kit/i
9498

9599
## Contributors
96100

101+
- [rtCamp](https://github.com/rtCamp)
97102
- [Danish Shakeel](https://github.com/danish17)
98103
- [Masud Rana](https://github.com/theMasudRana)
99-
- [rtCamp](https://profiles.wordpress.org/rtcamp)
104+
- [Gagan Deep Singh](https://github.com/gagan0123)
105+
- [Utsav Patel](https://github.com/up1512001)
106+
- [Sagar Tamang](https://github.com/mi5t4n)
100107
- [Aviral Mittal](https://github.com/aviral-mittal)
101108
- [Vishal Kotak](https://github.com/vishal4669)
102-
- [Aishwarrya Pande](https://github.com/AishwarryaPande)
103109
- [Raj Patel](https://github.com/imrraaj)
110+
- [Aishwarrya Pande](https://github.com/AishwarryaPande)
104111

105112

106113
## License

carousel-kit.php

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,47 @@
33
* Plugin Name: Carousel Kit
44
* Description: Carousel block using Embla and WordPress Interactivity API.
55
* Plugin URI: https://github.com/rtCamp/carousel-kit
6-
* Requires at least: 6.5
7-
* Requires PHP: 7.4
6+
* Requires at least: 6.6
7+
* Requires PHP: 8.2
88
* Author: rtCamp
99
* Author URI: https://rtcamp.com
10-
* Contributors: iamdanih17, immasud
11-
* License: GPL2
10+
* Domain Path: /languages
11+
* License: GPL-2.0-or-later
1212
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
13-
* Version: 1.0.3
13+
* Version: 1.0.4
1414
* Text Domain: carousel-kit
1515
*
1616
* @package carousel-kit
1717
*/
1818

19-
define( 'CAROUSEL_KIT_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
20-
define( 'CAROUSEL_KIT_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
21-
define( 'CAROUSEL_KIT_BUILD_PATH', CAROUSEL_KIT_PATH . '/build' );
22-
define( 'CAROUSEL_KIT_BUILD_URL', CAROUSEL_KIT_URL . '/build' );
19+
namespace Carousel_Kit;
2320

24-
require_once CAROUSEL_KIT_PATH . '/vendor/autoload.php';
21+
if ( ! defined( 'ABSPATH' ) ) {
22+
exit; // Exit if accessed directly.
23+
}
24+
25+
/**
26+
* Define plugin constants.
27+
*/
28+
function constants(): void {
29+
define( 'CAROUSEL_KIT_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
30+
define( 'CAROUSEL_KIT_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
31+
define( 'CAROUSEL_KIT_BUILD_PATH', CAROUSEL_KIT_PATH . '/build' );
32+
define( 'CAROUSEL_KIT_BUILD_URL', CAROUSEL_KIT_URL . '/build' );
33+
}
34+
35+
constants();
36+
37+
require_once __DIR__ . '/inc/Autoloader.php';
38+
if ( ! Autoloader::autoload() ) {
39+
return;
40+
}
2541

2642
/**
2743
* Plugin loader.
2844
*/
29-
function carousel_kit_loader() {
30-
\Carousel_Kit\Plugin::get_instance();
45+
function carousel_kit_loader(): void {
46+
Plugin::get_instance();
3147
}
3248

3349
carousel_kit_loader();

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
}
3333
],
3434
"require": {
35-
"php": "^8.2",
36-
"scrivo/highlight.php": "^9.18"
35+
"php": "^8.2"
3736
},
3837
"require-dev": {
3938
"automattic/vipwpcs": "^3.0",
@@ -65,7 +64,7 @@
6564
"scripts": {
6665
"format": "phpcbf",
6766
"lint": "phpcs",
68-
"phpstan": "phpstan analyse --memory-limit=2G",
67+
"phpstan": "phpstan analyse --memory-limit=4G",
6968
"test": "phpunit",
7069
"test:unit": "phpunit --testsuite unit",
7170
"test:coverage": "phpunit --coverage-html tests/_output/coverage"

0 commit comments

Comments
 (0)