Skip to content

Commit 44136c5

Browse files
committed
Updating README. Updating the wording of some actions for the badges on the README. Added screenshots too.
1 parent 5ae239e commit 44136c5

File tree

10 files changed

+76
-11
lines changed

10 files changed

+76
-11
lines changed

.github/workflows/codeception.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Codeception
1+
name: Testing Integration
22

33
on:
44
push:

.github/workflows/e2e-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Playwright End-to-End Tests
1+
name: End-to-End Tests
22

33
on:
44
push:

plugins/hwp-previews/README.md

Lines changed: 72 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,26 @@
11
# HWP Previews
22

3-
**Headless Previews** solution for WordPress: fully configurable preview URLs via the settings page.
3+
**Headless Previews** solution for WordPress: fully configurable preview URLs via the settings page which is framework agnostic.
4+
5+
* [Join the Headless WordPress community on Discord.](https://discord.gg/headless-wordpress-836253505944813629)
6+
* [Documentation](#getting-started)
7+
8+
9+
-----
10+
11+
[![Version](https://img.shields.io/badge/version-0.0.1-beta)]()
12+
[![License](https://img.shields.io/badge/license-GPLv2%2B-green)]()
13+
![GitHub forks](https://img.shields.io/github/forks/wpengine/hwptoolkit?style=social)
14+
![GitHub stars](https://img.shields.io/github/stars/wpengine/hwptoolkit?style=social)
15+
[![Testing Integration](https://github.com/wpengine/hwptoolkit/workflows/Testing%20Integration/badge.svg)](https://github.com/wpengine/hwptoolkit/actions?query=workflow%3A%22Testing+Integration%22)
16+
[![Code Quality](https://github.com/wpengine/hwptoolkit/workflows/Code%20Quality/badge.svg)](https://github.com/wpengine/hwptoolkit/actions?query=workflow%3A%22Code+Quality%22)
17+
[![End-to-End Tests](https://github.com/wpengine/hwptoolkit/workflows/End-to-End%20Tests/badge.svg)](https://github.com/wpengine/hwptoolkit/actions?query=workflow%3A%22End-to-End+Tests%22)
18+
-----
19+
420

5-
[![Version](https://img.shields.io/badge/version-0.0.1-beta)]() [![License](https://img.shields.io/badge/license-GPLv2%2B-lightgrey)]()
621

722
> [!CAUTION]
8-
> This plugin is currently in an beta state. It's still under active development, so you may encounter bugs or incomplete features. Updates will be rolled out regularly. Use with caution and provide feedback if possible.
23+
> This plugin is currently in an beta state. It's still under active development, so you may encounter bugs or incomplete features. Updates will be rolled out regularly. Use with caution and provide feedback if possible. You can create an issue at [https://github.com/wpengine/hwptoolkit/issues](https://github.com/wpengine/hwptoolkit/issues)
924
1025
---
1126

@@ -26,6 +41,11 @@ HWP Previews is a robust and extensible WordPress plugin that centralizes all pr
2641
It empowers site administrators and developers to tailor preview behaviors for each public post type independently, facilitating seamless headless or decoupled workflows.
2742
With HWP Previews, you can define dynamic URL templates, enforce unique slugs for drafts, allow all post statuses be used as parent and extend functionality through flexible hooks and filters, ensuring a consistent and conflict-free preview experience across diverse environments.
2843

44+
45+
46+
>[!IMPORTANT]
47+
> For Faust users, HWP Previews integrates seamlessly, automatically configuring settings to match Faust's preview system. This allows you to maintain your existing preview workflow without additional setup.
48+
2949
---
3050

3151
## Features
@@ -34,8 +54,8 @@ With HWP Previews, you can define dynamic URL templates, enforce unique slugs fo
3454
- **Custom URL Templates**: Define preview URLs using placeholder tokens for dynamic content.
3555
- **Parent Status**: Allow posts of **all** statuses to be used as parent within hierarchical post types.
3656
- **Highly Customizable**: Extend core behavior with a comprehensive set of actions and filters.
57+
- **Faust Compatibility**: The plugin is compatible with [Faust.js](https://faustjs.org/) and the [FaustWP plugin](https://github.com/wpengine/faustjs/tree/canary/plugins/faustwp).
3758

38-
---
3959

4060
## Getting Started
4161

@@ -49,6 +69,28 @@ This guide will help you set up your first headless preview link for the "Posts"
4969

5070
---
5171

72+
## Project Structure
73+
74+
```text
75+
hwp-previews/
76+
├── src/ # Main plugin source code
77+
│ ├── Admin/ # Admin settings, menu, and settings page logic
78+
│ ├── Hooks/ # WordPress hooks and filters
79+
│ ├── Integration/ # Integrations (e.g. Faust)
80+
│ ├── Preview/ # Preview URL logic, template resolver, helpers
81+
│ ├── Plugin.php # Main plugin class (entry point)
82+
│ └── Autoload.php # PSR-4 autoloader
83+
├── tests/ # All test suites
84+
│ ├── wpunit/ # WPBrowser/Codeception unit
85+
├── [hwp-previews.php]
86+
├── [activation.php]
87+
├── [composer.json]
88+
├── [deactivation.php]
89+
├── [ACTIONS_AND_FILTERS.md]
90+
├── [TESTING.md]
91+
├── [README.md]
92+
```
93+
5294
## Configuration
5395

5496
HWP Previews configuration located at **Settings > HWP Previews** page in your WP Admin. The settings are organized by post type.
@@ -114,10 +156,6 @@ This out-of-the-box configuration allows your existing preview workflow to conti
114156

115157
---
116158

117-
## Extending the Functionality
118-
119-
The plugin's behavior can be extended using its PHP hooks. Developers can control which post types are configurable in the settings via the `hwp_previews_filter_available_post_types` filter. The `hwp_previews_core` action allows for registering new URL parameters or unregistering default ones. Additionally, the `hwp_previews_template_path` filter can be used to replace the default preview iframe with a custom PHP template.
120-
121159
### Actions & Filters
122160

123161
See the [Actions & Filters documentation](ACTIONS_AND_FILTERS.md) for a comprehensive list of available hooks and how to use them.
@@ -127,3 +165,29 @@ See the [Actions & Filters documentation](ACTIONS_AND_FILTERS.md) for a comprehe
127165
## Testing
128166

129167
See [Testing.md](TESTING.md) for details on how to test the plugin.
168+
169+
170+
## Screenshots
171+
172+
<details>
173+
<summary>Click to expand screenshots</summary>
174+
175+
![Custom Post Type Preview](./screenshots/settings_page.png)
176+
*Preview settings page.*
177+
178+
![Custom Post Type Preview](./screenshots/cpt_preview.png)
179+
*Preview settings for a custom post type.*
180+
181+
![Post Preview](./screenshots/post_preview.png)
182+
*Preview button in the WordPress editor.*
183+
184+
![Post Preview in Iframe](./screenshots/post_preview_iframe.png)
185+
*Preview loaded inside the WordPress editor using an iframe.*
186+
187+
![Preview Token](./screenshots/preview_token.png)
188+
*Preview token parameter for secure preview URLs.*
189+
190+
![App Password](./screenshots/app_password.png)
191+
*App password setup for authentication.*
192+
193+
</details>

plugins/hwp-previews/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@
100100
"package.json",
101101
"package-lock.json",
102102
"node_modules/",
103-
"/TESTING.md"
103+
"/TESTING.md",
104+
"/screenshots"
104105
]
105106
},
106107
"autoload": {
179 KB
Loading
465 KB
Loading
496 KB
Loading
492 KB
Loading
138 KB
Loading
310 KB
Loading

0 commit comments

Comments
 (0)