-
Notifications
You must be signed in to change notification settings - Fork 156
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
Showing
135 changed files
with
42,561 additions
and
44,588 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,6 @@ | ||
node_modules | ||
release/* | ||
dist/* | ||
docs-built/* | ||
vendor/* | ||
gulp-tasks/* |
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
{ | ||
"extends": "@10up/eslint-config" | ||
"extends": [ "plugin:@wordpress/eslint-plugin/recommended" ], | ||
"settings": { | ||
"import/core-modules": [ "jquery", "underscore" ] | ||
}, | ||
"rules": { | ||
"import/no-extraneous-dependencies": ["error", {"packageDir": ["./", "./node_modules/@wordpress/scripts"] }] | ||
} | ||
} |
Validating CODEOWNERS rules …
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,8 @@ | ||
# These owners will be the default owners for everything in the repo. Unless a later match takes precedence, @10up/open-source-practice, as primary maintainers will be requested for review when someone opens a Pull Request. | ||
* @10up/open-source-practice | ||
|
||
# GitHub and WordPress.org specifics | ||
/.github/ @jeffpaul | ||
/assets/img/ @jeffpaul | ||
CODE_OF_CONDUCT.md @jeffpaul | ||
LICENSE.md @jeffpaul |
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 |
---|---|---|
@@ -1,9 +1,48 @@ | ||
# Welcome to the Distributor Plugin Hook Documentation | ||
# Welcome to the Distributor Developer Documentation | ||
|
||
This resource is generated documentation on actions and filters found in the Distributor plugin. Use the sidebar to browse and navigate. | ||
|
||
For more information about using Distributor with WordPress, please see the [Distributor website](https://distributorplugin.com/). | ||
|
||
## Migrating to version 2.0 | ||
|
||
Version 2.0 of Distributor contains breaking changes. Please review the <a href="./tutorial-migration-guide-version-1-to-version-2.html">migration guide</a> tutorial and follow any steps required. | ||
|
||
To report an issue with Distributor or contribute back to the project, please visit the [GitHub repository](https://github.com/10up/distributor/). | ||
|
||
## Developers | ||
|
||
### Running Locally | ||
|
||
If you are compiling Distributor locally, note that the recommended version of Node.js is version 16.x. The minimum version required is Node.js 12.x. | ||
|
||
An `.nvmrc` file is included in the plugin repository. It's recommended you install [fnm (fast node manager)](https://github.com/Schniz/fnm/), [nvm (node version manager)](https://github.com/nvm-sh/nvm) or similar when developing locally. | ||
|
||
### Testing | ||
|
||
The plugin contains a standard test suite compatible with PHPUnit. If you want to test across multiple PHP versions, a [Dockunit](https://github.com/dockunit/dockunit) file is included. | ||
|
||
### Debugging | ||
|
||
You can define a constant `DISTRIBUTOR_DEBUG` to `true` to increase the ease of debugging in Distributor. This will make all remote requests blocking and expose the subscription post type. | ||
|
||
Enabling this will also provide more debugging information in your error log for image side loading issues. The specific logging method may change in the future. | ||
|
||
### Application Passwords | ||
|
||
Application passwords are only available for live sites running over an HTTPS connection. | ||
|
||
For your local development environment, you will need these snippets to enable application passwords without the need for an HTTPS connection. A local development environment is one that "can reach the internet but **is not reachable from the internet**". | ||
|
||
```php | ||
// In your local environment's wp-config.php file. | ||
define( 'WP_ENVIRONMENT_TYPE', 'local' ); | ||
|
||
// In a custom plugin on your local environment. | ||
add_filter( 'wp_is_application_passwords_available', '__return_true' ); | ||
|
||
add_action( 'wp_authorize_application_password_request_errors', function( $error ) { | ||
$error->remove( 'invalid_redirect_scheme' ); | ||
} ); | ||
``` | ||
<a href="http://10up.com/contact/" class="banner"><img src="https://10updotcom-wpengine.s3.amazonaws.com/uploads/2016/10/10up-Github-Banner.png" width="850"></a> |
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
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
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
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
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
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: Generate ZIP | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: 'Git Commit Ref (branch, tag, or hash)' | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
generate_zip: | ||
name: New ZIP file | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.4.0 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
- name: Use desired version of NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
- name: Set PHP version | ||
uses: shivammathur/setup-php@2.17.0 | ||
with: | ||
php-version: 7.4 | ||
tools: composer:v2, wp | ||
- name: Check versions | ||
run: | | ||
npm -v | ||
node -v | ||
php -v | ||
composer -v | ||
- name: Install and build | ||
run: | | ||
composer install --no-dev | ||
npm install | ||
npm run release | ||
npm run plugin-zip | ||
rm -rf ./release && unzip ${{ github.event.repository.name }}.zip -d ./release | ||
- name: Upload the ZIP file as an artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.event.repository.name }} | ||
path: release | ||
retention-days: 5 |
Oops, something went wrong.