Skip to content

Commit

Permalink
Merge pull request #387 from newfold-labs/release/2.6.0
Browse files Browse the repository at this point in the history
Release/2.6.0
  • Loading branch information
wpscholar authored Jan 18, 2024
2 parents a7ef06e + 10a8235 commit 0bfc163
Show file tree
Hide file tree
Showing 52 changed files with 2,870 additions and 2,776 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cypress-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:

- name: Store screenshots of test failures
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress-tests-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:

- name: Store screenshots of test failures
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:

- name: Store screenshots of test failures
if: ${{ failure() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: screenshots
path: ./tests/cypress/screenshots
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-artifact-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
working-directory: ${{ steps.workflow.outputs.DIST }}
run: find .

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.workflow.outputs.PACKAGE }}
path: ${{ steps.workflow.outputs.DIST }}
27 changes: 19 additions & 8 deletions .github/workflows/wp-i18n.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: WP Internationalization
on:
push:
pull_request:
types: [ opened, edited, reopened, ready_for_review, synchronize ]
branches:
- '**'
pull_request:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -64,24 +63,36 @@ jobs:
- name: Install PHP Dependencies
run: composer install --no-progress --optimize-autoloader

- name: Setup Registry
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: NPM Install
run: npm install --legacy-peer-deps

- name: Build JavaScript
run: npm run build

- name: Remove token
run: git checkout -- '.npmrc'

- name: Add text domains
run: npx node-wp-i18n addtextdomain

- name: Generate POT file
run: vendor/bin/wp i18n make-pot . ./languages/${{ github.event.repository.name }}.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/${{ github.repository }}/issues","POT-Creation-Date":null}' --exclude=assets,storybook,tests,src
- name: Generate language files
run: composer run-script i18n

- name: Check if there are file changes
id: changes
continue-on-error: true
run: git diff --exit-code

- name: Commit web files
- name: Commit updated language files
if: steps.changes.outcome == 'failure'
run: |
git config --local user.name "${{ github.event.head_commit.author.name }}"
git config --local user.email "${{ github.event.head_commit.author.email }}"
git remote -v
git add -A
git add './languages'
git commit -m "WordPress I18N triggered by commit ${{ github.sha }}"
git status
Expand Down
2 changes: 1 addition & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"core": "WordPress/WordPress#tags/6.4.1",
"core": "WordPress/WordPress#tags/6.4.2",
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
Expand Down
22 changes: 10 additions & 12 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use WP_Forge\UpgradeHandler\UpgradeHandler;
use NewfoldLabs\WP\ModuleLoader\Container;
use NewfoldLabs\WP\ModuleLoader\Plugin;

use function NewfoldLabs\WP\ModuleLoader\container as setContainer;

// Composer autoloader
Expand All @@ -32,7 +33,7 @@
$nfd_module_container->set(
'plugin',
$nfd_module_container->service(
function() {
function () {
return new Plugin(
array(
'id' => 'hostgator',
Expand All @@ -56,8 +57,8 @@ function() {

// Performance/cache settings
$nfd_module_container->set(
'cache_types',
array( 'browser', 'file', 'skip404' )
'cache_types',
array( 'browser', 'file', 'skip404' )
);

// Set coming soon values
Expand Down Expand Up @@ -111,16 +112,16 @@ function() {
);

$pluginUpdater->setDataOverrides(
[
'banners' => [
array(
'banners' => array(
'2x' => 'https://cdn.hiive.space/marketplace/vendors-assets/hostgator-banner.svg',
'1x' => 'https://cdn.hiive.space/marketplace/vendors-assets/hostgator-banner.svg',
],
'icons' => [
),
'icons' => array(
'2x' => 'https://cdn.hiive.space/marketplace/vendors-assets/hostgator-icon.svg',
'1x' => 'https://cdn.hiive.space/marketplace/vendors-assets/hostgator-icon.svg',
],
]
),
)
);

// Handle any upgrade routines (only in the admin)
Expand All @@ -144,7 +145,6 @@ function() {

// Required files
require HOSTGATOR_PLUGIN_DIR . '/inc/Admin.php';
require HOSTGATOR_PLUGIN_DIR . '/inc/AdminBar.php';
require HOSTGATOR_PLUGIN_DIR . '/inc/base.php';
require HOSTGATOR_PLUGIN_DIR . '/inc/jetpack.php';
require HOSTGATOR_PLUGIN_DIR . '/inc/LoginRedirect.php';
Expand All @@ -159,5 +159,3 @@ function() {
if ( is_admin() ) {
new Admin();
}

AdminBar::init();
43 changes: 28 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,38 +37,51 @@
},
"require-dev": {
"newfold-labs/wp-php-standards": "^1.2",
"wp-cli/i18n-command": "^2.4.4",
"wp-phpunit/wp-phpunit": "^6.4.1"
"wp-cli/i18n-command": "^2.5.0",
"wp-phpunit/wp-phpunit": "^6.4.2"
},
"scripts": {
"fix": "vendor/bin/phpcbf --standard=phpcs.xml .",
"lint": "vendor/bin/phpcs --standard=phpcs.xml -s .",
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-plugin-hostgator.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-plugin-hostgator/issues\",\"POT-Creation-Date\":\"2023-01-11T20:21:44+00:00\"}' --exclude=assets,tests,src",
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-plugin-hostgator.pot ./languages",
"i18n-mo": "vendor/bin/wp i18n make-mo ./languages",
"i18n-json": "vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
"i18n-json-rename": "for f in ./languages/*.json; do mv \"$f\" \"$(echo \"$f\" | sed 's/[0-9a-fA-F]\\{32\\}/hostgator-script/')\"; done",
"i18n": [
"vendor/bin/wp i18n make-pot . ./languages/wp-plugin-hostgator.pot --headers=Report-Msgid-Bugs-To:https://github.com/newfold-labs/wp-plugin-hostgator/issues --exclude=assets,storybook,tests,src",
"vendor/bin/wp i18n make-pot . ./languages/wp-plugin-hostgator.pot --headers=POT-Creation-Date:null --exclude=assets,storybook,tests,src"
"@i18n-pot",
"@i18n-po",
"@i18n-mo"
]
},
"scripts-descriptions": {
"fix": "Automatically fix coding standards issues where possible.",
"lint": "Check files against coding standards.",
"i18n": "Generate a .pot file for translation."
"i18n": "Generate new language files.",
"i18n-pot": "Generate a .pot file for translation.",
"i18n-po": "Update existing .po files.",
"i18n-mo": "Generate new language .mo files.",
"i18n-json": "Generate new language .json files.",
"i18n-json-rename": "Rename the language json files to remove the pesky hash."
},
"require": {
"doctrine/inflector": "1.2.0 as 1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.1.12",
"newfold-labs/wp-module-data": "^2.4.13",
"newfold-labs/wp-module-deactivation": "^1.0.3",
"newfold-labs/wp-module-ecommerce": "^1.3.12",
"doctrine/inflector": "1.4.4 as 1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.1.15",
"newfold-labs/wp-module-data": "^2.4.16",
"newfold-labs/wp-module-deactivation": "^1.0.4",
"newfold-labs/wp-module-ecommerce": "v1.3.18",
"newfold-labs/wp-module-global-ctb": "^1.0.9",
"newfold-labs/wp-module-help-center": "^1.0.22",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.1.0",
"newfold-labs/wp-module-notifications": "^1.1.6",
"newfold-labs/wp-module-onboarding": "1.11.8",
"newfold-labs/wp-module-performance": "^1.2.2",
"newfold-labs/wp-module-marketplace": "^2.2.0",
"newfold-labs/wp-module-notifications": "^1.2.2",
"newfold-labs/wp-module-onboarding": "^1.12.0",
"newfold-labs/wp-module-patterns": "^0.1.12",
"newfold-labs/wp-module-performance": "^1.3.0",
"newfold-labs/wp-module-runtime": "^1.0.7",
"newfold-labs/wp-module-secure-passwords": "^1.1",
"newfold-labs/wp-module-sso": "^1.0.4",
"newfold-labs/wp-module-staging": "^1.2.1",
"newfold-labs/wp-module-staging": "^1.2.3",
"wp-forge/wp-update-handler": "^1.0",
"wp-forge/wp-upgrade-handler": "^1.0"
}
Expand Down
Loading

0 comments on commit 0bfc163

Please sign in to comment.