Skip to content

Add Theme Export Class#57524

Open
jffng wants to merge 3 commits intotrunkfrom
add/theme-export-class
Open

Add Theme Export Class#57524
jffng wants to merge 3 commits intotrunkfrom
add/theme-export-class

Conversation

@jffng
Copy link
Copy Markdown
Contributor

@jffng jffng commented Jan 3, 2024

What?

This PR moves the existing functionality for generating the theme export file to its own dedicated class.

Why?

We want to extend the existing theme export functionality to include things like fonts, and eventually more closely mirror what Create Block Theme offers in terms of theme exporting features. Currently the functionality is all encapsulated in a utility function, which is not the most friendly to extend.

How?

Adds a new class, and modifies the edit site REST controller to use it.

Testing Instructions

  1. Go to the site editor settings panel
  2. Select Tools > Export
  3. Ensure the theme is exported as expected (no change to functionality)

Screenshot 2024-01-03 at 12 57 49 PM

Testing Instructions for Keyboard

Screenshots or screencast

@jffng jffng added [Type] Enhancement A suggestion for improvement. [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Jan 3, 2024
@jffng jffng requested a review from spacedmonkey as a code owner January 3, 2024 18:01
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 3, 2024

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.5/class-gutenberg-rest-edit-site-export-controller-6-5.php
❔ lib/experimental/theme-export/class-wp-theme-export.php
❔ lib/compat/wordpress-6.5/rest-api.php
❔ lib/load.php

@jffng
Copy link
Copy Markdown
Contributor Author

jffng commented Jan 5, 2024

This is related to #54226.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Feature] Themes Questions or issues with incorporating or styling blocks in a theme. [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant