Add "Try with demo data" onboarding button to admin dashboard#9
Open
datengraben wants to merge 1 commit into
Open
Add "Try with demo data" onboarding button to admin dashboard#9datengraben wants to merge 1 commit into
datengraben wants to merge 1 commit into
Conversation
Adds a DemoData service that creates a demo location, item, bookable timeframe, 3 confirmed bookings (2 past + 1 future), and a private page with [cb_bookings] shortcode in one click. The banner button appears on the dashboard only when no CB custom post type data exists and the install is within the 7-day onboarding window; it disappears permanently once demo data is created or the window closes. - src/Service/DemoData.php — new service (create, shouldShowButton, AJAX handler) - tests/php/Service/DemoDataTest.php — 15 red/green PHPUnit tests - src/Plugin.php — record install date on activation + admin_init fallback - includes/Public.php — register wp_ajax_cb_create_demo_data - includes/Admin.php — wp_localize_script + inline JS for button - templates/dashboard-index.php — conditional demo-data banner https://claude.ai/code/session_01QvGeLKxbtPAEZm4SbdkwNm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a DemoData service that creates a demo location, item, bookable
timeframe, 3 confirmed bookings (2 past + 1 future), and a private
page with [cb_bookings] shortcode in one click.
The banner button appears on the dashboard only when no CB custom post
type data exists and the install is within the 7-day onboarding window;
it disappears permanently once demo data is created or the window closes.
https://claude.ai/code/session_01QvGeLKxbtPAEZm4SbdkwNm