Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pronamic/wp-file-header
A library that makes the management of WordPress file headers easier.
https://github.com/pronamic/wp-file-header
deploy deployment file-header file-headers pronamic readme wordpress wordpress-deployment wordpress-development wordpress-plugin wordpress-theme wp-cli
Last synced: 3 months ago
JSON representation
A library that makes the management of WordPress file headers easier.
- Host: GitHub
- URL: https://github.com/pronamic/wp-file-header
- Owner: pronamic
- License: gpl-2.0
- Archived: true
- Created: 2022-09-28T13:46:30.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T19:32:51.000Z (about 2 years ago)
- Last Synced: 2024-08-21T16:31:36.188Z (4 months ago)
- Topics: deploy, deployment, file-header, file-headers, pronamic, readme, wordpress, wordpress-deployment, wordpress-development, wordpress-plugin, wordpress-theme, wp-cli
- Language: PHP
- Homepage:
- Size: 24.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pronamic WordPress File Header
Many WordPress plugins contain bash scripts withsed
andawk
commands to update WordPress file headers. Becausesed
andawk
commands are difficult to read and can be error prone we have developed this library. This library makes it easy to read and/or edit WordPress file headers in for exampleplugin.php
,style.css
orreadme.txt
.## Table of contents
- [Getting Started](#getting-started)
- [Command Line Usage](#command-line-usage)
- [Examples](#examples)
- [Alternatives](#alternatives)
- [Links](#links)## Getting Started
### Installation
To start documenting your WordPress filters and actions, require Pronamic WordPress Documentor in Composer:
```
composer require pronamic/wp-file-header --dev
```## Command Line Usage
### Examples
```
vendor/bin/pronamic-wp-file-header get Version plugin.php
``````
vendor/bin/pronamic-wp-file-header get 'Stable tag' readme.txt
``````
vendor/bin/pronamic-wp-file-header get Version style.css
``````
vendor/bin/pronamic-wp-file-header set Version 1.0.0 plugin.php
``````
vendor/bin/pronamic-wp-file-header set 'Stable tag' 4.3 readme.txt
``````
vendor/bin/pronamic-wp-file-header set Version 1.3 style.css
```## Alternatives
Here is a list of alternatives that we found. However, none of these satisfied our requirements.
*If you know other similar projects, feel free to edit this section!*
- [wp-file-header-metadata](https://github.com/ahmadawais/wp-file-header-metadata) by [Ahmad Awais](https://github.com/ahmadawais)
## Links
- https://codex.wordpress.org/File_Header
- https://codex.wordpress.org/File_Header_API
- https://developer.wordpress.org/plugins/plugin-basics/header-requirements/#header-fields
- https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/
- https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/
- https://docs.npmjs.com/cli/v7/commands/npm-pkg
- https://developer.wordpress.org/reference/functions/get_plugin_data/
- https://developer.wordpress.org/reference/functions/get_file_data/
- https://github.com/wp-cli/i18n-command/blob/v2.4.0/src/FileDataExtractor.php