Skip to content

Commit 76fa24c

Browse files
committed
docs(readme): Add readme for WP plugins directory
1 parent 7b7ec2f commit 76fa24c

File tree

2 files changed

+55
-47
lines changed

2 files changed

+55
-47
lines changed

readme.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -18,53 +18,6 @@ It’s super quick to get a [PHP-Prefixer](https://php-prefixer.com/) project up
1818

1919
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. For more information, please, visit <https://docs.guzzlephp.org/en/stable/index.html>
2020

21-
## How PHP Prefixing works
22-
23-
[PHP-Prefixer](https://php-prefixer.com/) service works based on the following `composer.json` schema definition:
24-
25-
```json
26-
...
27-
"extra": {
28-
"php-prefixer": {
29-
"project-name": "Using Guzzle in a WordPress plug-in with PHP-Prefixer",
30-
"namespaces-prefix": "PPP",
31-
"global-scope-prefix": "PPP_",
32-
"exclude-paths": [
33-
"bin/"
34-
]
35-
}
36-
},
37-
...
38-
```
39-
40-
This repository has an action `.github/workflows/prefix.yml` to execute the process to prefix the PHP code:
41-
42-
```yml
43-
name: PHP-Prefixer
44-
45-
on: [workflow_dispatch]
46-
47-
jobs:
48-
build:
49-
runs-on: ubuntu-latest
50-
51-
steps:
52-
- name: Checkout
53-
uses: actions/checkout@v2
54-
55-
- name: Run PHP-Prefixer
56-
uses: PHP-Prefixer/php-prefixer-build-action@main
57-
env:
58-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
with:
60-
personal_access_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
61-
project_id: ${{ secrets.PROJECT_ID }}
62-
```
63-
64-
To know more about how PHP-Prefixer service can be configured for a WordPress plug-in, check the following article:
65-
66-
- [New Tutorial: Using PHP Composer in the WordPress Ecosystem](https://blog.php-prefixer.com/2020/10/23/new-tutorial-using-php-composer-in-the-wordpress-ecosystem/)
67-
6821
## References
6922

7023
- Blog: [New Tutorial: Using PHP Composer in the WordPress Ecosystem](https://blog.php-prefixer.com/2020/10/23/new-tutorial-using-php-composer-in-the-wordpress-ecosystem/)

readme.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
=== Using prefixed Guzzle with PHP-Prefixer ===
2+
Contributors: phpprefixer
3+
Tags: development, prefixer, php, scope, namespace
4+
Requires at least: 3.8.0
5+
Tested up to: 4.2
6+
Stable tag: 1.0.0
7+
License: GPLv3 or later
8+
License URI: http://www.gnu.org/licenses/gpl.html
9+
10+
A plugin to showcase the PHP-Prefixer service and how to use Guzzle in the WordPress Ecosystem.
11+
12+
== Description ==
13+
14+
**Using prefixed Guzzle with PHP-Prefixer** plugin for WordPress. A plugin to showcase the PHP-Prefixer service and how to use Guzzle in the WordPress Ecosystem.
15+
16+
## About the Plugin
17+
18+
A plugin to integrate Guzzle, PHP HTTP client, in a WordPress plugin with PHP-Prefixer. The plugin shows a number fact from numbersapi.com using Guzzle as HTTP client. It is inspired by the Hello Dolly plugin.
19+
20+
## About PHP-Prefixer
21+
22+
It’s super quick to get a [PHP-Prefixer](https://php-prefixer.com/) project up and running. Install any library freely. PHP-Prefixer will manage your namespaces.
23+
24+
- **Use the same libraries across all platforms**: Develop your solutions using the same libraries for all the platforms you work in, specifically WordPress, Joomla, Drupal, Laravel, Symfony, Slim Framework, etc.
25+
- **Composer + WordPress**: Use Composer for your WordPress projects. PHP-Prefixer will process the dependencies to run smoothly along with other third-party plugins.
26+
- **Fully integrated with Git**: Declare your name space configuration and let the service produce the packages. No local installation. No Phars. No new dependencies.
27+
28+
## About Guzzle, PHP HTTP client
29+
30+
Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and trivial to integrate with web services. For more information, please, visit <https://docs.guzzlephp.org/en/stable/index.html>
31+
32+
## References
33+
34+
- Blog: [New Tutorial: Using PHP Composer in the WordPress Ecosystem](https://blog.php-prefixer.com/2020/10/23/new-tutorial-using-php-composer-in-the-wordpress-ecosystem/)
35+
- Documentation: [How to Prefix a WordPress Plugin](https://php-prefixer.com/docs/guides/how-to-prefix-wordpress-plugin/)
36+
37+
== Installation ==
38+
39+
1. Install the plugin either via the WordPress.org plugin directory, or by uploading the files to your
40+
server. In the latter case we suggest you to upload the files into your site's `/wp-content/plugins/using-guzzle-in-a-word-press-plugin-with-php-prefixer`
41+
directory.
42+
1. Activate the plugin through the 'Plugins' menu in WordPress
43+
1. The plugin shows number facts in the Admin area
44+
1. That's it! Really, it is that simple!
45+
46+
== Frequently Asked Questions ==
47+
48+
= What is PHP-Prefier? =
49+
50+
PHP-Prefixer is an automated online service powered by a complex rule-based system to apply prefixes to Composer dependencies.
51+
52+
== Changelog ==
53+
54+
= 1.0.0 =
55+
Initial version.

0 commit comments

Comments
 (0)