Skip to content

Commit

Permalink
Merge branch 'trunk' into validate-check-categories
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar authored Feb 8, 2024
2 parents 14f550a + 1f0ceeb commit 9f7c427
Show file tree
Hide file tree
Showing 110 changed files with 1,305 additions and 512 deletions.
42 changes: 42 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.git
.github
.idea
.wordpress-org
build
build-cs
build-phpunit
docs
node_modules
patches
test-content
tests

*.DS_Store
.DS_Store
.distignore
.editorconfig
.eslintrc.js
.gitattributes
.gitignore
.nvmrc
.phpunit.result.cache
.wp-env.json
.wp-env.override.json
behat.yml
CODE_OF_CONDUCT.md
codecov.yml
composer.json
composer.lock
CONTRIBUTING.md
package.json
package-lock.json
phpcs.xml
phpcs.xml.dist
phpmd.xml
phpstan.neon
phpstan.neon.dist
phpunit.xml
phpunit.xml.dist
plugin-check.iml
README.md
SECURITY.md
9 changes: 7 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install PHP dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6
with:
composer-options: '--prefer-dist --no-progress --no-interaction --no-dev'

- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
with:
generate-zip: true
env:
#SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
#SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}

- name: Upload release asset
uses: actions/upload-release-asset@v1
Expand Down
28 changes: 14 additions & 14 deletions assets/js/plugin-check-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
/**
* Reset the results container.
*
* @since n.e.x.t
* @since 1.0.0
*/
function resetResults() {
// Empty the results container.
Expand All @@ -99,7 +99,7 @@
/**
* Resets the form controls once checks have completed or failed.
*
* @since n.e.x.t
* @since 1.0.0
*/
function resetForm() {
spinner.classList.remove( 'is-active' );
Expand All @@ -113,7 +113,7 @@
/**
* Setup the runtime environment if needed.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {Object} data Data object with props passed to form data.
*/
Expand Down Expand Up @@ -153,7 +153,7 @@
/**
* Cleanup the runtime environment.
*
* @since n.e.x.t
* @since 1.0.0
*
* @return {Object} The response data.
*/
Expand Down Expand Up @@ -186,7 +186,7 @@
/**
* Get the Checks to run.
*
* @since n.e.x.t
* @since 1.0.0
*/
function getChecksToRun() {
const pluginCheckData = new FormData();
Expand Down Expand Up @@ -230,7 +230,7 @@
/**
* Run Checks.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {Object} data The response data.
*/
Expand Down Expand Up @@ -259,7 +259,7 @@
/**
* Renders result message.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {boolean} isSuccessMessage Whether the message is a success message.
*/
Expand All @@ -279,7 +279,7 @@
/**
* Run a single check.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {string} plugin The plugin to check.
* @param {string} check The check to run.
Expand Down Expand Up @@ -314,7 +314,7 @@
/**
* Handles any errors in the data returned from the response.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {Object} data The response data.
* @return {Object} The response data.
Expand All @@ -340,7 +340,7 @@
/**
* Renders results for each check on the page.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {Object} results The results object.
*/
Expand All @@ -365,7 +365,7 @@
/**
* Renders the file results table.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {string} file The file name for the results.
* @param {Object} errors The file errors.
Expand Down Expand Up @@ -397,7 +397,7 @@
/**
* Checks if there are any links in the results object.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {Object} results The results object.
* @return {boolean} True if there are links, false otherwise.
Expand All @@ -418,7 +418,7 @@
/**
* Renders a result row onto the file table.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {string} type The result type. Either ERROR or WARNING.
* @param {Object} results The results object.
Expand Down Expand Up @@ -454,7 +454,7 @@
/**
* Renders the template with data.
*
* @since n.e.x.t
* @since 1.0.0
*
* @param {string} templateSlug The template slug
* @param {Object} data Template data.
Expand Down
10 changes: 5 additions & 5 deletions cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
* This is necessary to setup the environment to perform runtime checks.
*
* @package plugin-check
* @since n.e.x.t
* @since 1.0.0
*/

use WordPress\Plugin_Check\Checker\CLI_Runner;
use WordPress\Plugin_Check\Plugin_Context;
use WordPress\Plugin_Check\CLI\Plugin_Check_Command;
use WordPress\Plugin_Check\Plugin_Context;

if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
return;
Expand Down Expand Up @@ -40,14 +40,14 @@
/**
* Adds hook to set up the object-cache.php drop-in file.
*
* @since n.e.x.t
* @since 1.0.0
*/
WP_CLI::add_hook(
'before_wp_load',
function() {
function () {
if ( CLI_Runner::is_plugin_check() ) {
if ( ! file_exists( ABSPATH . 'wp-content/object-cache.php' ) ) {
if ( ! copy( __DIR__ . '/drop-ins/object-cache.copy.php', ABSPATH . 'wp-content/object-cache.php' ) ) {
if ( ! copy( __DIR__ . '/drop-ins/object-cache.copy.php', ABSPATH . 'wp-content/object-cache.php' ) ) {
WP_CLI::error( 'Unable to copy object-cache.php file.' );
}
}
Expand Down
48 changes: 24 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9f7c427

Please sign in to comment.