From d7374671c85b98480f0124822ffc080275e4166b Mon Sep 17 00:00:00 2001 From: Ian Dunn Date: Fri, 27 Aug 2021 12:05:20 -0700 Subject: [PATCH] clean up --- composer.json | 11 +++--- .../blocks/global-header-footer/README.md | 29 ++++---------- .../blocks/global-header-footer/blocks.php | 39 +++++++------------ 3 files changed, 28 insertions(+), 51 deletions(-) diff --git a/composer.json b/composer.json index 468ed12db..6e3bd6eb6 100644 --- a/composer.json +++ b/composer.json @@ -2,11 +2,12 @@ "name": "wporg/wporg-mu-plugins", "description": "`mu-plugins` for the WordPress.org network", "license": "GPL-2.0-or-later", - "extra" : { - "sync-svn" : { - "main-branch" : "trunk", - "paths" : { - "mu-plugins/" : "https://dotorg.svn.wordpress.org/wordpress/website/wp-content/mu-plugins/git-sync/ -- todo: name this better, but probably want a subfolder in mu-plugins/ so can cleanly sync" + "require": {}, + "extra": { + "sync-svn": { + "main-branch": "trunk", + "paths": { + "mu-plugins/": "https://dotorg.svn.wordpress.org/wordpress/website/wp-content/mu-plugins/git-sync/ -- todo: name this better, but probably want a subfolder in mu-plugins/ so can cleanly sync" } } } diff --git a/mu-plugins/blocks/global-header-footer/README.md b/mu-plugins/blocks/global-header-footer/README.md index 55901052f..87d5e4df2 100644 --- a/mu-plugins/blocks/global-header-footer/README.md +++ b/mu-plugins/blocks/global-header-footer/README.md @@ -2,31 +2,18 @@ ## Setup - - - ## Register as a block (for Full Site Editing themes) -Add as a composer dependency, install, then add this to a theme's `functions.php`: - -```php -require_once WPORG_GIT_MUPLUGINS_DIR . '/mu-plugins/blocks/global-header-footer/blocks.php'; -``` - +1. Add entries to the `repositories` and `require-dev` sections of `composer.json` +1. Run `composer update` to install it +1. `require_once .../global-header-footer/blocks.php` file. See `wporg-news-2021` as an example. ## Include directly in PHP (for classic themes) -Add as a composer dependency, install, then +The same as above, but include `universal-header.php` directly. See `{ todo }` as an example. -```php -require_once WPORG_GIT_MUPLUGINS_DIR . '/mu-plugins/blocks/global-header-footer/universal-header.php'; -``` +## Embed as an iframe (for non-WP software like Trac, Codex, etc) -todo path should be "blocks", or more generic like "components", "template-parts", ? - - -## Embed as an iframe (for Trac, Codex, etc) - -