-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3951fa9
Showing
11 changed files
with
252 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.php] | ||
indent_size = 4 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore everything. | ||
/* export-ignore | ||
|
||
# Export white-listed production code only. | ||
/*.php -export-ignore | ||
/LICENSE -export-ignore | ||
/README.md -export-ignore | ||
/composer.json -export-ignore | ||
/composer.lock -export-ignore | ||
/config -export-ignore | ||
/src -export-ignore | ||
/vendor -export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "00:00" | ||
timezone: Europe/London |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# yamllint disable-line rule:document-start | ||
name: CI | ||
|
||
# yamllint disable-line rule:truthy | ||
on: [push] | ||
|
||
jobs: | ||
php: | ||
name: PHP ${{ matrix.php }} | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[ci skip]')" | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
strategy: | ||
matrix: | ||
php: ['8.1'] | ||
|
||
steps: | ||
- name: Checkout the project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup the PHP ${{ matrix.php }} environment on ${{ runner.os }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
|
||
- name: Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> "${GITHUB_OUTPUT}" | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
# yamllint disable-line rule:line-length | ||
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-${{ matrix.php }}-composer- | ||
|
||
- name: Install Composer dependencies | ||
# yamllint disable-line rule:line-length | ||
run: composer install --no-progress --prefer-dist --optimize-autoloader --no-suggest | ||
|
||
- name: Execute the PHP lint script | ||
run: composer run-script style:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
vendor/ | ||
.idea/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"bracketSameLine": true, | ||
"semi": true, | ||
"singleQuote": true, | ||
"tabWidth": 2, | ||
"trailingComma": "all", | ||
"useTabs": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Itineris Limited | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# PackageTemplateWPMUPluginBasic | ||
|
||
[![Packagist Version](https://img.shields.io/packagist/v/itinerisltd/package-template-wp-muplugin-basic.svg?label=release&style=flat-square)](https://packagist.org/packages/itinerisltd/package-template-wp-muplugin-basic) | ||
[![PHP from Packagist](https://img.shields.io/packagist/php-v/itinerisltd/package-template-wp-muplugin-basic.svg?style=flat-square)](https://packagist.org/packages/itinerisltd/package-template-wp-muplugin-basic) | ||
[![Packagist Downloads](https://img.shields.io/packagist/dt/itinerisltd/package-template-wp-muplugin-basic.svg?label=packagist%20downloads&style=flat-square)](https://packagist.org/packages/itinerisltd/package-template-wp-muplugin-basic/stats) | ||
[![GitHub License](https://img.shields.io/github/license/itinerisltd/package-template-wp-muplugin-basic.svg?style=flat-square)](https://github.com/ItinerisLtd/package-template-wp-muplugin-basic/blob/master/LICENSE) | ||
[![Hire Itineris](https://img.shields.io/badge/Hire-Itineris-ff69b4.svg?style=flat-square)](https://www.itineris.co.uk/contact/) | ||
[![Twitter Follow @itineris_ltd](https://img.shields.io/twitter/follow/itineris_ltd?style=flat-square&color=1da1f2)](https://twitter.com/itineris_ltd) | ||
|
||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
- [Minimum Requirements](#minimum-requirements) | ||
- [Installation](#installation) | ||
- [Credits](#credits) | ||
- [License](#license) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
## Minimum Requirements | ||
|
||
- PHP v8.1 | ||
- WordPress v6.1 | ||
|
||
## Installation | ||
|
||
```bash | ||
composer require itinerisltd/package-template-wp-muplugin-basic | ||
``` | ||
|
||
## Credits | ||
|
||
[PackageTemplateWPMUPluginBasic](https://github.com/ItinerisLtd/package-template-wp-muplugin-basic) is a [Itineris Limited](https://www.itineris.co.uk/) project created by [Lee Hanbury-Pickett](https://github.com/codepuncher). | ||
|
||
Full list of contributors can be found [here](https://github.com/ItinerisLtd/package-template-wp-muplugin-basic/graphs/contributors). | ||
|
||
## License | ||
|
||
[PackageTemplateWPMUPluginBasic](https://github.com/ItinerisLtd/package-template-wp-muplugin-basic) is released under the [MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "itinerisltd/package-template-wp-muplugin-basic", | ||
"description": "Basic WordPress plugin template for Composer", | ||
"license": "MIT", | ||
"type": "wordpress-muplugin", | ||
"authors": [ | ||
{ | ||
"name": "Itineris Limited", | ||
"email": "dev@itineris.co.uk", | ||
"homepage": "https://itineris.co.uk/", | ||
"role": "Company" | ||
}, | ||
{ | ||
"name": "Lee Hanbury-Pickett", | ||
"email": "lee.hanbury@gmail.com", | ||
"role": "Developer" | ||
} | ||
], | ||
"homepage": "https://github.com/itinerisltd/package-template-wp-muplugin-basic/", | ||
"support": { | ||
"email": "dev@itineris.co.uk", | ||
"issues": "https://github.com/ItinerisLtd/package-template-wp-muplugin-basic/issues", | ||
"source": "https://github.com/ItinerisLtd/package-template-wp-muplugin-basic" | ||
}, | ||
"require": { | ||
"php": "^8.1" | ||
}, | ||
"require-dev": { | ||
"itinerisltd/itineris-wp-coding-standards": "^1.0" | ||
}, | ||
"prefer-stable": true, | ||
"config": { | ||
"allow-plugins": { | ||
"dealerdirect/phpcodesniffer-composer-installer": true | ||
}, | ||
"optimize-autoloader": true, | ||
"preferred-install": "dist", | ||
"sort-packages": true | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "0.1.x-dev" | ||
} | ||
}, | ||
"scripts": { | ||
"style:check": "phpcs", | ||
"style:fix": "phpcbf" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
/** | ||
* Plugin Name: PackageTemplateWPMUPluginBasic | ||
* Plugin URI: https://www.itineris.co.uk/ | ||
* Description: Disable Pagination URLs | ||
* Version: 0.1.0 | ||
* Author: Itineris Limited | ||
* Author URI: https://www.itineris.co.uk/ | ||
* Text Domain: package-template-wp-muplugin-basic | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Itineris\PackageTemplateWPMUPluginBasic; | ||
|
||
// If this file is called directly, abort. | ||
if (! defined('WPINC')) { | ||
die; | ||
} | ||
|
||
/**-------------------------------------*/ | ||
/** Add your filters/actions/code below */ | ||
/**-------------------------------------*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Plugin" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd"> | ||
<!-- Check only our site MU plugin --> | ||
<file>package-template-wp-muplugin-basic.php</file> | ||
|
||
<!-- Show colors in console --> | ||
<arg value="-colors" /> | ||
|
||
<!-- Show progress and sniff codes in all reports; Show progress of the run --> | ||
<arg value="sp" /> | ||
|
||
<!-- Scan only PHP files --> | ||
<arg name="extensions" value="php" /> | ||
|
||
<!-- Use Itineris WP Coding Standards --> | ||
<rule ref="Itineris" /> | ||
|
||
<config name="minimum_supported_wp_version" value="6.2" /> | ||
|
||
<rule ref="WordPress.WP.I18n"> | ||
<properties> | ||
<property name="text_domain" type="array" value="itineris" /> | ||
</properties> | ||
</rule> | ||
</ruleset> |