Skip to content

Commit 68ed58b

Browse files
authored
Merge pull request #3851 from extendify/add-library-13-1
Add library 13.1
2 parents 5348fa9 + cf326f4 commit 68ed58b

File tree

125 files changed

+15940
-14918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+15940
-14918
lines changed

class-redux-framework-plugin.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,7 @@ public function includes() {
162162
require_once dirname( __FILE__ ) . '/redux-core/framework.php';
163163
}
164164

165-
/* // Including extendify sdk.
166-
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
167-
if ( file_exists( plugin_dir_path( REDUX_PLUGIN_FILE ) . 'extendify-sdk/loader.php' ) ) {
168-
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
169-
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
170-
}
171-
}
172-
165+
/*
173166
if ( file_exists( dirname( __FILE__ ) . '/redux-templates/redux-templates.php' ) ) {
174167
require_once dirname( __FILE__ ) . '/redux-templates/redux-templates.php';
175168
}*/

redux-core/class-redux-core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ private static function load_template_libraries(){
357357
// Including extendify sdk.
358358
if ( true === (bool) get_option( 'use_extendify_templates', true ) ) {
359359
if ( file_exists( dirname( __FILE__ ) . '/extendify-sdk/loader.php' ) ) {
360-
$GLOBALS['extendifySdkSourcePlugin'] = 'Redux';
360+
$GLOBALS['extendify_sdk_partner'] = 'Redux';
361361
require_once dirname( __FILE__ ) . '/extendify-sdk/loader.php';
362362
}
363363
}

redux-core/extendify-sdk/.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ end_of_line = lf
66
insert_final_newline = true
77
indent_style = space
88
indent_size = 4
9+
tabSize = 4
910
trim_trailing_whitespace = true
1011

1112
[*.yml]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules/*
22
vendor/*
33
public/build/*
4+
*.min.js
5+
wpcs
6+
utility-framework/suggestions.json

redux-core/extendify-sdk/.eslintrc.js

Lines changed: 12 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,28 @@ module.exports = {
55
jest: true,
66
node: true,
77
},
8-
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended'],
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:react-hooks/recommended',
12+
'prettier',
13+
],
914
parserOptions: {
1015
ecmaFeatures: { jsx: true },
1116
sourceType: 'module',
1217
},
13-
plugins: ['react'],
18+
plugins: ['react', 'prettier'],
1419
rules: {
15-
indent: ['error', 4, { SwitchCase: 1 }],
1620
'require-await': 'error',
17-
quotes: ['error', 'single'],
21+
quotes: ['error', 'single', { avoidEscape: true }],
1822
'comma-dangle': ['error', 'always-multiline'],
19-
'multiline-ternary': ['error', 'always-multiline'],
2023
'array-element-newline': ['error', 'consistent'],
2124
'no-constant-condition': ['error', { checkLoops: false }],
2225
'no-multi-spaces': ['error'],
2326
semi: ['error', 'never'],
2427
'space-in-parens': ['error', 'never'],
25-
'space-unary-ops': [
26-
2, {
27-
words: true,
28-
nonwords: false,
29-
overrides: {},
30-
}],
28+
'key-spacing': ['error', { afterColon: true }],
29+
'space-infix-ops': ['error'],
3130
'space-before-function-paren': [
3231
'error',
3332
{
@@ -37,16 +36,8 @@ module.exports = {
3736
},
3837
],
3938
'react/react-in-jsx-scope': 'off',
40-
'function-paren-newline': [
41-
'error',
42-
{ minItems: 3 },
43-
],
4439
'quote-props': ['error', 'as-needed'],
45-
'object-curly-spacing': ['error', 'always', { objectsInObjects: false }],
46-
'no-multiple-empty-lines': [
47-
'error',
48-
{ max: 1 },
49-
],
40+
'no-multiple-empty-lines': ['error', { max: 1 }],
5041
'react/prop-types': 0, // TODO: Do we want this required?
5142
'lines-around-comment': [
5243
'error',
@@ -55,20 +46,6 @@ module.exports = {
5546
allowBlockStart: true,
5647
},
5748
],
58-
'object-curly-newline': [
59-
'error',
60-
{
61-
ObjectExpression: {
62-
consistent: true, multiline: true, minProperties: 3,
63-
},
64-
ObjectPattern: { consistent: true, multiline: true },
65-
ImportDeclaration: { multiline: true, minProperties: 3 },
66-
ExportDeclaration: {
67-
multiline: true,
68-
minProperties: 3,
69-
},
70-
},
71-
],
7249
},
73-
settings: { react: { version: 'detect' }},
50+
settings: { react: { version: 'detect' } },
7451
}
Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,65 @@
11
name: Build and test
22
on: [push, pull_request]
33
jobs:
4-
# TODO: create another job for integration testing that includes Cypress, booting up WPO, etc
5-
# Reference wp-cli: https://github.com/wp-cli/wp-cli/blob/master/.github/workflows/testing.yml
6-
unit: #-------------------------------------------
7-
name: PHP ${{ matrix.php }}
8-
runs-on: ubuntu-latest
9-
strategy:
10-
fail-fast: false
11-
matrix:
12-
php: ['7.4']
13-
steps:
14-
- name: Check out source code
15-
uses: actions/checkout@v2
16-
17-
- name: Setup PHP
18-
uses: shivammathur/setup-php@v2
19-
with:
20-
php-version: '${{ matrix.php }}'
21-
extensions: mysql, zip
22-
coverage: none
23-
tools: composer:v1, wp-cli, cs2pr, phpcs
24-
25-
- name: Get Composer cache directory
26-
id: composer-cache
27-
run: |
28-
echo "::set-output name=dir::$(composer config cache-files-dir)"
29-
30-
- name: Use Composer cache
31-
uses: actions/cache@master
32-
with:
33-
path: ${{ steps['composer-cache'].outputs.dir }}
34-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-composer-
37-
38-
- name: Install dependencies
39-
run: composer install --prefer-dist --no-progress --no-suggest
40-
41-
- name: Install PHPCS
42-
run: git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git ${{ github.workspace }}/wpcs
43-
44-
- name: PHPCS check
45-
run: |
46-
phpcs --config-set installed_paths ${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,${{ github.workspace }}/vendor/phpcompatibility/php-compatibility/PHPCompatibility,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieSodiumCompat,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat,${{ github.workspace }}/wpcs
47-
phpcs -i
48-
phpcs -q --report=checkstyle . | cs2pr
49-
50-
- name: Install NPM packages
51-
run: npm ci
52-
env:
53-
CYPRESS_INSTALL_BINARY: "0"
54-
55-
- name: Build assets
56-
run: npm run build
57-
58-
- name: Test JavaScript
59-
run: npm run test
60-
61-
- name: Lint JavaScript
62-
run: npm run lint
4+
# TODO: create another job for integration testing that includes Cypress, booting up WPO, etc
5+
# Reference wp-cli: https://github.com/wp-cli/wp-cli/blob/master/.github/workflows/testing.yml
6+
unit: #-------------------------------------------
7+
name: PHP ${{ matrix.php }}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php: ['7.4']
13+
steps:
14+
- name: Check out source code
15+
uses: actions/checkout@v2
16+
17+
- name: Setup PHP
18+
uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '${{ matrix.php }}'
21+
extensions: mysql, zip
22+
coverage: none
23+
tools: composer:v1, wp-cli, cs2pr, phpcs
24+
25+
- name: Get Composer cache directory
26+
id: composer-cache
27+
run: |
28+
echo "::set-output name=dir::$(composer config cache-files-dir)"
29+
30+
- name: Use Composer cache
31+
uses: actions/cache@master
32+
with:
33+
path: ${{ steps['composer-cache'].outputs.dir }}
34+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-composer-
37+
38+
- name: Install dependencies
39+
run: composer install --prefer-dist --no-progress --no-suggest
40+
41+
- name: Install PHPCS
42+
run: git clone -b master https://github.com/WordPress/WordPress-Coding-Standards.git ${{ github.workspace }}/wpcs
43+
44+
- name: PHPCS check
45+
run: |
46+
phpcs --config-set installed_paths ${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,${{ github.workspace }}/vendor/phpcompatibility/php-compatibility/PHPCompatibility,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieSodiumCompat,${{ github.workspace }}/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat,${{ github.workspace }}/wpcs
47+
phpcs -i
48+
phpcs -q --report=checkstyle . | cs2pr
49+
50+
- name: Install NPM packages
51+
run: npm ci
52+
env:
53+
CYPRESS_INSTALL_BINARY: '0'
54+
55+
- name: Lint JavaScript
56+
run: |
57+
npm run lint
58+
npm run lint
59+
npm run prettier
60+
61+
- name: Build assets
62+
run: npm run build
63+
64+
- name: Test JavaScript
65+
run: npm run test
Lines changed: 66 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,72 @@
11
name: Build development zip file
22
on: push
33
jobs:
4-
build:
5-
name: Build test, and zip
6-
runs-on: ubuntu-latest
7-
strategy:
8-
fail-fast: false
9-
matrix:
10-
php: [8.0]
11-
node-version: [14.x]
12-
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v1
4+
build:
5+
name: Build test, and zip
6+
runs-on: ubuntu-latest
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
php: [8.0]
11+
node-version: [14.x]
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v1
1515

16-
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
18-
with:
19-
php-version: '${{ matrix.php }}'
20-
tools: composer:v1
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '${{ matrix.php }}'
20+
tools: composer:v1
2121

22-
- name: Get Composer cache directory
23-
id: composer-cache
24-
run: |
25-
echo "::set-output name=dir::$(composer config cache-files-dir)"
26-
- name: Use Composer cache
27-
uses: actions/cache@master
28-
with:
29-
path: ${{ steps['composer-cache'].outputs.dir }}
30-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-composer-
33-
- name: Build autoloader
34-
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
22+
- name: Get Composer cache directory
23+
id: composer-cache
24+
run: |
25+
echo "::set-output name=dir::$(composer config cache-files-dir)"
26+
- name: Use Composer cache
27+
uses: actions/cache@master
28+
with:
29+
path: ${{ steps['composer-cache'].outputs.dir }}
30+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31+
restore-keys: |
32+
${{ runner.os }}-composer-
33+
- name: Build autoloader
34+
run: composer install --prefer-dist --no-progress --no-suggest --no-dev
3535

36-
- name: Using Node version ${{ matrix.node-version }}
37-
uses: actions/setup-node@v1
38-
with:
39-
node-version: ${{ matrix.node-version }}
40-
- name: npm install, build, and test
41-
run: |
42-
npm ci
43-
npm run dev
44-
touch .devbuild
45-
env:
46-
CI: true
47-
- name: Package
48-
uses: actions/upload-artifact@v2
49-
with:
50-
name: extendify-sdk
51-
retention-days: 5
52-
path: |
53-
${{ github.workspace }}/
54-
!${{ github.workspace }}/node_modules/
55-
!${{ github.workspace }}/.github/
56-
!${{ github.workspace }}/.git/
57-
!${{ github.workspace }}/src/
58-
!${{ github.workspace }}/.editorconfig
59-
!${{ github.workspace }}/.eslintrc.js
60-
!${{ github.workspace }}/.eslintignore
61-
!${{ github.workspace }}/.gitignore
62-
!${{ github.workspace }}/.svgrrc
63-
!${{ github.workspace }}/.prettierrc.js
64-
!${{ github.workspace }}/.phpcs.xml.dist
65-
!${{ github.workspace }}/webpack.config.js
66-
!${{ github.workspace }}/composer.json
67-
!${{ github.workspace }}/composer.lock
68-
!${{ github.workspace }}/package.json
69-
!${{ github.workspace }}/package-lock.json
70-
!${{ github.workspace }}/readme.md
36+
- name: Using Node version ${{ matrix.node-version }}
37+
uses: actions/setup-node@v1
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
- name: npm install, build, and test
41+
run: |
42+
npm ci
43+
npm run dev
44+
npm run lint
45+
npm run prettier
46+
touch .devbuild
47+
env:
48+
CI: true
49+
- name: Package
50+
uses: actions/upload-artifact@v2
51+
with:
52+
name: extendify-sdk
53+
retention-days: 5
54+
path: |
55+
${{ github.workspace }}/
56+
!${{ github.workspace }}/node_modules/
57+
!${{ github.workspace }}/.github/
58+
!${{ github.workspace }}/.git/
59+
!${{ github.workspace }}/src/
60+
!${{ github.workspace }}/.editorconfig
61+
!${{ github.workspace }}/.eslintrc.js
62+
!${{ github.workspace }}/.eslintignore
63+
!${{ github.workspace }}/.gitignore
64+
!${{ github.workspace }}/.svgrrc
65+
!${{ github.workspace }}/.prettierrc.js
66+
!${{ github.workspace }}/.phpcs.xml.dist
67+
!${{ github.workspace }}/webpack.config.js
68+
!${{ github.workspace }}/composer.json
69+
!${{ github.workspace }}/composer.lock
70+
!${{ github.workspace }}/package.json
71+
!${{ github.workspace }}/package-lock.json
72+
!${{ github.workspace }}/readme.md

0 commit comments

Comments
 (0)