Skip to content

Commit 82b6d1b

Browse files
authored
Merge pull request #116 from studiopress/update/analytics-and-copyright
Don't instantiate unused analytics client
2 parents a69ba3c + 5ed909d commit 82b6d1b

Some content is hidden

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

50 files changed

+90
-128
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ about: Report a problem
2626
## Additional information
2727

2828
## Suspected cause (optional)
29-
<!-- If you think you know what caused this bug -->
3029

3130
## Versions
3231

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!--- Please summarize this PR in the title above -->
22

3-
#### Changes
3+
## Changes
44
*
55

6-
#### Testing instructions
6+
## Testing instructions

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Changelog ##
22

3-
### 1.5.0 - Unreleased ###
3+
### 1.5.0 - 2022-03-24 ###
44

55
* Allow previewing InnerBlocks in the block editor. [PR 114](https://github.com/studiopress/genesis-custom-blocks/pull/114)
66
* Allow opting in to analytics. [PR 101](https://github.com/studiopress/genesis-custom-blocks/pull/101)

bin/pre-commit.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@
33
# Lint staged PHP files
44
php_files=$( git diff --diff-filter=d --staged --name-only | grep -E '/*\.php$' )
55
if [ ! -z "$php_files" ]; then
6-
npm run lint:php $php_files
7-
if [ $? != 0 ]; then
8-
exit 1
9-
fi
6+
npm run lint:php $php_files
7+
if [ $? != 0 ]; then
8+
exit 1
9+
fi
1010
fi
1111

1212
# Lint staged JS files
1313
js_files=$( git diff --diff-filter=d --staged --name-only | grep -E '^js\/\S*\.js$' )
1414
if [ ! -z "$js_files" ]; then
15-
npm run lint:js:files $js_files
16-
if [ $? != 0 ]; then
17-
exit 1
18-
fi
15+
npm run lint:js:files $js_files
16+
if [ $? != 0 ]; then
17+
exit 1
18+
fi
1919
fi
2020

2121
# Lint staged .scss files
2222
scss_files=$( git diff --diff-filter=d --staged --name-only | grep -E '/*\.scss$' )
2323
if [ -n "$scss_files" ]; then
24-
npm run lint:css:files $scss_files
25-
if [ $? != 0 ]; then
26-
exit 1
27-
fi
24+
npm run lint:css:files $scss_files
25+
if [ $? != 0 ]; then
26+
exit 1
27+
fi
2828
fi
2929

3030
# Lint package.json

bin/tag-built.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ npm ci
77
npm run gulp
88
tag=$(grep 'Version:' package/trunk/genesis-custom-blocks.php | sed 's/.*: //' | sed 's/-[0-9]\{8\}T[0-9]\{6\}Z-[a-f0-9]*$//')
99
if [[ -z "$tag" ]]; then
10-
echo "Error: Unable to determine tag."
11-
exit 1
10+
echo "Error: Unable to determine tag."
11+
exit 1
1212
fi
1313

1414
built_tag="$tag-built"
1515
if git rev-parse "$built_tag" >/dev/null 2>&1; then
16-
echo "Error: Built tag already exists: $built_tag"
17-
exit 2
16+
echo "Error: Built tag already exists: $built_tag"
17+
exit 2
1818
fi
1919

2020
git fetch origin --tags

genesis-custom-blocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Genesis Custom Blocks
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*
99
* Plugin Name: Genesis Custom Blocks

gulpfile.js

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,37 @@ gulp.task( 'wporg:trunk', function() {
6666
} );
6767

6868
gulp.task( 'clean:bundle', function() {
69+
const trunkDir = 'package/trunk';
70+
6971
return del( [
70-
'package/trunk/package',
71-
'package/trunk/artifacts',
72-
'package/trunk/assets/wporg',
73-
'package/trunk/coverage',
74-
'package/trunk/js/src',
75-
'package/trunk/js/*.map',
76-
'package/trunk/css/*.map',
77-
'package/trunk/css/src',
78-
'package/trunk/bin',
79-
'package/trunk/built',
80-
'package/trunk/node_modules',
81-
'package/trunk/tests',
82-
'package/trunk/trunk',
83-
'package/trunk/gulpfile.js',
84-
'package/trunk/Makefile',
85-
'package/trunk/package*.json',
86-
'package/trunk/phpunit.xml',
87-
'package/trunk/phpcs.xml',
88-
'package/trunk/postcss.config.js',
89-
'package/trunk/tailwind.config.js',
90-
'package/trunk/tsconfig.json',
91-
'package/trunk/README.md',
92-
'package/trunk/CHANGELOG.md',
93-
'package/trunk/CODE_OF_CONDUCT.md',
94-
'package/trunk/CONTRIBUTING.md',
95-
'package/trunk/webpack.config.js',
96-
'package/trunk/.github',
97-
'package/trunk/SHASUMS*',
72+
`${ trunkDir }/package`,
73+
`${ trunkDir }/artifacts`,
74+
`${ trunkDir }/assets/wporg`,
75+
`${ trunkDir }/coverage`,
76+
`${ trunkDir }/js/src`,
77+
`${ trunkDir }/js/*.map`,
78+
`${ trunkDir }/css/*.map`,
79+
`${ trunkDir }/css/src`,
80+
`${ trunkDir }/bin`,
81+
`${ trunkDir }/built`,
82+
`${ trunkDir }/node_modules`,
83+
`${ trunkDir }/tests`,
84+
`${ trunkDir }/trunk`,
85+
`${ trunkDir }/gulpfile.js`,
86+
`${ trunkDir }/Makefile`,
87+
`${ trunkDir }/package*.json`,
88+
`${ trunkDir }/phpunit.xml`,
89+
`${ trunkDir }/phpcs.xml`,
90+
`${ trunkDir }/postcss.config.js`,
91+
`${ trunkDir }/tailwind.config.js`,
92+
`${ trunkDir }/tsconfig.json`,
93+
`${ trunkDir }/README.md`,
94+
`${ trunkDir }/CHANGELOG.md`,
95+
`${ trunkDir }/CODE_OF_CONDUCT.md`,
96+
`${ trunkDir }/CONTRIBUTING.md`,
97+
`${ trunkDir }/webpack.config.js`,
98+
`${ trunkDir }/.github`,
99+
`${ trunkDir }/SHASUMS*`,
98100
'package/prepare',
99101
] );
100102
} );

js/src/block-editor/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ import { setLocaleData } from '@wordpress/i18n';
1111
*/
1212
import { addControls, registerBlocks } from './helpers';
1313
import { Edit } from './components';
14-
import { GAClient } from '../common/classes';
1514

1615
setLocaleData( { '': {} }, 'genesis-custom-blocks' );
1716
addFilter( 'genesisCustomBlocks.controls', 'genesisCustomBlocks/addControls', addControls );
1817

1918
// @ts-ignore
2019
registerBlocks( genesisCustomBlocks, gcbBlocks, Edit );
21-
22-
// @ts-ignore
23-
window.GcbAnalytics = {
24-
GAClient: new GAClient(),
25-
};

js/src/edit-block/components/field.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { useField } from '../hooks';
2323
* @property {import('./editor').Field} field The field to render.
2424
* @property {number} index The index in relation to other fields, starting with 0.
2525
* @property {boolean} isDownButtonDisabled Whether the down button is disabled.
26-
* @property {import('./editor').SelectedField|import('../constants').NoFieldSelected} selectedField The currenetly selected field.
26+
* @property {import('./editor').SelectedField|import('../constants').NoFieldSelected} selectedField The currently selected field.
2727
* @property {boolean} shouldDisplayMoveButtons Whether this should display the move buttons.
2828
* @property {import('./editor').SetIsNewField} setIsNewField Sets if there is a new field.
2929
* @property {import('./editor').SetPanelDisplaying} setPanelDisplaying Sets the current panel displaying.

php/Admin/Admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* WP Admin resources.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/Documentation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Genesis Custom Blocks Documentation.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/EditBlock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* The 'Edit Block' submenu page.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/Import.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Genesis Custom Blocks Importer.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/Onboarding.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* User onboarding.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/Settings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Genesis Custom Blocks Settings.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Admin/Upgrade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Genesis Custom Blocks Upgrade Page.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/BlockApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Block API helper functions.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Block.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Block.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Checkbox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Radio control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Color.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Color control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/ControlAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Control abstract.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/ControlSetting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* ControlSetting.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Email.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Email control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* File control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Image.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Image control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/InnerBlocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* InnerBlocks control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Multiselect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Select control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Number control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Radio.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Radio control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Range.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Range control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Select.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Select control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

php/Blocks/Controls/Text.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Text control.
44
*
55
* @package Genesis\CustomBlocks
6-
* @copyright Copyright(c) 2021, Genesis Custom Blocks
6+
* @copyright Copyright(c) 2022, Genesis Custom Blocks
77
* @license http://opensource.org/licenses/GPL-2.0 GNU General Public License, version 2 (GPL-2.0)
88
*/
99

0 commit comments

Comments
 (0)