Skip to content

Commit

Permalink
Remove CI pipeline and unnecessary PHP files, add wp-404-caching pl…
Browse files Browse the repository at this point in the history
…ugin

The commit removes defunct CI pipeline configuration and obsolete PHP class files. This helps to clean up the project layout. Moreover, the `wp-404-caching` WordPress plugin and the associated PHP class has been added, as well as a configuration file to tweak the plugin as per requirements.
  • Loading branch information
attackant committed Mar 8, 2024
1 parent 9259049 commit ea8857a
Show file tree
Hide file tree
Showing 28 changed files with 100 additions and 1,186 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/merge-develop-to-scaffold.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ jobs:
wordpress: ["latest"]
uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main
with:
database: ''
php: ${{ matrix.php }}
wordpress: ${{ matrix.wordpress }}
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-wordpress-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ jobs:
- uses: actions/checkout@v4
- uses: alleyinteractive/[email protected]
with:
plugin-file: 'plugin.php'
plugin-file: 'wp-404-caching.php'
upgrade-npm-dependencies: "true"
8 changes: 4 additions & 4 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="create-wordpress-plugin" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>PHP_CodeSniffer standard for create-wordpress-plugin.</description>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="wp-404-caching" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>PHP_CodeSniffer standard for wp-404-caching.</description>

<!-- Include Alley Rules -->
<rule ref="Alley-Interactive" />
Expand Down Expand Up @@ -36,8 +36,8 @@
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="vendor_name" />
<element value="create_wordpress_plugin" />
<element value="alleyinteractive" />
<element value="wp_404_caching" />
</property>
</properties>
</rule>
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to `Create WordPress Plugin` will be documented in this file.
All notable changes to `WP 404 Caching` will be documented in this file.

## 0.1.0 - 202X-XX-XX

Expand Down
4 changes: 0 additions & 4 deletions Makefile

This file was deleted.

51 changes: 11 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,8 @@
<!--delete-->
# Create WordPress Plugin
# WP 404 Caching

This is a skeleton WordPress plugin that can scaffold a WordPress plugin. This
template includes a base plugin file, autoloaded PHP files, unit tests powered
by [Mantle](https://mantle.alley.com/), front-end assets compiled via Webpack,
and Continuous Integration [via GitHub Actions](.github/workflows). Actions are
configured to test the plugin and also build it for releases. A built tag
workflow will create `*-built` branches as well as a built release workflow that
will build and tag/release the plugin automatically. The built branches and
releases will include any compiled front-end assets (if using them).
Contributors: alleyinteractive

The plugin supports front-end assets which can be enqueued inside
`src/assets.php` or from within an entry points `index.php` file. For plugins
that don't require front-end assets, the configuration script below will prompt
you to delete the front-end files if you don't wish to use them.

## Getting Started

Follow these steps to get started:

1. Press the "Use template" button at the top of this repo to create a new repo
with the contents of this skeleton.
2. Run `make` (or `php ./configure.php`) to run a script that will replace all
placeholders throughout all the files.
3. Have fun creating your plugin! 🎊

<!--/delete-->

# Create WordPress Plugin

Contributors: author_username

Tags: vendor_name, create-wordpress-plugin
Tags: alleyinteractive, wp-404-caching

Stable tag: 0.0.0

Expand All @@ -43,28 +14,28 @@ Requires PHP: 8.1

License: GPL v2 or later

[![Coding Standards](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/coding-standards.yml)
[![Testing Suite](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/create-wordpress-plugin/actions/workflows/unit-test.yml)
[![Coding Standards](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/coding-standards.yml/badge.svg)](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/coding-standards.yml)
[![Testing Suite](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/unit-test.yml/badge.svg)](https://github.com/alleyinteractive/wp-404-caching/actions/workflows/unit-test.yml)

A skeleton WordPress plugin.
Full Page Cache for WordPress 404s.

## Installation

You can install the package via composer:

```bash
composer require alleyinteractive/create-wordpress-plugin
composer require alleyinteractive/wp-404-caching
```

## Usage

Activate the plugin in WordPress and use it like so:

```php
$plugin = Create_WordPress_Plugin\Skeleton\Example_Plugin();
$plugin = Alley\WP\WP_404_Caching\WP_404_Caching\WP_404_Caching();
$plugin->perform_magic();
```
<!--front-end-->

## Testing

Run `npm run test` to run Jest tests against JavaScript files. Run
Expand Down Expand Up @@ -156,9 +127,9 @@ This project is actively maintained by [Alley
Interactive](https://github.com/alleyinteractive). Like what you see? [Come work
with us](https://alley.co/careers/).

- [author_name](https://github.com/author_name)
- [Alley](https://github.com/Alley)
- [All Contributors](../../contributors)

## License

The GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.
The GNU General Public License (GPL) license. Please see [License File](LICENSE) for more information.
4 changes: 2 additions & 2 deletions blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Custom blocks in this directory can be created by running the `create-block` scr

The `create-block` script will create the block files in a the block directory using the `slug` field entered from the prompts when scaffolding the block.

The script uses the [@alleyinteractive/create-block](https://github.com/alleyinteractive/alley-scripts/tree/main/packages/create-block) script with the `--namespace` flag for scaffolding block files with the plugin namespace of `create-wordpress-plugin`. See the `create-block` script in `package.json`.
The script uses the [@alleyinteractive/create-block](https://github.com/alleyinteractive/alley-scripts/tree/main/packages/create-block) script with the `--namespace` flag for scaffolding block files with the plugin namespace of `wp-404-caching`. See the `create-block` script in `package.json`.

For **dynmanic blocks** the following files will be generated:

Expand All @@ -30,4 +30,4 @@ The `index.php` contains the PHP block registration and will be autoloaded with

Block attributes should be defined in the `block.json` file. [Learn more about block.json in the block editor handbook.](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/)

Running `npm run build` will compile the JavaScript and copy the PHP files to a directory in the `build` folder using `@wordpress/scripts`. The blocks will be enqueued via `block.json` after block registration. The block `index.php` file will be read by the `load_scripts()` function found in the `src/assets.php` file.
Running `npm run build` will compile the JavaScript and copy the PHP files to a directory in the `build` folder using `@wordpress/scripts`. The blocks will be enqueued via `block.json` after block registration. The block `index.php` file will be read by the `load_scripts()` function found in the `src/assets.php` file.
174 changes: 0 additions & 174 deletions buddy.yml

This file was deleted.

Loading

0 comments on commit ea8857a

Please sign in to comment.