Skip to content

Rebuild default starter content with core blocks (#3093)#4511

Merged
ineagu merged 15 commits into
developmentfrom
codex/pro-3093-folio-starter
Jun 12, 2026
Merged

Rebuild default starter content with core blocks (#3093)#4511
ineagu merged 15 commits into
developmentfrom
codex/pro-3093-folio-starter

Conversation

@ineagu

@ineagu ineagu commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Replaces the theme's default starter content with a new core-block demo and refreshes the screenshot, per Codeinwp/neve-pro-addon#3093. Six pages — Home, About, Services, Work, Blog, Contact — built with core Gutenberg blocks only. The old portofolio / project-details pages are removed.

What's in here

  • Pages (inc/compatibility/starter-content/*.php): full-bleed sections (hero, services, work grid, dark stats band, testimonials, FAQ via core details, CTAs), each a constrained wp:group that centers its own content.
  • Centering fix: starter pages set neve_meta_container = full-width (in starter_meta + register_listener). neve_meta_content_width=100 alone left the container contained at 1170px, so full-width sections broke out but inner content was left-aligned. Blog/posts stays contained.
  • Polish layer: scoped core Additional CSS (custom-css.php, all under .folio-*) applied on home import via Starter_Content::apply_starter_custom_css()wp_update_custom_css_post(). No plugin dependency.
  • Customizer (theme-mods.php): Blueprint palette, Bricolage Grotesque / Nunito Sans, header builder with a Get Started button, footer copyright + menu.
  • Screenshot: 1200×900 (4:3), captured with the starter-sites screenshot spec (hidden chrome, high-res → LANCZOS downscale).

Design notes / decisions

  • Icons use core/html with inline SVG — core has no icon block. They're a core block and survive normal admin imports; everything else (groups, columns, headings, paragraphs, buttons, images, covers, lists, details) is structured blocks.
  • Contact form: core has no form block, so the contact page uses a block-native "Email us" card (mailto) instead of a raw <form>.
  • Translations: page copy lives in heredocs, so it adds zero translatable strings. The two new demo titles (Services/Work) are plain strings (Added: 0). The translation diff only shows the two removed legacy titles (Portofolio/Project Details) — inherent to renaming the demo pages; needs a maintainer ack.

Will affect visual aspect of the product

YES

Screenshots

The theme screenshot is updated in this PR (screenshot.png).

Test instructions

  • On a fresh install, activate Neve and import the starter content (Customizer). Confirm the 6 pages import, the homepage is centered/full-width, header shows the Get Started button, footer shows the copyright + menu.
  • Open each imported page in the block editor — no block-recovery warnings (validated headless: 0 invalid blocks on all pages).
  • Check no horizontal overflow at 390 / 768 / 1280px.

Check before Pull Request is ready:

Closes https://github.com/Codeinwp/neve-pro-addon/issues/3093

🤖 Generated with Claude Code

Replace the default starter content with a core-block demo (home, about,
services, work, blog, contact) matching the new design, plus refreshed
screenshot. Old portfolio/project-details pages removed.

- Core Gutenberg blocks only; inline-SVG icons delivered via core/html
- Full-bleed sections center via a constrained contentSize; starter pages
  set neve_meta_container=full-width to fix the off-center full-width layout
  (content_width alone left the container contained at 1170px)
- Scoped core Additional CSS polish layer (.folio-*) applied on home import
  via Starter_Content::apply_starter_custom_css()
- Customizer config: Blueprint palette, Bricolage Grotesque / Nunito Sans,
  header with Get Started button, footer copyright + menu
- wp.org-friendly copy (no subjective/promotional or rating claims)

Closes Codeinwp/neve-pro-addon#3093

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pirate-bot

pirate-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Plugin build for 24baa03 is ready 🛎️!

@pirate-bot

pirate-bot commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

🌍 i18n String Review Report

📊 Summary

Category Count
➕ Added 2
➖ Removed 2
🔄 Changed 0
Total 4
➕ Added Strings (2) - Click to expand
String Location Words Suggested Match
Services neve/inc/compatibility/star... 1 No close match
Work neve/inc/compatibility/star... 1 No close match
Total 2
➖ Removed Strings (2) - Click to expand
String Location
Portofolio neve/inc/compatibility/star...
Project Details neve/inc/compatibility/star...

ineagu and others added 4 commits June 9, 2026 18:06
- Add ': void' to Starter_Content::apply_starter_custom_css() (PHPStan)
- Regenerate screenshot.png at 1200x900 (4:3) from the rendered starter
  content to satisfy Theme Check's required aspect ratio

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Recapture the homepage with the starter-sites-manager method (viewport
2640x1980 @2x, hide .dde-palette-switcher/#scroll-to-top/#wpadminbar,
LANCZOS downscale) for a crisp, zoomed-out overview, output at 1200x900
(4:3) to satisfy Theme Check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…shot

- Replace ': void' return type with a @return void docblock (PHP 7.0 target;
  PHPCompatibility flagged voidFound)
- Make the renamed demo page titles "Services"/"Work" plain strings instead
  of _x() so the rebuild adds zero new translatable strings (only removes the
  old Portofolio/Project Details titles)
- Recapture screenshot at a lower zoom (1800x1350 -> 1200x900) so the hero
  reads more prominently

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Core has no form block, so the contact form was a core/html <form>. Replace
it with proper blocks — heading, paragraph, a prominent mailto link, and an
"Email Us" button — removing raw HTML from the page (icons stay as core/html
since core has no icon block).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pirate-bot pirate-bot added the pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) label Jun 9, 2026
ineagu and others added 8 commits June 9, 2026 19:56
Recapture from the real imported homepage at a slightly wider frame so the
hero plus the "What we do" cards read in the overview.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code-review follow-ups:
- home.php: hero covers 2 & 3 declared dimRatio 25 but carried
  has-background-dim-30 (copied from cover 1) — align attr to the class
  (uniform 30) so the saved markup matches the block's regenerated output.
- apply_starter_custom_css(): append the Folio layer to any existing
  Additional CSS instead of wp_update_custom_css_post() overwriting it, and
  make it idempotent (skip if already present) so a user's own CSS is never
  clobbered and a preview-then-cancel does not duplicate it.
- register_listener(): read _customize_draft_post_name once into $draft_slug
  instead of three separate get_post_meta() calls.
- starter_meta(): detect the blog page via the draft slug (Customizer drafts
  have no post_name yet) so blog is excluded from full-width in preview too.
- Remove the orphaned featured-image-logo attachment (logo-agency.png) now
  that custom_logo is 0 and nothing references it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- starter_meta(): handled-keys table with an early bail; the previous
  draft-slug read could recurse through default_post_metadata for pages
  without the draft meta (e.g. Sample Page) and fatal the preview.
- Allow the starter pages' inline SVG icons through KSES on fresh sites so
  users without unfiltered_html (multisite admins) don't get them stripped
  on import (verified: editor saves keep 12/12 SVGs; 0/12 without it).
- Enable pretty permalinks on import when the server supports rewrites
  (mirrors the core installer); the starter pages cross-link via path URLs
  which 404 under plain permalinks. Lazy rule flush via the rewrite_rules
  option (flush_rewrite_rules is plugin territory per WPThemeReview).
- Register starter-content theme support only while fresh_site is set: core
  never consumes it elsewhere, so non-fresh sites skip building the ~150KB
  definition (6 page files + theme mods) on every request.
- Remove 27 legacy starter images (~3.5MB, incl. the 1.4MB person-hero-2.png
  Theme Check flags) that lost their last reference when the old starter
  pages were replaced; verified zero references in tree and on base outside
  the deleted starter files.

Verified end-to-end on a live fresh-site Customizer import: 6 pages, full-
width container meta, user CSS preserved + Folio CSS appended once,
permalinks set to /%postname%/, all cross-page CTAs resolve HTTP 200,
0 invalid blocks on all pages, PHPCS/PHPStan clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adversarial audit follow-ups on the import flow:

- Core stages the starter auto-drafts the moment customize.php opens on a
  fresh site (after_setup_theme:100), and at changeset publish the stubs
  transition with $update=true — so the wp_insert_post listener fires at
  PREVIEW time. Move the site-wide side effects (custom CSS append, pretty
  permalinks) to customize_save_after, gated on the home page actually being
  published: opening and abandoning the Customizer no longer mutates state.
- Scope both the wp_insert_post listener and the preview default-meta filter
  to the known starter slugs: pages a user creates inside the Customizer
  carry the same _customize_draft_post_name meta and were inheriting the
  full-width/no-title metas.
- Register the SVG KSES allowance unconditionally (static, merge-safe with
  other plugins' entries): the imported pages keep inline icons for the life
  of the site, so a later edit by a user without unfiltered_html must not
  strip them and invalidate the blocks.
- Verify pretty permalinks after switching, like the core installer: probe a
  starter page URL and revert on a definitive 4xx (e.g. Apache without
  .htaccess); loopback errors are inconclusive and keep the structure.

Verified on live WP: opening+abandoning the Customizer leaves CSS and
permalinks untouched; publishing applies CSS append (user CSS preserved),
sets /%postname%/ (CTAs 200), full-width metas on starter pages only, blog
excluded; editor saves by a non-unfiltered_html user keep 12/12 SVGs with
fresh_site=0; user-created Customizer pages get no starter metas; all six
pages 0 invalid blocks; PHPCS and PHPStan clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The wordpress.org Live Preview for classic themes embeds wp-themes.com,
which serves get_theme_starter_content() VIRTUALLY (filters only — no
import, no Customizer publish; meta source: wp-themes.com mu-plugins/pub/
starter-content.php). Two consequences:

- starter_meta(): their virtual posts carry no postmeta, only post_name, so
  the draft-meta-only scoping left the preview pages contained/left-shifted.
  Fall back to post_name, still restricted to the starter slugs.
- The polish CSS never applies there (customize_save_after never fires).
  Inline it via wp_add_inline_style('neve-style') while the class is active
  (fresh sites + the preview, which filters fresh_site to true) — also gives
  the real fresh-site Customizer preview publish-parity styling.

Verified by running the actual wp-themes.com mu-plugin in a local WP with no
imported content: homepage and subpages render identical to the published
site (fanned hero, full-width centered sections, styled avatars, menus,
header button, footer), with their pre_option_fresh_site filter proven
active. Our front_end.php fresh_site gating is compatible (they force it
true for exactly this reason).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… msgids

Instead of plain strings, restore _x( 'Services'|'Work', 'Theme starter
content', 'neve' ): both msgid+msgctxt pairs already exist in the shipped
POT (the previous starter content used "Work" for the portfolio nav item and
"Services" in project-details), so the regenerated POT entries are identical
to base — zero new strings, and existing translations on translate.w.org are
reused as-is.

Verified with wp i18n make-pot on the head tree: the Services/Work entries
match the base entries exactly (only source-line references differ).

Also verified the full import on WordPress 6.9 (separate wp-env): all six
pages report 0 invalid blocks in the 6.9 editor, frontend renders identical
to 7.0 with no overflow, CSS + full-width metas apply, and the permalink
probe behaves correctly both ways (reverts to plain without .htaccess,
keeps /%postname%/ with it — all cross-page CTAs 200).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add a logo mark (blue rounded tile with the fanned-cards motif echoing the
  hero, 384px PNG, 8.5KB) wired the standard way: starter-content attachment
  + custom_logo => {{default-logo}}; Neve's logoTitle display renders
  mark + site title.
- Rename the sample brand Folio -> Default everywhere user-visible: blogname,
  footer copyright, the three testimonials, and the contact email (now the
  reserved hello@example.com). Internal .folio-* CSS class names stay.
- Fix outline buttons rendering with the default dark background on WP 6.9:
  core's transparent-background outline rule loses the cascade there (both
  rules are zero-specificity :where()). Tag the starter outline buttons with
  folio-btn-outline and set the background in the polish layer.
- Recapture screenshot.png (1200x900, 4:3) with the new branding.

Verified: real Customizer import on WP 6.9 uploads the logo and sets
custom_logo (renders mark + "Default" in the header); the wp.org preview
simulation maps the logo through wp-themes.com's virtual attachment filter;
outline buttons transparent on both 6.9 and 7.0; changed pages still report
0 invalid blocks; PHPCS clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Set the brand mark as the site icon (favicon): 512px default-icon.png
  attachment + options site_icon => {{default-icon}} (core resolves
  attachment symbols in starter-content options). Improves the perceived
  polish in every preview — browser tab shows the mark on real imports and
  on the wp.org theme preview (wp-themes.com maps the attachment to the
  theme file).
- Commit the SVG master (default-logo.svg, ~400B) so the mark stays editable;
  the uploaded assets remain PNG because WordPress blocks SVG uploads at the
  media layer, and at 32px display the 384px PNG is visually identical.

Verified on the WP 6.9 real import (site_icon option set, icon links render
with resized uploads, HTTP 200) and on the wp-themes.com simulation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ineagu

ineagu commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@rodica-andronache can you help testing this?

@ineagu ineagu requested a review from abaicus June 10, 2026 13:48
@rodica-andronache

Copy link
Copy Markdown
Contributor

On the frontend, the only issue I saw was in the "What our clients say" from the homepage, where the icon/name/position doesn't seem to align well
image

But in the editor, there are a few differences between how the pages look, compared to the frontend.
These are just a few examples of elements with alignment issues:

image image image

ineagu and others added 2 commits June 12, 2026 14:50
Front end: testimonial author name/role paragraphs kept their default
margins (classic themes put nested blockGap on the inner-container),
inflating the stack and pushing the name above the avatar - reset them.

Editor: core never loads Additional CSS in the block editor, so the
starter polish layer was missing there entirely. Mirror it via
block_editor_settings_all (gated on fresh_site or the folio marker in
the published custom CSS); the same styles also flow into core/html
sandbox previews. Size the inline-SVG html block wrappers in preview
mode (:has(.components-sandbox)) so the sandbox iframes stop stretching
flex rows, and pin row items left against the canvas default block
auto-margins. Check rows (services) and contact chips get folio-check/
folio-chip classes so the editor rules can target them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ineagu ineagu merged commit 618b43e into development Jun 12, 2026
11 of 13 checks passed
@ineagu ineagu deleted the codex/pro-3093-folio-starter branch June 12, 2026 13:17
@pirate-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 4.2.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-checklist-incomplete The Pull Request checklist is incomplete. (automatic label) released Indicate that an issue has been resolved and released in a particular version of the product.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants