Directory

Add Theme Export Class by jffng · Pull Request #57524 · WordPress/gutenberg · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Theme Export Class #57524

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from
Open

Add Theme Export Class #57524

wants to merge 3 commits into from

Conversation

jffng
Copy link
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
Copy link

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
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.

None yet

1 participant