Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sixach/wp-snippets
https://github.com/sixach/wp-snippets
library
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/sixach/wp-snippets
- Owner: sixach
- License: gpl-3.0
- Created: 2021-03-11T14:40:57.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-10T14:19:14.000Z (about 2 years ago)
- Last Synced: 2024-10-20T14:43:32.519Z (19 days ago)
- Topics: library
- Language: PHP
- Homepage: https://sixach.github.io/wp-snippets
- Size: 6.97 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WP Snippets
This repository is a collection of useful functions for WordPress projects.
## Introduction
At Sixa, we strive to provide a top-notch and solid code base for all WordPress projects.
In order to improve both our efficiency and consistency, we need to standardize what we
use and how we use it.This repository allows us to reuse initial functions and classes to make sure all projects
can get up and running as quickly as possible while closing adhering to Sixa’s high-quality
coding standards.## Installation
```bash
composer install sixach/wp-snippets
```such that in `composer.json` you `require` the package
```JSON
{
"require": {
"sixach/wp-snippets": "^1.4.1"
}
}
```Make sure to use the latest version, the version in the example above might be outdated.
## Usage
In the file in which you wish to call a function or factory class from WP Snippets, simply
import the class and call it subsequently, e.g.```PHP
'no',
'type' => 'checkbox',
'id' => 'edit-menu-item-is-button',
'name' => 'is_button',
'description' => __( 'Style this item as a CTA button? (Top-level only)', '@@textdomain' ),
),
)
);
}
}
?>
```### Documentation
For a more detailed documentation on the functionality included in this package, please refer
to the [about page of this repository](https://sixach.github.io/wp-snippets/#/).## Notes
**Note 1**: Much of the functionality in this repository is intended to be optional depending on the needs of the project. E.g. `Breadcrumb` class.
**Note 2**: Presentation should be kept in the theme. Separating functionality from aesthetics makes long-term development, maintenance, and extensibility much easier.