[Refactor]: Rename plugin name from Carousel Kit to rtCarousel#101
[Refactor]: Rename plugin name from Carousel Kit to rtCarousel#101theMasudRana wants to merge 12 commits intodevelopfrom
Conversation
- Updated context variable names in editor context and types. - Changed CSS class names in SCSS files to reflect new naming convention. - Modified block registration and attributes in block.json files for carousel and slide blocks. - Adjusted save and edit components to use new class names and context. - Updated test cases and bootstrap files to align with the new naming. - Ensured all references to "carousel-kit" are replaced with "rt-carousel" across the codebase.
There was a problem hiding this comment.
Pull request overview
Refactors the WordPress plugin to rename/rebrand Carousel Kit to rtCarousel (slug/textdomain rt-carousel), updating PHP namespaces/constants, block names, CSS classnames/variables, documentation, and tooling configs to match the new identity.
Changes:
- Renamed block namespaces/categories/textdomains from
carousel-kit/*tort-carousel/*across block sources, patterns, and tests. - Updated PHP namespace/autoloading/constants from
Carousel_Kit/CAROUSEL_KIT_*toRt_Carousel/RT_CAROUSEL_*, and introduced an activation-time migration. - Updated docs and build/CI/tooling assets (Composer/NPM configs, PHPCS/PHPStan/PHPUnit/Jest, release ZIP naming, Playground blueprint).
Reviewed changes
Copilot reviewed 61 out of 66 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| uninstall.php | Updates uninstall cleanup to new namespace/transient/option names. |
| tests/phpstan/constants.php | Renames PHPStan test constants to RT_CAROUSEL_*. |
| tests/php/Unit/UnitTestCase.php | Updates unit test base namespace/package naming. |
| tests/php/Unit/Traits/SingletonTest.php | Updates Singleton hook name + namespaces used by unit tests. |
| tests/php/Unit/PluginTest.php | Updates assertions for new category slug/title + transient key + block slugs. |
| tests/php/bootstrap.php | Updates PHPUnit bootstrap namespace + constants to RT_CAROUSEL_*. |
| tests/js/setup.ts | Updates Jest setup header comments to rtCarousel naming. |
| src/types.d.ts | Renames global editor context handle to __RT_CAROUSEL_CONTEXT__. |
| src/blocks/carousel/viewport/edit.tsx | Renames inserted/allowed block names + UI strings/textdomain + empty-state class. |
| src/blocks/carousel/viewport/block.json | Renames viewport block name/category/parent/textdomain. |
| src/blocks/carousel/view.ts | Renames interactivity store namespace, Symbol key, wrapper selector, issue link. |
| src/blocks/carousel/types.ts | Updates inline issue link to new repo URL. |
| src/blocks/carousel/styles/_variants.scss | Renames wrapper selector and slide-width CSS var. |
| src/blocks/carousel/styles/_core.scss | Renames wrapper selector + core CSS variables (gap/height/slide-width). |
| src/blocks/carousel/slide/save.tsx | Renames interactivity namespace in saved markup. |
| src/blocks/carousel/slide/edit.tsx | Renames context key used for allowed blocks. |
| src/blocks/carousel/slide/block.json | Renames slide block name/category/parent/textdomain/usesContext. |
| src/blocks/carousel/save.tsx | Renames wrapper class, interactivity namespace, CSS variables, i18n domain. |
| src/blocks/carousel/index.ts | Renames style labels’ textdomain. |
| src/blocks/carousel/editor.scss | Renames editor-only classnames/wrapper selectors. |
| src/blocks/carousel/editor-context.ts | Renames the shared editor React context global key. |
| src/blocks/carousel/edit.tsx | Renames inner block names, classnames, CSS vars, and all i18n textdomains. |
| src/blocks/carousel/dots/style.scss | Renames dots classes and CSS variables. |
| src/blocks/carousel/dots/save.tsx | Renames dots wrapper + dot classnames in saved markup. |
| src/blocks/carousel/dots/edit.tsx | Renames Symbol key, wrapper selector, classes, and i18n domain. |
| src/blocks/carousel/dots/block.json | Renames dots block name/category/ancestor/textdomain. |
| src/blocks/carousel/controls/style.scss | Renames controls classes and CSS variables + selectors. |
| src/blocks/carousel/controls/save.tsx | Renames controls wrapper/button classes + i18n domain. |
| src/blocks/carousel/controls/edit.tsx | Renames wrapper selector/classes + i18n domain. |
| src/blocks/carousel/controls/components/icons.tsx | Renames icon classnames. |
| src/blocks/carousel/controls/block.json | Renames controls block name/category/ancestor/textdomain. |
| src/blocks/carousel/block.json | Renames carousel block name/category/textdomain/providesContext key. |
| src/blocks/carousel/tests/view.test.ts | Updates interactivity namespace/Symbol/wrapper selector; adjusts test context initialization. |
| rt-carousel.php | Adds new plugin entrypoint file with constants + autoloader + activation migration + loader. |
| readme.txt | Updates plugin display name, repo links, install folder name, changelog link. |
| README.md | Updates project name, badges/links, uninstall description, demo and issue URLs. |
| phpunit.xml.dist | Updates coverage include from carousel-kit.php to rt-carousel.php. |
| phpstan.neon.dist | Updates scanned paths from carousel-kit.php to rt-carousel.php. |
| phpcs.xml.dist | Updates ruleset name, scanned file, and allowed textdomain. |
| package.json | Renames package, repo/bugs URLs, and POT generation script output/domain. |
| package-lock.json | Updates lockfile package name to rt-carousel. |
| Makefile | Updates build ZIP slug to rt-carousel. |
| languages/rt-carousel.pot | Renames text domain, plugin metadata strings, and file references. |
| jest.config.js | Updates Jest config displayName and header comment. |
| index.php | Updates @package tag to rt-carousel naming. |
| inc/Traits/Singleton.php | Renames PHP namespace and init hook prefix. |
| inc/Plugin.php | Renames PHP namespace, constants, block category/pattern category slugs/labels, cache key. |
| inc/Autoloader.php | Renames PHP namespace, constants used for autoload path/flag, and i18n strings. |
| examples/patterns/testimonial-carousel.php | Updates pattern headers + block markup to new block names/classes/vars. |
| examples/patterns/query-loop.php | Updates pattern headers + block markup to new block names/classes/vars. |
| examples/patterns/logo-showcase.php | Updates pattern headers, image URL constant, and block markup. |
| examples/patterns/hero-carousel.php | Updates pattern headers, image URL constant, and block markup. |
| docs/USAGE.md | Updates documented block names and examples to rt-carousel/*. |
| docs/THEMING.md | Updates documented CSS variable names and block selector examples. |
| docs/INSTALLATION.md | Updates release ZIP name, repo URL, and Composer package name. |
| docs/CONTRIBUTING.md | Updates project name and produced ZIP name. |
| docs/API.md | Updates interactivity namespace and documented wrapper/Symbol key names. |
| DEVELOPMENT.md | Updates PSR-4 namespace mention for PHP code. |
| composer.json | Renames Composer package name and PSR-4 namespaces for prod/dev autoloading. |
| carousel-kit.php | Removes old plugin entrypoint file. |
| blueprint.json | Updates plugin download URL, WXR import URL, and demo blog title string. |
| .gitignore | Renames ignored ZIP artifact to rt-carousel.zip. |
| .github/workflows/release.yml | Updates release workflow to upload rt-carousel.zip. |
| .github/ISSUE_TEMPLATE/config.yml | Updates security policy link to new repo. |
| .github/ISSUE_TEMPLATE/bug_report.yml | Updates contributing guidelines link to new repo. |
Comments suppressed due to low confidence (1)
languages/rt-carousel.pot:6
- The POT header still says
Project-Id-Version: rtCarousel 1.0.3, but the plugin version inrt-carousel.php/package.jsonis1.0.4. Please regenerate or update the POT header so it matches the current release version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 66 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
languages/rt-carousel.pot:6
- The .pot header still says
Project-Id-Version: rtCarousel 1.0.3while the plugin version inrt-carousel.phpis1.0.4. Regenerate or update the POT header so translation tooling reflects the correct version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 66 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
languages/rt-carousel.pot:6
- The POT header still says
Project-Id-Version: rtCarousel 1.0.3, but the plugin header/version in this PR is1.0.4. Regenerate the POT (or update the header) so translation tooling reflects the correct current version.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@theMasudRana I don't know why, but I think we do the migration in stages. The first stage will probably to start with which doesn't break things like renaming classes and CSS. Then other breaking changes. |
|
Hi @mi5t4n, We have previously migrated all at once three times (Interactive Carousel → Core Carousel → Carousel Kit). Thank you. cc: @danish17 |
|
@theMasudRana Since the plugin is public, we have announced this on our blog as well. We also don't have information on how many users are using this plugin. So, the best approach IMO is to do the following:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 66 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…le-site and network-wide activations
…ges and flush post caches
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 66 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hello @mi5t4n, Your suggestion is well thought out, and we can certainly consider that approach. Since the plugin is still quite new, a drop-in replacement with proper testing might also work well for now. In the current implementation, when the new plugin ZIP is uploaded and rtCarousel is activated, the old version is automatically deactivated, and the migration runs in the background. No user interaction is required, and everything continues to work as before. Could you please take a look at the video and let me know if this approach feels smooth enough for now? @danish17 — It would be great if you could also review the video and share your thoughts. https://drive.google.com/file/d/1k2EDPbaMR_kbxoZ7lHQBaZDRpxpnqEXt/view?usp=drive_link Thanks cc: @vishal4669 |
…dSlideBlocks attribute
milindmore22
left a comment
There was a problem hiding this comment.
LGTM, I guess we will bump version when we are releasing it.
| if ( 0 === $result ) { | ||
| break; | ||
| } |
There was a problem hiding this comment.
We should consider logging it to indicate why it failed.
| if ( 0 === $result ) { | |
| break; | |
| } | |
| if ( 0 === $result ) { | |
| error_log( 'rt_carousel migration: LIKE matched posts but REPLACE changed nothing — possible collation mismatch.' ); | |
| break; | |
| } |
| $result = $wpdb->query( | ||
| $wpdb->prepare( | ||
| "UPDATE {$wpdb->posts} | ||
| SET post_content = REPLACE( | ||
| REPLACE( post_content, 'carousel-kit', 'rt-carousel' ), | ||
| 'Carousel Kit', | ||
| 'rtCarousel' | ||
| ) | ||
| WHERE ID IN ({$placeholders})", | ||
| ...$ids | ||
| ) | ||
| ); |
There was a problem hiding this comment.
The LIKE clause will match case variations like Carousel-Kit or CAROUSEL-KIT that the nested REPLACE doesn't handle. When this happens, the post enters the UPDATE but nothing changes, $result hits 0, the loop breaks, and the migration is marked complete — leaving that content unmigrated silently.
Either add REPLACE calls for every casing LIKE can match, or tighten the LIKE patterns to only the exact strings REPLACE handles so unmatched posts never enter the UPDATE.

Summary
Describe the change and why it is needed.
Type of change
Related issue(s)
Closes #
Relates to # (if applicable)
What changed
Breaking changes
Does this introduce a breaking change? If yes, describe the impact and migration path below.
Testing
Describe how this was tested.
Test details:
Screenshots / recordings
If applicable, add screenshots or short recordings.
Checklist