A WordPress plugin to create block themes https://wordpress.org/plugins/create-block-theme/
Find a file
2024-04-09 11:04:44 -04:00
.github/workflows remove reviewer addition (#544) 2024-04-09 11:04:44 -04:00
.husky Add commit hook 2023-02-01 10:58:44 +00:00
.wordpress-org Fix changelog creation script (#541) 2024-04-05 22:41:08 -03:00
admin Add theme json inspector (#520) 2024-04-05 13:02:14 -03:00
assets Refactor GitHub release workflows (#542) 2024-04-09 10:58:56 -04:00
bin Use CORE for Font Management (#518) 2024-03-22 06:48:47 -04:00
includes Add theme json inspector (#520) 2024-04-05 13:02:14 -03:00
src Add theme json inspector (#520) 2024-04-05 13:02:14 -03:00
test/unit Add quotes to font family names (#476) 2023-11-15 13:06:27 -03:00
tests Extracted any logic that may need to be tested from the api class (#522) 2024-03-27 09:41:01 -04:00
.browserslistrc Add browserlist config 2023-02-01 10:45:13 +00:00
.distignore Remove CODE_OF_CONDUCT.md from .distignore. (#515) 2024-02-20 09:17:43 -05:00
.editorconfig Add browserlist config 2023-02-01 10:45:13 +00:00
.eslintignore Add browserlist config 2023-02-01 10:45:13 +00:00
.eslintrc.json Try disabling no-undef rule specifically 2023-02-08 15:01:29 +00:00
.gitignore Add integration tests (#393) 2024-03-11 12:48:34 -04:00
.nvmrc Update required node and npm versions 2023-05-18 16:21:19 +01:00
.phpcs.xml.dist Add integration tests (#393) 2024-03-11 12:48:34 -04:00
.prettierignore Make prettier and stylelint ignore dirs consistent 2023-02-07 12:08:05 +00:00
.prettierrc.js Add prettier and stylelint config files 2023-02-01 10:39:16 +00:00
.stylelintignore Make prettier and stylelint ignore dirs consistent 2023-02-07 12:08:05 +00:00
.stylelintrc.json Add prettier and stylelint config files 2023-02-01 10:39:16 +00:00
.wp-env.json Add integration tests (#393) 2024-03-11 12:48:34 -04:00
babel.config.js Use npm:wp-prettier instead of prettier 2023-02-02 15:25:35 +00:00
composer.json Add integration tests (#393) 2024-03-11 12:48:34 -04:00
composer.lock Add integration tests (#393) 2024-03-11 12:48:34 -04:00
CONTRIBUTING.md Remove repo specific CoC. (#514) 2024-02-20 08:30:39 -05:00
create-block-theme.php Version bump & changelog update 2023-12-20 20:20:35 +00:00
index.php Results of lint:php:fix 2023-01-27 17:27:18 +00:00
LICENSE Initial commit 2021-10-29 13:39:09 +01:00
package-lock.json Add theme json inspector (#520) 2024-04-05 13:02:14 -03:00
package.json Add theme json inspector (#520) 2024-04-05 13:02:14 -03:00
phpcs.xml.dist Merge branch 'trunk' into add/handle-google-font-credits 2023-04-27 15:52:17 +01:00
phpunit.xml.dist Add integration tests (#393) 2024-03-11 12:48:34 -04:00
README.md Add markdown and package.json lint command (#504) 2024-01-08 08:37:43 +00:00
readme.txt Use CORE for Font Management (#518) 2024-03-22 06:48:47 -04:00
update-version-and-changelog.js Fix changelog creation script (#541) 2024-04-05 22:41:08 -03:00
webpack.config.js local fonts upload: refactor ui from php and vanilla js to react app 2023-03-10 10:23:22 +04:00

Create Block Theme

Welcome to Create Block Theme - a WordPress plugin to create block themes from within the Site Editor.

It works alongside features that are already available in the Site Editor to enhance the workflow for creating block themes. After being tested in this plugin, some of the features included here may be moved into the Site Editor itself.

Disclaimer: Create Block Theme enables development features and thus is a tool that should be treated like as such; you can think of it as a Development Mode for WordPress, and you should keep in mind that changes made through this plugin could change your site and/or theme permanently.

This plugin allows you to:

  • Export your existing theme with all customizations made in the Site Editor
  • Create a new theme, blank theme, child theme, or style variation from the Site Editor
  • Embed Google Fonts locally in your theme
  • Embed local font assets in your theme

Learn more about Create Block Theme:

User Support

If you have run into an issue, you should check the Support Forums first. The forums are a great place to get help. If you have a bug to report, please submit it to this repository as an issue. Please search prior to creating a new bug to confirm its not a duplicate.

Plugin Features

Theme Creation Options

There are six options the plugin provides to create a new theme:

1. Export

Export the activated theme including the user's changes.

2. Create a child theme

Creates a new child theme with the currently active theme as a parent.

3. Clone the active theme

Creates a new theme by cloning the activated theme. The resulting theme will have all of the assets of the activated theme combined with the user's changes.

4. Overwrite theme files

Saves the user's changes to the theme files and deletes the user's changes from the site.

5. Generate blank theme

Generate a boilerplate "empty" theme inside of the current site's themes directory.

6. Create a style variation

Saves user's changes as a style variation of the currently active theme.

Embed Google Fonts or local font files

This feature allows you to embed fonts into your active theme. You can embed Google Fonts and local font assets.

When you add a font the plugin will add to your theme:

  • The font files to your theme's file structure under this path ./assets/fonts.
  • The font face definitions to the theme.json file.

You can continue using your modified theme or you can export it as a new theme containing the new fonts.

How to Use the Plugin

Step 1: Setup

To use the latest release of the Create Block Theme plugin on your WordPress site: install from the plugins page in wp-admin, or download from the WordPress.org plugins repository.

In the WordPress Admin Dashboard, under Appearance there will be three new pages called:

  • Create Block Theme
  • Embed Google font in your active theme
  • Embed local font file assets

Step 2: Fonts, styles and templates customizations

Make changes to your site styles and templates using the Site Editor. You can also include new fonts using the plugin options.

Step 3: Save

Still in the WordPress dashboard, navigate to "Appearance" -> "Create Block Theme" section. Select one of the available options and then, if necessary, add the details for the theme here. These details will be used in the style.css file. Click the "Generate" button to save the theme.

How to Contribute

We welcome contributions in all forms, including code, design, documentation, and triage. Please see our Contributing Guidelines for more information.