From 1eab89e1ed7a913db5b7cfa3aece645236591397 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Fri, 15 Mar 2019 08:33:12 +0100 Subject: [PATCH 01/60] Prep for 2.9.1 dev cycle --- CHANGELOG.md | 3 +++ package.json | 2 +- style.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 01bc1300..037ff51d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Genesis Sample Theme Changelog +## Unreleased +* + ## [2.9.0] - 2019-03-14 Requires Genesis 2.9.0+. diff --git a/package.json b/package.json index 6bfbdf35..b4c19445 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "description": "The sample child theme for the Genesis Framework.", "author": "StudioPress", "authoruri": "https://www.studiopress.com/", - "version": "2.9.0", + "version": "2.9.1-dev", "tags": "one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready", "license": "GPL-2.0-or-later", "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", diff --git a/style.css b/style.css index 523ce260..1e175a67 100755 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Description: This is the sample theme created for the Genesis Framework. Author: StudioPress Author URI: https://www.studiopress.com/ -Version: 2.9.0 +Version: 2.9.1-dev Tags: accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks From 027347578d3e024e4fb59ea2ab8da608667b4858 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Fri, 15 Mar 2019 09:03:10 -0400 Subject: [PATCH 02/60] Correct imported plugin name --- config/onboarding.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/onboarding.php b/config/onboarding.php index 46a88864..780bae39 100644 --- a/config/onboarding.php +++ b/config/onboarding.php @@ -19,7 +19,7 @@ 'public_url' => 'https://atomicblocks.com/', ), array( - 'name' => __( 'WP Forms Lite', 'genesis-sample' ), + 'name' => __( 'WPForms Lite', 'genesis-sample' ), 'slug' => 'wpforms-lite/wpforms.php', 'public_url' => 'https://wordpress.org/plugins/wpforms-lite/', ), From ce5482c80c8e3bddc905ae9908837030bd3b09cd Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Fri, 15 Mar 2019 11:31:45 -0400 Subject: [PATCH 03/60] Update installed plugin list to include "Third Party" for those plugins --- config/onboarding.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/onboarding.php b/config/onboarding.php index 780bae39..69ed839c 100644 --- a/config/onboarding.php +++ b/config/onboarding.php @@ -19,19 +19,19 @@ 'public_url' => 'https://atomicblocks.com/', ), array( - 'name' => __( 'WPForms Lite', 'genesis-sample' ), - 'slug' => 'wpforms-lite/wpforms.php', - 'public_url' => 'https://wordpress.org/plugins/wpforms-lite/', + 'name' => __( 'Simple Social Icons', 'genesis-sample' ), + 'slug' => 'simple-social-icons/simple-social-icons.php', + 'public_url' => 'https://wordpress.org/plugins/simple-social-icons/', ), array( - 'name' => __( 'Genesis eNews Extended', 'genesis-sample' ), + 'name' => __( 'Genesis eNews Extended (Third Party)', 'genesis-sample' ), 'slug' => 'genesis-enews-extended/plugin.php', 'public_url' => 'https://wordpress.org/plugins/genesis-enews-extended/', ), array( - 'name' => __( 'Simple Social Icons', 'genesis-sample' ), - 'slug' => 'simple-social-icons/simple-social-icons.php', - 'public_url' => 'https://wordpress.org/plugins/simple-social-icons/', + 'name' => __( 'WPForms Lite (Third Party)', 'genesis-sample' ), + 'slug' => 'wpforms-lite/wpforms.php', + 'public_url' => 'https://wordpress.org/plugins/wpforms-lite/', ), ), ), From c30dba9cc7d8c12056a3805df72fcee5cee7646f Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Fri, 15 Mar 2019 11:35:03 -0400 Subject: [PATCH 04/60] Add Third Party to plugin information on imported contact page --- config/import/content/contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/import/content/contact.php b/config/import/content/contact.php index 2b167198..c69afb4c 100644 --- a/config/import/content/contact.php +++ b/config/import/content/contact.php @@ -14,6 +14,6 @@ return << -

Add a contact form to this page with the pre-installed WPForms Lite plugin. Learn how to create a form using WPForms.

+

Add a contact form to this page with the pre-installed WPForms Lite plugin (Third Party). Learn how to create a form using WPForms.

CONTENT; From 9d51e69610115dbba81e7308254ea251b02065dd Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 12:04:48 +0100 Subject: [PATCH 05/60] Add JavaScript linting using ESLint and WordPress standards Commands: - `npm run lint:js` to display JS coding violations - `npm run fix:js` to fix JS violations that can be auto-corrected. --- .eslintignore | 4 ++++ .eslintrc.js | 3 +++ package.json | 4 ++++ 3 files changed, 11 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc.js diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000..c47488d7 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,4 @@ +node_modules +vendor +*.min.js +js/responsive-menus.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..d9069555 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + "extends": "wordpress", +}; diff --git a/package.json b/package.json index b4c19445..367a9d4f 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,8 @@ "adm-zip": "^0.4.13", "autoprefixer": "^9.4.2", "chalk": "^2.4.1", + "eslint": "^5.15.2", + "eslint-config-wordpress": "^2.0.0", "node-wp-i18n": "^1.2.1", "npm-run-all": "^4.1.5", "postcss-cli": "^6.0.1", @@ -20,6 +22,8 @@ "autoprefixer": "postcss style.css lib/**/*.css --use autoprefixer --replace --no-map --verbose", "makepot": "node .scripts/makepot.js", "lint:css": "stylelint \"style.css\" \"lib/gutenberg/*.css\" \"lib/woocommerce/*.css\"", + "lint:js": "eslint .", + "fix:js": "eslint . --fix", "build:export-zip": "git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD", "build:md-to-txt": "node .scripts/md-to-txt.js", "zip": "run-s build:export-zip build:md-to-txt" From 2cea629e7a45d9c68af2581589abd2bf56a9fb5d Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 12:05:07 +0100 Subject: [PATCH 06/60] Update package lock --- package-lock.json | 559 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 559 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8c5bb8a3..d22c7b94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -207,6 +207,18 @@ "integrity": "sha512-yprFYuno9FtNsSHVlSWd+nRlmGoAbqbeCwOryP6sC/zoCjhpArcRMYp19EvpSUSizJAlsXEwJv+wcWS9XaXdMw==", "dev": true }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "adm-zip": { "version": "0.4.13", "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", @@ -225,6 +237,12 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -625,6 +643,12 @@ "integrity": "sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ==", "dev": true }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "chokidar": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", @@ -675,6 +699,21 @@ } } }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -854,6 +893,12 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -920,6 +965,15 @@ "path-type": "^3.0.0" } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-serializer": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.1.0.tgz", @@ -978,6 +1032,12 @@ "integrity": "sha512-UPV4NuQMKeUh1S0OWRvwg0PI8ASHN9kBC8yDTk1ROXLC85W5GnhTRu/MZu3Teqx3JjlQYuckuHYXSUSgtb3J+A==", "dev": true }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -1033,12 +1093,259 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.15.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.15.2.tgz", + "integrity": "sha512-I8VM4SILpMwUvsRt83bQVwIRQAJ2iPMXun1FVZ/lV1OHklH2tJaXqoDnNzdiFc6bnCtGKXvQIQNP3kj1eMskSw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.9.1", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^4.0.3", + "eslint-utils": "^1.3.1", + "eslint-visitor-keys": "^1.0.0", + "espree": "^5.0.1", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob": "^7.1.2", + "globals": "^11.7.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^6.2.2", + "js-yaml": "^3.12.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.11", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.2", + "path-is-inside": "^1.0.2", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^5.5.1", + "strip-ansi": "^4.0.0", + "strip-json-comments": "^2.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0" + }, + "dependencies": { + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "dependencies": { + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "table": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/table/-/table-5.2.3.tgz", + "integrity": "sha512-N2RsDAMvDLvYwFcwbPyF3VmVSSkuF+G1e+8inhBLtHpvwXGw4QRPEZhihQNeEN0i1up6/f6ObCJXNdlRG3YVyQ==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + } + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + } + } + }, + "eslint-config-wordpress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-wordpress/-/eslint-config-wordpress-2.0.0.tgz", + "integrity": "sha1-UgEgbGlk1kgxUjLt9t+9LpJeTNY=", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -1140,6 +1447,17 @@ } } }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -1231,6 +1549,21 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, "file-entry-cache": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", @@ -1285,6 +1618,12 @@ "write": "^0.2.1" } }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -1871,6 +2210,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -2210,6 +2555,55 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "inquirer": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.2.tgz", + "integrity": "sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==", + "dev": true, + "requires": { + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", + "cli-cursor": "^2.1.0", + "cli-width": "^2.0.0", + "external-editor": "^3.0.3", + "figures": "^2.0.0", + "lodash": "^4.17.11", + "mute-stream": "0.0.7", + "run-async": "^2.2.0", + "rxjs": "^6.4.0", + "string-width": "^2.1.0", + "strip-ansi": "^5.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -2425,6 +2819,12 @@ "isobject": "^3.0.1" } }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -2531,6 +2931,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -2582,6 +2988,16 @@ "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA=", "dev": true }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "load-json-file": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", @@ -2834,6 +3250,12 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "nan": { "version": "2.11.1", "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", @@ -2860,6 +3282,12 @@ "to-regex": "^3.0.1" } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3031,6 +3459,29 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "os-locale": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", @@ -3090,6 +3541,23 @@ "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", "dev": true }, + "parent-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.0.tgz", + "integrity": "sha512-8Mf5juOMmiE4FcmzYc4IaiS9L3+9paz2KOiXzkRviCP6aDmN49Hz6EMWz0lGNp9pX80GvvAuLADtyGfW/Em3TA==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.0.0.tgz", + "integrity": "sha512-tWnkwu9YEq2uzlBDI4RcLn8jrFvF9AOi8PxDNU3hZZjJcjkcRAq3vCI+vZcg1SuxISDYe86k9VZFwAxDiJGoAw==", + "dev": true + } + } + }, "parse-entities": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-1.2.0.tgz", @@ -3144,6 +3612,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -3343,6 +3817,12 @@ "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", "dev": true }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -3355,6 +3835,12 @@ "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3496,6 +3982,12 @@ "safe-regex": "^1.1.0" } }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "remark": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/remark/-/remark-9.0.0.tgz", @@ -3625,6 +4117,16 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -3640,6 +4142,24 @@ "glob": "^7.0.5" } }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.4.0.tgz", + "integrity": "sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4033,6 +4553,12 @@ "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", "dev": true }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "style-search": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", @@ -4236,6 +4762,18 @@ "string-width": "^2.1.1" } }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", @@ -4323,6 +4861,21 @@ "integrity": "sha512-fwkLWH+DimvA4YCy+/nvJd61nWQQ2liO/nF/RjkTpiOGi+zxZzVkhb1mvbHIIW4b/8nDsYI8uTmAlc0nNkRMOw==", "dev": true }, + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "unherit": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unherit/-/unherit-1.1.1.tgz", @@ -4567,6 +5120,12 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", From fdb94ecdff6bc2d8924fea92a1fcec1469740ac9 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 12:06:47 +0100 Subject: [PATCH 07/60] Exclude ESLint config files during git archive in `npm run zip` --- .gitattributes | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitattributes b/.gitattributes index 995351c6..98a64d2b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -26,6 +26,8 @@ # Omit during export. .editorconfig export-ignore +.eslintignore export-ignore +.eslintrc.js export-ignore .gitattributes export-ignore .gitignore export-ignore .scripts/ export-ignore From 3efc2719765a3b0d5d0bdbc74bd53306505f2855 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 12:09:29 +0100 Subject: [PATCH 08/60] Lint theme JavaScript to WP standards --- js/genesis-sample.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/genesis-sample.js b/js/genesis-sample.js index e819d7c1..8d600de9 100644 --- a/js/genesis-sample.js +++ b/js/genesis-sample.js @@ -17,11 +17,11 @@ var genesisSample = ( function( $ ) { var moveContentBelowFixedHeader = function() { var siteInnerMarginTop = 0; - if( $('.site-header').css('position') === 'fixed' ) { - siteInnerMarginTop = $('.site-header').outerHeight(); + if ( 'fixed' === $( '.site-header' ).css( 'position' ) ) { + siteInnerMarginTop = $( '.site-header' ).outerHeight(); } - $('.site-inner').css('margin-top', siteInnerMarginTop); + $( '.site-inner' ).css( 'margin-top', siteInnerMarginTop ); }, /** @@ -34,17 +34,17 @@ var genesisSample = ( function( $ ) { load = function() { moveContentBelowFixedHeader(); - $( window ).resize(function() { + $( window ).resize( function() { moveContentBelowFixedHeader(); }); // Run after the Customizer updates. // 1.5s delay is to allow logo area reflow. - if (typeof wp != "undefined" && typeof wp.customize != "undefined") { - wp.customize.bind( 'change', function ( setting ) { - setTimeout(function() { + if ( 'undefined' != typeof wp && 'undefined' != typeof wp.customize ) { + wp.customize.bind( 'change', function( setting ) { + setTimeout( function() { moveContentBelowFixedHeader(); - }, 1500); + }, 1500 ); }); } }; @@ -54,6 +54,6 @@ var genesisSample = ( function( $ ) { load: load }; -})( jQuery ); +}( jQuery ) ); jQuery( window ).on( 'load', genesisSample.load ); From 338ded7f38d5325d29ffb0a89e7dc9dd8c1cad08 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 12:13:40 +0100 Subject: [PATCH 09/60] Update README to mention new ESLint commands Also added a note about the updated zip script. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a9e3c6d..a8d33b66 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ You can then type any of these commands: - `npm run autoprefixer` to add and remove vendor prefixes in `style.css`. - `npm run makepot` to regenerate the `languages/genesis-sample.pot` file. - `npm run lint:css` to generate a report of style violations for `style.css`. +- `npm run lint:js` to generate a report of style violations for JavaScript files. +- `npm run fix:js` to fix any JavaScript style violations that can be corrected automatically. - `npm run zip` to create a genesis-sample.zip of the current branch. Excludes files marked export-ignore in `.gitattributes`. ### Packaging for distribution @@ -47,4 +49,4 @@ You can then type any of these commands: 3. Bump version numbers manually and commit those changes. 4. Type `npm run zip` to create `genesis-sample.zip`. Files marked export-ignore in `.gitattributes` are excluded from the zip. -The `zip` command is an alias for `git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD`. +The `zip` command is an alias for `git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD`. The `zip` command also includes a script to rename certain Markdown files to `.txt` files within the created zip file. From bc1a43cdd9846700c07f2e032c8187a99ae79e05 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 11:49:40 +0100 Subject: [PATCH 10/60] Add GitHub issue templates Based on @dreamwhisper's work for StudioPress themes. Also adds a note to remind us to lint code prior to release. --- .github/ISSUE_TEMPLATE/bug-report.md | 32 +++++++++++++++++++ .github/ISSUE_TEMPLATE/general-issue-blank.md | 10 ++++++ .github/ISSUE_TEMPLATE/release.md | 23 +++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/general-issue-blank.md create mode 100644 .github/ISSUE_TEMPLATE/release.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 00000000..940bc92b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** + + +**To reproduce** +Steps to reproduce the behavior: +1. +2. +3. +4. + +**Expected behavior** + + +**Screenshots** + + +**System information (please complete)** + - OS + - Browser + - Version + + +**Additional context** diff --git a/.github/ISSUE_TEMPLATE/general-issue-blank.md b/.github/ISSUE_TEMPLATE/general-issue-blank.md new file mode 100644 index 00000000..f1740ef3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/general-issue-blank.md @@ -0,0 +1,10 @@ +--- +name: General issue (blank) +about: '' +title: '' +labels: '' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md new file mode 100644 index 00000000..e107b781 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/release.md @@ -0,0 +1,23 @@ +--- +name: Release +about: Checklist to ensure release tasks are completed +title: 'Release: Version x.x.x' +labels: '' +assignees: '' + +--- + +**Update version** +- [ ] style.css +- [ ] package.json +- [ ] .pot file (regenerate) +- [ ] Changelog (include changes) + +**Check standards** +- [ ] Lint PHP (`composer install` then `composer phpcs`) +- [ ] Lint CSS (`npm install` then `npm run lint:css`) + +**Final release** +- [ ] PR to merge Develop to Master +- [ ] Create zip from Master (`npm run zip`) +- [ ] Tag release and include zip From 2bcb0d65dedea0195b4990db771f44788ef38696 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 11:51:12 +0100 Subject: [PATCH 11/60] Exclude .github directory during `npm run zip` --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 98a64d2b..57f0de33 100644 --- a/.gitattributes +++ b/.gitattributes @@ -30,6 +30,7 @@ .eslintrc.js export-ignore .gitattributes export-ignore .gitignore export-ignore +.github/ export-ignore .scripts/ export-ignore .stylelintrc.json export-ignore composer.json export-ignore From f163f538af928d9c44edc230735e1cebf6b11d50 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 13:07:19 +0100 Subject: [PATCH 12/60] Add step to lint JavaScript --- .github/ISSUE_TEMPLATE/release.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index e107b781..38f57f02 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -16,6 +16,7 @@ assignees: '' **Check standards** - [ ] Lint PHP (`composer install` then `composer phpcs`) - [ ] Lint CSS (`npm install` then `npm run lint:css`) +- [ ] Lint JS (`npm install` then `npm run lint:js`) **Final release** - [ ] PR to merge Develop to Master From f4dd37d33cf88bd7bc48f06b86f401f8ec2202ab Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 11:35:38 +0100 Subject: [PATCH 13/60] Add contributing guidelines Fixes #120. --- CONTRIBUTING.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..2bc2cd77 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing + +Genesis Sample is a starter child theme for people making websites with the [Genesis Framework](https://my.studiopress.com/themes/genesis/) for WordPress. Thank you for your interest in contributing! + +## File issues + +Contribute bug reports and feature suggestions as [GitHub Issues](https://github.com/studiopress/genesis-sample/issues). + +## Contribute code + +We recommend that you first [create an issue](https://github.com/studiopress/genesis-sample/issues/new) to propose major changes before working on them. + +[Fork](https://help.github.com/en/articles/fork-a-repo) the [Genesis Sample repository](https://github.com/studiopress/genesis-sample) to your own GitHub account, then clone it to work on locally: + + git clone git@github.com:you-username/genesis-sample.git + +Create a new branch to work on your changes. New branches should be forked from the `develop` branch. + + git checkout -b feature/your-new-feature + +Make your changes and commit your code. + +When you're ready, [create a pull request](https://github.com/studiopress/genesis-sample/pulls) to outline and contribute your changes. + +To increase the chance that your pull request is accepted: + +* Lint your code to check that it conforms to WordPress standards. Learn more about the [developer tooling to help lint your code](https://github.com/studiopress/genesis-sample#for-developers). +* Do not increment the child theme version as part of your pull request. We'll take care of this for you prior to each release. +* Describe what problems your code solves or what improvements it brings in your commit messages or pull request text. From ba6e6d491cd96abdc13bcf0fda1d616055dea1de Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 11:38:46 +0100 Subject: [PATCH 14/60] Convert contributing.md to txt file when zipping theme for distribution --- .scripts/md-to-txt.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.scripts/md-to-txt.js b/.scripts/md-to-txt.js index aaa11277..be4dd860 100644 --- a/.scripts/md-to-txt.js +++ b/.scripts/md-to-txt.js @@ -24,6 +24,10 @@ for (let entry of zipEntries) { newZip.addFile(`${themeSlug}/CHANGELOG.txt`, zip.readAsText(entry.entryName)); newZip.deleteFile(entry.entryName); } + if (entry.entryName === `${themeSlug}/CONTRIBUTING.md`) { + newZip.addFile(`${themeSlug}/CONTRIBUTING.txt`, zip.readAsText(entry.entryName)); + newZip.deleteFile(entry.entryName); + } } newZip.writeZip(); // Overwrites existing zip. From aeffff5bc9a46fe15eaaf0830a9da73e6e73fb02 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 10:42:51 +0100 Subject: [PATCH 15/60] Correct wide and full width table blocks Props @dreamwhisper for the alignwide fix. Fixes #202. --- lib/gutenberg/front-end.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css index 184aed58..6ac0b735 100644 --- a/lib/gutenberg/front-end.css +++ b/lib/gutenberg/front-end.css @@ -346,6 +346,25 @@ hr.wp-block-separator { padding-left: 0; } +.full-width-content .site-container .wp-block-table.alignfull { + margin: 0; + width: 100%; +} + +@media only screen and (min-width: 960px) { + + .full-width-content .site-container .wp-block-table.alignwide { + width: calc(100% + 360px); + } + + .full-width-content .site-container .wp-block-table.alignfull { + margin-left: calc(-98vw / 2 + 100% / 2); + margin-right: calc(-98vw / 2 + 100% / 2); + width: 98vw; + } + +} + @media only screen and (max-width: 600px) { .wp-block-media-text.is-stacked-on-mobile figure { From 67695db885d21a2cfcbe0bff1ca224c49e2c7c92 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 14:52:26 +0100 Subject: [PATCH 16/60] Remove blank issue template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This template isn't appearing at https://github.com/studiopress/genesis-sample/issues/new/choose, possibly because I cleared the about meta from the original. It seems safe to remove, though, as GitHub already provides an “Open a regular issue” link at the bottom of https://github.com/studiopress/genesis-sample/issues/new/choose. --- .github/ISSUE_TEMPLATE/general-issue-blank.md | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/general-issue-blank.md diff --git a/.github/ISSUE_TEMPLATE/general-issue-blank.md b/.github/ISSUE_TEMPLATE/general-issue-blank.md deleted file mode 100644 index f1740ef3..00000000 --- a/.github/ISSUE_TEMPLATE/general-issue-blank.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: General issue (blank) -about: '' -title: '' -labels: '' -assignees: '' - ---- - - From 2c3b256486f58f0d249cd030b64b0b3bb3ce8580 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 17:44:27 +0100 Subject: [PATCH 17/60] Bump version to 2.9.1 --- package.json | 2 +- style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 367a9d4f..a7f6a9db 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "description": "The sample child theme for the Genesis Framework.", "author": "StudioPress", "authoruri": "https://www.studiopress.com/", - "version": "2.9.1-dev", + "version": "2.9.1", "tags": "one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready", "license": "GPL-2.0-or-later", "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", diff --git a/style.css b/style.css index 1e175a67..bd4ce577 100755 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Description: This is the sample theme created for the Genesis Framework. Author: StudioPress Author URI: https://www.studiopress.com/ -Version: 2.9.1-dev +Version: 2.9.1 Tags: accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks From f756698fdcd05fc93faf8bcfa0c47c42dabfa553 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 17:46:45 +0100 Subject: [PATCH 18/60] Update language file --- languages/genesis-sample.pot | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/languages/genesis-sample.pot b/languages/genesis-sample.pot index 39586946..9ecdbb30 100644 --- a/languages/genesis-sample.pot +++ b/languages/genesis-sample.pot @@ -2,9 +2,9 @@ # This file is distributed under the GPL-2.0-or-later.=!> msgid "" msgstr "" -"Project-Id-Version: Genesis Sample 2.9.0\n" +"Project-Id-Version: Genesis Sample 2.9.1\n" "Report-Msgid-Bugs-To: StudioPress \n" -"POT-Creation-Date: 2019-03-14 11:40:45+00:00\n" +"POT-Creation-Date: 2019-03-18 16:45:28+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -60,15 +60,15 @@ msgid "Atomic Blocks" msgstr "" #: config/onboarding.php:22 -msgid "WP Forms Lite" +msgid "Simple Social Icons" msgstr "" #: config/onboarding.php:27 -msgid "Genesis eNews Extended" +msgid "Genesis eNews Extended (Third Party)" msgstr "" #: config/onboarding.php:32 -msgid "Simple Social Icons" +msgid "WPForms Lite (Third Party)" msgstr "" #: functions.php:113 @@ -160,4 +160,4 @@ msgstr "" #. Template Name of the plugin/theme msgid "Landing" -msgstr "" +msgstr "" \ No newline at end of file From 7e16324b4402eae2b1c6c11a8039ea0ceac11bc4 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 18 Mar 2019 17:57:08 +0100 Subject: [PATCH 19/60] Add changelog for 2.9.1 --- CHANGELOG.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 037ff51d..79a2d882 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,13 @@ # Genesis Sample Theme Changelog -## Unreleased -* +## [2.9.1] - 2019-03-19 +* Added: Contributing guidelines. +* Added: Tooling to lint JavaScript to WordPress coding standards (`npm run lint:js` and `npm run fix:js`). +* Added: GitHub issue templates (in the theme’s GitHub repository only). +* Added: `editor-style`, `block-styles` and `wide-blocks` Block Editor tags to theme stylesheet header. +* Changed: Fixed wide and full width table block styling to display correctly on the front end. +* Changed: Linted theme JavaScript to WordPress standards. +* Changed: Marked third party plugins with “(Third Party)” in `config/onboarding.php`. ## [2.9.0] - 2019-03-14 Requires Genesis 2.9.0+. From e06275b3d0904823c1962ccc2f62a3c69a936508 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Tue, 19 Mar 2019 10:38:15 +0100 Subject: [PATCH 20/60] Prep for 2.9.2-dev cycle --- CHANGELOG.md | 3 +++ package.json | 2 +- style.css | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79a2d882..6ea03408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Genesis Sample Theme Changelog +## [Unreleased] +* + ## [2.9.1] - 2019-03-19 * Added: Contributing guidelines. * Added: Tooling to lint JavaScript to WordPress coding standards (`npm run lint:js` and `npm run fix:js`). diff --git a/package.json b/package.json index a7f6a9db..c2a69f61 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "description": "The sample child theme for the Genesis Framework.", "author": "StudioPress", "authoruri": "https://www.studiopress.com/", - "version": "2.9.1", + "version": "2.9.2-dev", "tags": "one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready", "license": "GPL-2.0-or-later", "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", diff --git a/style.css b/style.css index bd4ce577..81356423 100755 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Description: This is the sample theme created for the Genesis Framework. Author: StudioPress Author URI: https://www.studiopress.com/ -Version: 2.9.1 +Version: 2.9.2-dev Tags: accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks From b3137f9280ce444fcb96e7100a458a9c026a97a7 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Wed, 27 Mar 2019 10:01:03 -0400 Subject: [PATCH 21/60] Prevent empty buttons from collapsing in editor --- lib/gutenberg/style-editor.css | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/gutenberg/style-editor.css b/lib/gutenberg/style-editor.css index b28ff22f..dd7acbf0 100755 --- a/lib/gutenberg/style-editor.css +++ b/lib/gutenberg/style-editor.css @@ -338,7 +338,6 @@ hr.wp-block-separator.is-style-dots { text-align: center; text-decoration: none; white-space: normal; - width: auto; } .wp-block-button.is-style-squared .wp-block-button__link { From c25d8b0ea831d153168b0c33bb55dd426d8eef1e Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Wed, 27 Mar 2019 11:20:17 -0400 Subject: [PATCH 22/60] Fix column CSS selectors --- lib/gutenberg/front-end.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css index 6ac0b735..1dfbe2bc 100644 --- a/lib/gutenberg/front-end.css +++ b/lib/gutenberg/front-end.css @@ -390,16 +390,16 @@ hr.wp-block-separator { @media only screen and (min-width: 600px) { - .entry .site-container .wp-block-columns { + .site-container .wp-block-columns { flex-wrap: nowrap; } - .entry .site-container .wp-block-columns[class*="has-"] > * { + .site-container .wp-block-columns[class*="has-"] > * { margin-right: 36px; margin-left: 0; } - .entry .site-container .wp-block-columns[class*="has-"] > *:last-child { + .site-container .wp-block-columns[class*="has-"] > *:last-child { margin-right: 0; } @@ -407,11 +407,11 @@ hr.wp-block-separator { @media only screen and (min-width: 768px) { - .entry .site-container .wp-block-columns .wp-block-column > *:first-child { + .site-container .wp-block-columns .wp-block-column > *:first-child { margin-top: 0; } - .entry .site-container .wp-block-columns .wp-block-column > *:last-child { + .site-container .wp-block-columns .wp-block-column > *:last-child { margin-bottom: 0; } From 7c6c3f9531e680d6813681e43a398623714125b3 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Wed, 27 Mar 2019 11:29:04 -0400 Subject: [PATCH 23/60] Add class for homepage contact button --- config/import/content/homepage.php | 2 +- lib/gutenberg/front-end.css | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/import/content/homepage.php b/config/import/content/homepage.php index 580b1a05..7d5b0c2c 100644 --- a/config/import/content/homepage.php +++ b/config/import/content/homepage.php @@ -86,7 +86,7 @@ diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css index 1dfbe2bc..90f41300 100644 --- a/lib/gutenberg/front-end.css +++ b/lib/gutenberg/front-end.css @@ -90,9 +90,9 @@ h6.light { width: 100%; } -@media only screen and (max-width: 510px) { +@media only screen and (max-width: 600px) { - .wp-block-button.alignright { + .wp-block-button.home-contact { float: left; margin-left: 0; } From e74a1c4434e66b8e75682f3222ed7ffc3db3cefc Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 28 Mar 2019 14:33:40 -0400 Subject: [PATCH 24/60] Do not set last-translator and language-team headers in POT file See https://github.com/studiopress/genesis/pull/2139#discussion_r250886549 --- .scripts/makepot.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.scripts/makepot.js b/.scripts/makepot.js index 176627b9..8993feb8 100644 --- a/.scripts/makepot.js +++ b/.scripts/makepot.js @@ -14,9 +14,7 @@ wpi18n.makepot( potHeaders: { 'poedit': true, 'x-poedit-basepath': '..', - 'report-msgid-bugs-to': 'StudioPress ', - 'last-translator': 'StudioPress ', - 'language-team': 'StudioPress ' + 'report-msgid-bugs-to': 'StudioPress ' } } ).then( From c3cf9aed6319ce2fcccf3ef5972a7dc07e2fc61c Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 28 Mar 2019 12:33:54 -0400 Subject: [PATCH 25/60] Remove link in hidden title when custom logo is in use --- functions.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/functions.php b/functions.php index 91eb0cd7..f022adfa 100755 --- a/functions.php +++ b/functions.php @@ -138,6 +138,30 @@ function genesis_sample_responsive_menu_settings() { // Adds custom logo in Customizer > Site Identity. add_theme_support( 'custom-logo', genesis_get_config( 'custom-logo' ) ); +add_filter( 'genesis_seo_title', 'genesis_sample_header_title', 10, 3 ); +/** + * Removes the link from the hidden site title if a custom logo is in use. + * + * Without this filter, the site title is hidden with CSS when a custom logo + * is in use, but the link it contains is still accessible by keyboard. + * + * @since 1.2.0 + * + * @param string $title The full title. + * @param string $inside The content inside the title element. + * @param string $wrap The wrapping element name, such as h1. + * @return string The site title with anchor removed if a custom logo is active. + */ +function genesis_sample_header_title( $title, $inside, $wrap ) { + + if ( has_custom_logo() ) { + $inside = get_bloginfo( 'name' ); + } + + return sprintf( '<%1$s class="site-title">%2$s', $wrap, $inside ); + +} + // Renames primary and secondary navigation menus. add_theme_support( 'genesis-menus', genesis_get_config( 'menus' ) ); From 5494e93e2971513bce00e112113425f0e4a919c4 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:18:38 +0200 Subject: [PATCH 26/60] Remove old Markdown to txt script Changing filenames for production will be handled by the makezip.js script. --- .scripts/md-to-txt.js | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .scripts/md-to-txt.js diff --git a/.scripts/md-to-txt.js b/.scripts/md-to-txt.js deleted file mode 100644 index be4dd860..00000000 --- a/.scripts/md-to-txt.js +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env node - -// This script renames the Markdown files in the generated zip file to use a -// .txt extension. This is useful to adhere to WordPress theme standards and -// to reduce support requests asking what an `.md` file is. - -const chalk = require('chalk'); -const admzip = require('adm-zip'); - -console.log(chalk`{cyan Renaming .md files to .txt files inside the zip}...`); - -// Create a zip object to manipulate the existing zip file. -const zip = new admzip(`${process.env.npm_package_name}.zip`); -const newZip = new admzip(`${process.env.npm_package_name}.zip`); -const zipEntries = zip.getEntries(); -const themeSlug = process.env.npm_package_name; - -for (let entry of zipEntries) { - if (entry.entryName === `${themeSlug}/README.md`) { - newZip.addFile(`${themeSlug}/README.txt`, zip.readAsText(entry.entryName)); - newZip.deleteFile(entry.entryName); - } - if (entry.entryName === `${themeSlug}/CHANGELOG.md`) { - newZip.addFile(`${themeSlug}/CHANGELOG.txt`, zip.readAsText(entry.entryName)); - newZip.deleteFile(entry.entryName); - } - if (entry.entryName === `${themeSlug}/CONTRIBUTING.md`) { - newZip.addFile(`${themeSlug}/CONTRIBUTING.txt`, zip.readAsText(entry.entryName)); - newZip.deleteFile(entry.entryName); - } -} - -newZip.writeZip(); // Overwrites existing zip. - -console.log(chalk`{cyan Done renaming .md files to .txt. Please test the new zip file}...`); From 6ffece0f8e28266f294125fcdb70c4a2ec4bfdd3 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:19:05 +0200 Subject: [PATCH 27/60] Update dependencies to use archiver instead of adm-zip --- package-lock.json | 268 ++++++++++++++++++++++++++++++++++++++++++++-- package.json | 4 +- 2 files changed, 262 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index d22c7b94..5b4d86f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -219,12 +219,6 @@ "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", "dev": true }, - "adm-zip": { - "version": "0.4.13", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.13.tgz", - "integrity": "sha512-fERNJX8sOXfel6qCBCMPvZLzENBEhZTzKqg6vrOW5pvoEaQuJhRU4ndTAh6lHOxn1I6jnz2NHra56ZODM751uw==", - "dev": true - }, "ajv": { "version": "6.6.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", @@ -268,6 +262,49 @@ "normalize-path": "^2.1.1" } }, + "archiver": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/archiver/-/archiver-3.0.0.tgz", + "integrity": "sha512-5QeR6Xc5hSA9X1rbQfcuQ6VZuUXOaEdB65Dhmk9duuRJHYif/ZyJfuyJqsQrj34PFjU5emv5/MmfgA8un06onw==", + "dev": true, + "requires": { + "archiver-utils": "^2.0.0", + "async": "^2.0.0", + "buffer-crc32": "^0.2.1", + "glob": "^7.0.0", + "readable-stream": "^2.0.0", + "tar-stream": "^1.5.0", + "zip-stream": "^2.0.1" + } + }, + "archiver-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/archiver-utils/-/archiver-utils-2.0.0.tgz", + "integrity": "sha512-JRBgcVvDX4Mwu2RBF8bBaHcQCSxab7afsxAPYDQ5W+19quIPP5CfKE7Ql+UHs9wYvwsaNR8oDuhtf5iqrKmzww==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "graceful-fs": "^4.1.0", + "lazystream": "^1.0.0", + "lodash.assign": "^4.2.0", + "lodash.defaults": "^4.2.0", + "lodash.difference": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.isplainobject": "^4.0.6", + "lodash.toarray": "^4.4.0", + "lodash.union": "^4.6.0", + "normalize-path": "^3.0.0", + "readable-stream": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -358,6 +395,15 @@ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", "dev": true }, + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", @@ -464,12 +510,28 @@ } } }, + "base64-js": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", + "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==", + "dev": true + }, "binary-extensions": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", "dev": true }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, "bluebird": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", @@ -526,6 +588,44 @@ "node-releases": "^1.0.5" } }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "dev": true, + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==", + "dev": true + }, + "buffer-crc32": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", + "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=", + "dev": true + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=", + "dev": true + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -778,6 +878,18 @@ "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", "dev": true }, + "compress-commons": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/compress-commons/-/compress-commons-1.2.2.tgz", + "integrity": "sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8=", + "dev": true, + "requires": { + "buffer-crc32": "^0.2.1", + "crc32-stream": "^2.0.0", + "normalize-path": "^2.0.0", + "readable-stream": "^2.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -817,6 +929,25 @@ "require-from-string": "^2.0.1" } }, + "crc": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.8.0.tgz", + "integrity": "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ==", + "dev": true, + "requires": { + "buffer": "^5.1.0" + } + }, + "crc32-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crc32-stream/-/crc32-stream-2.0.0.tgz", + "integrity": "sha1-483TtN8xaN10494/u8t7KX/pCPQ=", + "dev": true, + "requires": { + "crc": "^3.4.4", + "readable-stream": "^2.0.0" + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -1047,6 +1178,15 @@ "iconv-lite": "~0.4.13" } }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", @@ -1639,6 +1779,12 @@ "map-cache": "^0.2.2" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, "fs-extra": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", @@ -2475,6 +2621,12 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, "ignore": { "version": "3.3.10", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", @@ -2904,9 +3056,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz", + "integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2973,6 +3125,15 @@ "integrity": "sha512-OMPb86bpVbnKN/2VJw1Ggs1Hw/FNGwEL1QYiNIEHaB5FSLybJ4QD7My5Hm9yDhgpRrRnnOgu0oKeuuABzASeBw==", "dev": true }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -3026,12 +3187,54 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, + "lodash.assign": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz", + "integrity": "sha1-DZnzzNem0mHRm9rrkkUAXShYCOc=", + "dev": true + }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, + "lodash.defaults": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", + "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=", + "dev": true + }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.toarray": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.toarray/-/lodash.toarray-4.4.0.tgz", + "integrity": "sha1-JMS/zWsvuji/0FlNsRedjptlZWE=", + "dev": true + }, + "lodash.union": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", + "integrity": "sha1-SLtQiECfFvGCFmZkHETdGqrjzYg=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -3823,6 +4026,12 @@ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, + "pretty-bytes": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", + "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", + "dev": true + }, "pretty-hrtime": { "version": "1.0.3", "resolved": "http://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", @@ -3962,6 +4171,15 @@ "readable-stream": "^2.0.2" } }, + "recursive-readdir": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz", + "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==", + "dev": true, + "requires": { + "minimatch": "3.0.4" + } + }, "redent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", @@ -4762,6 +4980,21 @@ "string-width": "^2.1.1" } }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -4783,6 +5016,12 @@ "os-tmpdir": "~1.0.2" } }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==", + "dev": true + }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -5240,6 +5479,17 @@ "requires": { "camelcase": "^4.1.0" } + }, + "zip-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-2.0.1.tgz", + "integrity": "sha512-c+eUhhkDpaK87G/py74wvWLtz2kzMPNCCkUApkun50ssE0oQliIQzWpTnwjB+MTKVIf2tGzIgHyqW/Y+W77ecQ==", + "dev": true, + "requires": { + "archiver-utils": "^2.0.0", + "compress-commons": "^1.2.0", + "readable-stream": "^2.0.0" + } } } } diff --git a/package.json b/package.json index c2a69f61..540f2e09 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ }, "license": "GPL-2.0-or-later", "devDependencies": { - "adm-zip": "^0.4.13", + "archiver": "^3.0.0", "autoprefixer": "^9.4.2", "chalk": "^2.4.1", "eslint": "^5.15.2", @@ -15,6 +15,8 @@ "node-wp-i18n": "^1.2.1", "npm-run-all": "^4.1.5", "postcss-cli": "^6.0.1", + "pretty-bytes": "^5.1.0", + "recursive-readdir": "^2.2.2", "stylelint": "^9.9.0", "stylelint-config-wordpress": "^13.1.0" }, From 5cee0b60fefa84b87803cf6df270bcc4f47efbe6 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:19:33 +0200 Subject: [PATCH 28/60] Use makezip.js to package zip files for distribution --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 540f2e09..1e9bfdf8 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,7 @@ "lint:css": "stylelint \"style.css\" \"lib/gutenberg/*.css\" \"lib/woocommerce/*.css\"", "lint:js": "eslint .", "fix:js": "eslint . --fix", - "build:export-zip": "git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD", - "build:md-to-txt": "node .scripts/md-to-txt.js", - "zip": "run-s build:export-zip build:md-to-txt" + "zip": "node .scripts/makezip.js" }, "browserslist": [ "> 1%", From 057e816febb9c31fca37ed3f509600798ad7a83c Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:19:49 +0200 Subject: [PATCH 29/60] Add new script to zip files for production --- .scripts/makezip.js | 128 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 .scripts/makezip.js diff --git a/.scripts/makezip.js b/.scripts/makezip.js new file mode 100644 index 00000000..015af8cf --- /dev/null +++ b/.scripts/makezip.js @@ -0,0 +1,128 @@ +#!/usr/bin/env node + +// Creates a zip file for distribution, excluding development and system files. +// Using this instead of `git archive` for greater control, and to avoid an +// issue with some applications (such as Path Finder) incorrectly decompressing +// archives created by git archive with the `--prefix` flag. +// +// Also renames some .md files to .txt to reduce support requests. + +const fs = require("fs"); +const path = require("path"); + +const chalk = require("chalk"); +const archiver = require("archiver"); +const recursive = require("recursive-readdir"); +const prettyBytes = require("pretty-bytes"); + +const excludes = [ + ".DS_Store", + ".editorconfig", + ".eslintignore", + ".eslintrc.js", + ".git", + ".gitattributes", + ".github", + ".gitignore", + ".scripts", + ".stylelintrc.json", + "*.zip", + "composer.json", + "composer.lock", + "node_modules", + "package-lock.json", + "package.json", + "phpcs.xml.dist", + "vendor" +]; + +// Creates a file to stream archive data to. +// Uses the name in package.json, such as 'child-theme.zip'. +let output = fs.createWriteStream(`${process.env.npm_package_name}.zip`); + +let archive = archiver("zip", { + zlib: { level: 9 } // Best compression. +}); + +/** + * Sets up the file output stream and archive. + */ +const setupZipArchive = function() { + // Listens for all archive data to be written. + // Report the zip name and size, and rename *.txt files back to *.md again. + output.on("close", function() { + let fileSize = prettyBytes(archive.pointer()); + console.log( + chalk`{cyan Created ${process.env.npm_package_name}.zip, ${fileSize}}` + ); + + renameTxtFilesToMarkdown(); + }); + + // Displays warnings during archiving. + archive.on("warning", function(err) { + if (err.code === "ENOENT") { + console.log(err); + } else { + throw err; + } + }); + + // Catches errors during archiving. + archive.on("error", function(err) { + throw err; + }); + + // Pipes archive data to the file. + archive.pipe(output); +}; + +/** + * Rename files from *.md to *.txt. + * Returns a promise so zip can be done once rename is complete. + */ +const renameMarkdownFilesToTxt = new Promise(function(resolve, reject) { + console.log(chalk`{cyan Renaming .md files to .txt}`); + ["CHANGELOG.md", "README.md", "CONTRIBUTING.md"].forEach(function(file) { + if (fs.existsSync(file)) { + fs.renameSync(file, file.replace(".md", ".txt")); + } + }); + resolve("Success"); +}); + +/** + * Loops through theme directory, omitting files in the `exclude` array. + * Adds each file to the zip archive. + */ +const zipFiles = function() { + recursive(process.cwd(), excludes, function(err, files) { + let relativePath; + + console.log(chalk`{cyan Making zip file}`); + files.forEach(function(filePath) { + relativePath = path.relative(process.cwd(), filePath); + archive.file(filePath, { + name: `${process.env.npm_package_name}/${relativePath}` + }); + }); + + archive.finalize(); + }); +}; + +/** + * Renames txt file to markdown. + * Executed in the output stream close event. + */ +const renameTxtFilesToMarkdown = function() { + console.log(chalk`{cyan Renaming .txt files to .md}`); + ["CHANGELOG.txt", "README.txt", "CONTRIBUTING.txt"].forEach(function(file) { + if (fs.existsSync(file)) { + fs.renameSync(file, file.replace(".txt", ".md")); + } + }); +}; + +setupZipArchive(); +renameMarkdownFilesToTxt.then(zipFiles); From 2d3fabfc3400828c7e5014aee5779a20bd4ef690 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:20:04 +0200 Subject: [PATCH 30/60] Update documentation for `npm run zip` command --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a8d33b66..adb17029 100644 --- a/README.md +++ b/README.md @@ -40,13 +40,11 @@ You can then type any of these commands: - `npm run lint:css` to generate a report of style violations for `style.css`. - `npm run lint:js` to generate a report of style violations for JavaScript files. - `npm run fix:js` to fix any JavaScript style violations that can be corrected automatically. -- `npm run zip` to create a genesis-sample.zip of the current branch. Excludes files marked export-ignore in `.gitattributes`. +- `npm run zip` to create a genesis-sample.zip. Files in the `excludes` array in `scripts/makezip.js` are omitted. ### Packaging for distribution 1. Follow the install instructions for npm scripts above. 2. Switch to the git branch you plan to distribute. 3. Bump version numbers manually and commit those changes. -4. Type `npm run zip` to create `genesis-sample.zip`. Files marked export-ignore in `.gitattributes` are excluded from the zip. - -The `zip` command is an alias for `git archive -o genesis-sample.zip --prefix=genesis-sample/ HEAD`. The `zip` command also includes a script to rename certain Markdown files to `.txt` files within the created zip file. +4. Type `npm run zip` to create `genesis-sample.zip`. Files in the `excludes` array in `scripts/makezip.js` are omitted from the zip. `filename.md` files will be renamed to `filename.txt`. From ba150a989fc67f06345ea9c4419186bdfc23e5fe Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 1 Apr 2019 17:20:28 +0200 Subject: [PATCH 31/60] Remove export-ignore lines These are no longer needed now that `git archive` will not be used. --- .gitattributes | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.gitattributes b/.gitattributes index 57f0de33..bd230d2d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -23,17 +23,3 @@ *.ttf binary *.woff binary *.woff2 binary - -# Omit during export. -.editorconfig export-ignore -.eslintignore export-ignore -.eslintrc.js export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.github/ export-ignore -.scripts/ export-ignore -.stylelintrc.json export-ignore -composer.json export-ignore -phpcs.xml.dist export-ignore -package-lock.json export-ignore -package.json export-ignore From cf1b5b7942afb9d1612d6822b8be9afc4437dfa7 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Tue, 2 Apr 2019 08:12:25 -0400 Subject: [PATCH 32/60] Update issue templates --- .github/ISSUE_TEMPLATE/bug-report.md | 2 +- .github/ISSUE_TEMPLATE/release.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 940bc92b..56ce3bed 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: '' +labels: bug assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 38f57f02..17a06eaf 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -15,8 +15,9 @@ assignees: '' **Check standards** - [ ] Lint PHP (`composer install` then `composer phpcs`) -- [ ] Lint CSS (`npm install` then `npm run lint:css`) - [ ] Lint JS (`npm install` then `npm run lint:js`) +- [ ] Lint CSS (`npm install` then `npm run lint:css`) +- [ ] Autoprefix CSS `npm run autoprefixer` **Final release** - [ ] PR to merge Develop to Master From f16cb0901fe2802263d831dcf95e5b1448e9312f Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 18:35:31 +0200 Subject: [PATCH 33/60] Clarify Customizer Color descriptions Aim is to better describe where button blocks get their color from. --- lib/customize.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/customize.php b/lib/customize.php index a2cd7e9a..bc0e8761 100644 --- a/lib/customize.php +++ b/lib/customize.php @@ -33,7 +33,7 @@ function genesis_sample_customizer_register( $wp_customize ) { $wp_customize, 'genesis_sample_link_color', array( - 'description' => __( 'Change the color of post info links, hover color of linked titles, hover color of menu items, and more.', 'genesis-sample' ), + 'description' => __( 'Change the color of post info links and button blocks, the hover color of linked titles and menu items, and more.', 'genesis-sample' ), 'label' => __( 'Link Color', 'genesis-sample' ), 'section' => 'colors', 'settings' => 'genesis_sample_link_color', @@ -54,7 +54,7 @@ function genesis_sample_customizer_register( $wp_customize ) { $wp_customize, 'genesis_sample_accent_color', array( - 'description' => __( 'Change the default hover color for button links, the menu button, and submit buttons. This setting does not apply to buttons created with the Buttons block.', 'genesis-sample' ), + 'description' => __( 'Change the default hover color for button links, the menu button, and submit buttons. The button block uses the Link Color.', 'genesis-sample' ), 'label' => __( 'Accent Color', 'genesis-sample' ), 'section' => 'colors', 'settings' => 'genesis_sample_accent_color', From f328e7cd78af1920f8134044bd60bc075e98c782 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 21:22:13 +0200 Subject: [PATCH 34/60] Use 'menu buttons' to reflect that there can be more than one of them Props @susannelson. https://github.com/studiopress/genesis-sample/issues/220#issuecomment-484617633 --- lib/customize.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/customize.php b/lib/customize.php index bc0e8761..ad011a39 100644 --- a/lib/customize.php +++ b/lib/customize.php @@ -54,7 +54,7 @@ function genesis_sample_customizer_register( $wp_customize ) { $wp_customize, 'genesis_sample_accent_color', array( - 'description' => __( 'Change the default hover color for button links, the menu button, and submit buttons. The button block uses the Link Color.', 'genesis-sample' ), + 'description' => __( 'Change the default hover color for button links, menu buttons, and submit buttons. The button block uses the Link Color.', 'genesis-sample' ), 'label' => __( 'Accent Color', 'genesis-sample' ), 'section' => 'colors', 'settings' => 'genesis_sample_accent_color', From 57707f466dc86c6d24a4fef9e76e6052b9076f28 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 18:02:37 +0200 Subject: [PATCH 35/60] Set page layout to full-width instead of using Blocks template The About and Block Examples pages don't require removal of titles and breadcrumbs now that Genesis 2.10 allows the page layout meta to be set instead. --- config/onboarding.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/onboarding.php b/config/onboarding.php index 69ed839c..020805a9 100644 --- a/config/onboarding.php +++ b/config/onboarding.php @@ -50,19 +50,19 @@ 'post_content' => require dirname( __FILE__ ) . '/import/content/block-examples.php', 'post_type' => 'page', 'post_status' => 'publish', - 'page_template' => 'page-templates/blocks.php', 'comment_status' => 'closed', 'ping_status' => 'closed', + 'meta_input' => array( '_genesis_layout' => 'full-width-content' ), ), 'about' => array( 'post_title' => 'About Us', 'post_content' => require dirname( __FILE__ ) . '/import/content/about.php', 'post_type' => 'page', 'post_status' => 'publish', - 'page_template' => 'page-templates/blocks.php', 'featured_image' => CHILD_URL . '/config/import/images/about.jpg', 'comment_status' => 'closed', 'ping_status' => 'closed', + 'meta_input' => array( '_genesis_layout' => 'full-width-content' ), ), 'contact' => array( 'post_title' => 'Contact Us', From fdc39917f7e78b7c3e96e5801807556c1f1a91b4 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 18:03:54 +0200 Subject: [PATCH 36/60] Remove spacers and titles from block content This prevents duplication/extra space now that the pages will show the regular page titles instead. --- config/import/content/about.php | 12 ++---------- config/import/content/block-examples.php | 8 -------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/config/import/content/about.php b/config/import/content/about.php index 86994888..840add8c 100644 --- a/config/import/content/about.php +++ b/config/import/content/about.php @@ -16,10 +16,6 @@ $genesis_sample_about_image_url = CHILD_URL . '/config/import/images/about.jpg'; return << -

- -
@@ -30,11 +26,7 @@
-
-

About Us

- - - +

Hello! We are StudioPress, and we build themes with an emphasis on typography, white space, and mobile-optimized design to make your website look absolutely breathtaking.

@@ -50,7 +42,7 @@

-1234 Block Blvd.
San Francisco, CA 94120 +1234 Block Blvd.
San Francisco, CA 94120

diff --git a/config/import/content/block-examples.php b/config/import/content/block-examples.php index dc2878af..8953cf00 100644 --- a/config/import/content/block-examples.php +++ b/config/import/content/block-examples.php @@ -13,14 +13,6 @@ */ return << -

- - - -

Block Content Examples

- -

Below are examples of column classes that are available in the block editor.

From 0774bfd20714f184bb66564be7dd5d736dd01ab0 Mon Sep 17 00:00:00 2001 From: Jeffrey Carandang Date: Wed, 24 Apr 2019 16:56:50 +0800 Subject: [PATCH 37/60] Add better .alignwide max-width in order to adapt to .content width changes --- lib/gutenberg/front-end.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css index 90f41300..27d57cde 100644 --- a/lib/gutenberg/front-end.css +++ b/lib/gutenberg/front-end.css @@ -422,7 +422,7 @@ hr.wp-block-separator { .full-width-content .site-container .alignwide { margin-left: -180px; margin-right: -180px; - max-width: 1062px; + max-width: calc( 100% + 360px ); /* 360 equals sum of left and right margin */ width: auto; } From 8938dd63eb340d485027b86d6f40f6fdea8270d7 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 25 Apr 2019 18:39:12 -0400 Subject: [PATCH 38/60] Prevent layout caching on shop page --- lib/woocommerce/woocommerce-setup.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/woocommerce/woocommerce-setup.php b/lib/woocommerce/woocommerce-setup.php index 4275ac07..7108e9de 100644 --- a/lib/woocommerce/woocommerce-setup.php +++ b/lib/woocommerce/woocommerce-setup.php @@ -56,7 +56,7 @@ function genesis_sample_products_match_height() { */ function genesis_sample_woocommerce_breakpoint() { - $current = genesis_site_layout(); + $current = genesis_site_layout( false ); $layouts = array( 'one-sidebar' => array( 'content-sidebar', From 7636d1497ebb9fbf73881122615d9878b4df61f5 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 25 Apr 2019 17:06:52 -0400 Subject: [PATCH 39/60] Remove matchHeight script --- js/jquery.matchHeight.min.js | 18 ------------------ lib/woocommerce/woocommerce-setup.php | 27 --------------------------- 2 files changed, 45 deletions(-) delete mode 100644 js/jquery.matchHeight.min.js diff --git a/js/jquery.matchHeight.min.js b/js/jquery.matchHeight.min.js deleted file mode 100644 index 8d871268..00000000 --- a/js/jquery.matchHeight.min.js +++ /dev/null @@ -1,18 +0,0 @@ -(function(factory){'use strict';if(typeof define==='function'&&define.amd){define(['jquery'],factory)}else if(typeof module!=='undefined'&&module.exports){module.exports=factory(require('jquery'))}else{factory(jQuery)}})(function($){var _previousResizeWidth=-1,_updateTimeout=-1;var _parse=function(value){return parseFloat(value)||0};var _rows=function(elements){var tolerance=1,$elements=$(elements),lastTop=null,rows=[];$elements.each(function(){var $that=$(this),top=$that.offset().top-_parse($that.css('margin-top')),lastRow=rows.length>0?rows[rows.length-1]:null;if(lastRow===null){rows.push($that)}else{if(Math.floor(Math.abs(lastTop-top))<=tolerance){rows[rows.length-1]=lastRow.add($that)}else{rows.push($that)}} -lastTop=top});return rows};var _parseOptions=function(options){var opts={byRow:!0,property:'height',target:null,remove:!1};if(typeof options==='object'){return $.extend(opts,options)} -if(typeof options==='boolean'){opts.byRow=options}else if(options==='remove'){opts.remove=!0} -return opts};var matchHeight=$.fn.matchHeight=function(options){var opts=_parseOptions(options);if(opts.remove){var that=this;this.css(opts.property,'');$.each(matchHeight._groups,function(key,group){group.elements=group.elements.not(that)});return this} -if(this.length<=1&&!opts.target){return this} -matchHeight._groups.push({elements:this,options:opts});matchHeight._apply(this,opts);return this};matchHeight.version='0.7.0';matchHeight._groups=[];matchHeight._throttle=80;matchHeight._maintainScroll=!1;matchHeight._beforeUpdate=null;matchHeight._afterUpdate=null;matchHeight._rows=_rows;matchHeight._parse=_parse;matchHeight._parseOptions=_parseOptions;matchHeight._apply=function(elements,options){var opts=_parseOptions(options),$elements=$(elements),rows=[$elements];var scrollTop=$(window).scrollTop(),htmlHeight=$('html').outerHeight(!0);var $hiddenParents=$elements.parents().filter(':hidden');$hiddenParents.each(function(){var $that=$(this);$that.data('style-cache',$that.attr('style'))});$hiddenParents.css('display','block');if(opts.byRow&&!opts.target){$elements.each(function(){var $that=$(this),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block'} -$that.data('style-cache',$that.attr('style'));$that.css({'display':display,'padding-top':'0','padding-bottom':'0','margin-top':'0','margin-bottom':'0','border-top-width':'0','border-bottom-width':'0','height':'100px','overflow':'hidden'})});rows=_rows($elements);$elements.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||'')})} -$.each(rows,function(key,row){var $row=$(row),targetHeight=0;if(!opts.target){if(opts.byRow&&$row.length<=1){$row.css(opts.property,'');return} -$row.each(function(){var $that=$(this),style=$that.attr('style'),display=$that.css('display');if(display!=='inline-block'&&display!=='flex'&&display!=='inline-flex'){display='block'} -var css={'display':display};css[opts.property]='';$that.css(css);if($that.outerHeight(!1)>targetHeight){targetHeight=$that.outerHeight(!1)} -if(style){$that.attr('style',style)}else{$that.css('display','')}})}else{targetHeight=opts.target.outerHeight(!1)} -$row.each(function(){var $that=$(this),verticalPadding=0;if(opts.target&&$that.is(opts.target)){return} -if($that.css('box-sizing')!=='border-box'){verticalPadding+=_parse($that.css('border-top-width'))+_parse($that.css('border-bottom-width'));verticalPadding+=_parse($that.css('padding-top'))+_parse($that.css('padding-bottom'))} -$that.css(opts.property,(targetHeight-verticalPadding)+'px')})});$hiddenParents.each(function(){var $that=$(this);$that.attr('style',$that.data('style-cache')||null)});if(matchHeight._maintainScroll){$(window).scrollTop((scrollTop/htmlHeight)*$('html').outerHeight(!0))} -return this};matchHeight._applyDataApi=function(){var groups={};$('[data-match-height], [data-mh]').each(function(){var $this=$(this),groupId=$this.attr('data-mh')||$this.attr('data-match-height');if(groupId in groups){groups[groupId]=groups[groupId].add($this)}else{groups[groupId]=$this}});$.each(groups,function(){this.matchHeight(!0)})};var _update=function(event){if(matchHeight._beforeUpdate){matchHeight._beforeUpdate(event,matchHeight._groups)} -$.each(matchHeight._groups,function(){matchHeight._apply(this.elements,this.options)});if(matchHeight._afterUpdate){matchHeight._afterUpdate(event,matchHeight._groups)}};matchHeight._update=function(throttle,event){if(event&&event.type==='resize'){var windowWidth=$(window).width();if(windowWidth===_previousResizeWidth){return} -_previousResizeWidth=windowWidth} -if(!throttle){_update(event)}else if(_updateTimeout===-1){_updateTimeout=setTimeout(function(){_update(event);_updateTimeout=-1},matchHeight._throttle)}};$(matchHeight._applyDataApi);$(window).bind('load',function(event){matchHeight._update(!1,event)});$(window).bind('resize orientationchange',function(event){matchHeight._update(!0,event)})}) \ No newline at end of file diff --git a/lib/woocommerce/woocommerce-setup.php b/lib/woocommerce/woocommerce-setup.php index 7108e9de..9207cfd1 100644 --- a/lib/woocommerce/woocommerce-setup.php +++ b/lib/woocommerce/woocommerce-setup.php @@ -19,33 +19,6 @@ } -add_action( 'wp_enqueue_scripts', 'genesis_sample_products_match_height', 99 ); -/** - * Prints an inline script to the footer to keep products the same height. - * - * @since 2.3.0 - */ -function genesis_sample_products_match_height() { - - // If Woocommerce is not activated, or a product page isn't showing, exit early. - if ( ! class_exists( 'WooCommerce' ) || ! is_shop() && ! is_product_category() && ! is_product_tag() ) { - return; - } - - wp_enqueue_script( - 'genesis-sample-match-height', - get_stylesheet_directory_uri() . '/js/jquery.matchHeight.min.js', - array( 'jquery' ), - CHILD_THEME_VERSION, - true - ); - wp_add_inline_script( - 'genesis-sample-match-height', - "jQuery(document).ready( function() { jQuery( '.product .woocommerce-LoopProduct-link').matchHeight(); });" - ); - -} - add_filter( 'woocommerce_style_smallscreen_breakpoint', 'genesis_sample_woocommerce_breakpoint' ); /** * Modifies the WooCommerce breakpoints. From cc0c2d0dc60cdc3f42641c916cdb2341797081f6 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 25 Apr 2019 17:23:37 -0400 Subject: [PATCH 40/60] Use flex to match height --- .../genesis-sample-woocommerce.css | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lib/woocommerce/genesis-sample-woocommerce.css b/lib/woocommerce/genesis-sample-woocommerce.css index a352ca30..567866d8 100644 --- a/lib/woocommerce/genesis-sample-woocommerce.css +++ b/lib/woocommerce/genesis-sample-woocommerce.css @@ -42,6 +42,7 @@ Loaded on WooCommerce pages */ .woocommerce .woocommerce-LoopProduct-link { display: block; + flex-shrink: 0; /* IE 11 height fix */ } @@ -75,6 +76,15 @@ Loaded on WooCommerce pages */ border-bottom: 0; } +.woocommerce .content .entry::after, +.woocommerce .content .entry::before, +.woocommerce .products ul::after, +.woocommerce .products ul::before, +.woocommerce ul.products::after, +.woocommerce ul.products::before { + display: none; +} + .woocommerce a.added_to_cart { line-height: 1; } @@ -86,6 +96,11 @@ Loaded on WooCommerce pages */ top: 1em; } +.woocommerce ul.products { + display: flex; + flex-wrap: wrap; +} + .woocommerce ul.products li.product .button, .woocommerce .woocommerce-ordering, .woocommerce-page ul.products li.product .button, @@ -148,6 +163,13 @@ Loaded on WooCommerce pages */ /* WooCommerce Product ---------------------------------------------------------------------------- */ +.woocommerce ul.products li.product { + align-items: self-start; + display: flex; + flex-direction: column; + justify-content: space-between; +} + .woocommerce div.product p.price, .woocommerce div.product span.price { color: #0073e5; From b1e5e889bdf607b46bd2f17bc71cb8f1c19d1a65 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 25 Apr 2019 18:09:31 -0400 Subject: [PATCH 41/60] Improve mobile spacing --- lib/woocommerce/genesis-sample-woocommerce.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/woocommerce/genesis-sample-woocommerce.css b/lib/woocommerce/genesis-sample-woocommerce.css index 567866d8..8b9542c4 100644 --- a/lib/woocommerce/genesis-sample-woocommerce.css +++ b/lib/woocommerce/genesis-sample-woocommerce.css @@ -99,6 +99,7 @@ Loaded on WooCommerce pages */ .woocommerce ul.products { display: flex; flex-wrap: wrap; + justify-content: space-between; } .woocommerce ul.products li.product .button, @@ -825,6 +826,16 @@ div.woocommerce-info.wc-memberships-restriction-message.wc-memberships-restricte } +@media only screen and (min-width: 860px) { + + .woocommerce ul.products { + display: flex; + flex-wrap: wrap; + justify-content: flex-start; + } + +} + @media only screen and (min-width: 960px) { .full-width-content.woocommerce div.product .woocommerce-tabs ul.tabs { From e76346f9c4c139f800a3505a388b8928ab318838 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Thu, 25 Apr 2019 18:33:19 -0400 Subject: [PATCH 42/60] Improve spacing for sidebar layouts --- lib/woocommerce/genesis-sample-woocommerce.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/woocommerce/genesis-sample-woocommerce.css b/lib/woocommerce/genesis-sample-woocommerce.css index 8b9542c4..2bc26e8c 100644 --- a/lib/woocommerce/genesis-sample-woocommerce.css +++ b/lib/woocommerce/genesis-sample-woocommerce.css @@ -828,9 +828,7 @@ div.woocommerce-info.wc-memberships-restriction-message.wc-memberships-restricte @media only screen and (min-width: 860px) { - .woocommerce ul.products { - display: flex; - flex-wrap: wrap; + .full-width-content .woocommerce ul.products { justify-content: flex-start; } @@ -881,3 +879,13 @@ div.woocommerce-info.wc-memberships-restriction-message.wc-memberships-restricte } } + +@media only screen and (min-width: 1140px) { + + .content-sidebar .woocommerce ul.products, + .sidebar-content .woocommerce ul.products { + justify-content: flex-start; + } + +} + From 26b62749efceb3b7b753c18d5994a13de2424c3d Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Tue, 30 Apr 2019 11:47:25 -0400 Subject: [PATCH 43/60] Improve table display for mulit-line text closes #239 --- style.css | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/style.css b/style.css index 81356423..96daa8ac 100755 --- a/style.css +++ b/style.css @@ -490,8 +490,8 @@ input[type="search"]::-webkit-search-results-button { table { border-collapse: collapse; border-spacing: 0; - line-height: 2; margin-bottom: 40px; + table-layout: fixed; width: 100%; word-break: break-all; } @@ -503,16 +503,17 @@ tbody { td, th { text-align: left; + vertical-align: top; } td { border-top: 1px solid #eee; - padding: 6px; + padding: 10px; } th { - font-weight: 400; - padding: 0 6px; + font-weight: 600; + padding: 0 10px 10px; } td:first-child, @@ -520,6 +521,11 @@ th:first-child { padding-left: 0; } +td:last-child, +th:last-child { + padding-right: 0; +} + /* Screen Reader Text --------------------------------------------- */ @@ -1440,6 +1446,15 @@ p.entry-meta { /* Media Queries ---------------------------------------------------------------------------- */ +@media only screen and (min-width: 480px) { + + table { + table-layout: auto; + word-break: normal; + } + +} + @media only screen and (min-width: 960px) { /* Site Header From b43374a791664e23fc39260ec9bb9afef44afe5d Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Tue, 30 Apr 2019 11:47:39 -0400 Subject: [PATCH 44/60] Table editor styles --- lib/gutenberg/style-editor.css | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/lib/gutenberg/style-editor.css b/lib/gutenberg/style-editor.css index dd7acbf0..03b6f469 100755 --- a/lib/gutenberg/style-editor.css +++ b/lib/gutenberg/style-editor.css @@ -14,6 +14,36 @@ dl { line-height: 1.625; } +/* Tables +---------------------------------------------------------------------------- */ + +table { + width: 100%; +} + +tbody, +td, +th { + border-color: #eee; + text-align: left; +} + +td, +th { + padding: 10px; + text-align: left; + vertical-align: top; +} + +th { + font-weight: 600; +} + +td:first-child, +th:first-child { + padding-left: 0; +} + /* Regular content width. /* 702px + 27px to match paragraph width on front-end and editor. ---------------------------------------------------------------------------- */ From 28ca2fb48e0c3e8b267f8c4c24892f85f94ed3ed Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 8 Apr 2019 11:53:14 +0200 Subject: [PATCH 45/60] Add WPForms config Allows us to specify fields that are missing when creating a form using the 'contact' template, such as the form ID and submit button label. --- config/wpforms.php | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 config/wpforms.php diff --git a/config/wpforms.php b/config/wpforms.php new file mode 100644 index 00000000..59dcc210 --- /dev/null +++ b/config/wpforms.php @@ -0,0 +1,59 @@ + '3', + 'fields' => array( + '0' => array( + 'id' => '0', + 'type' => 'name', + 'label' => esc_html__( 'Name', 'genesis-sample' ), + 'required' => '1', + 'size' => 'medium', + ), + '1' => array( + 'id' => '1', + 'type' => 'email', + 'label' => esc_html__( 'Email', 'genesis-sample' ), + 'required' => '1', + 'size' => 'medium', + ), + '2' => array( + 'id' => '2', + 'type' => 'textarea', + 'label' => esc_html__( 'Comment or Message', 'genesis-sample' ), + 'description' => '', + 'required' => '1', + 'size' => 'medium', + 'placeholder' => '', + 'css' => '', + ), + ), + 'settings' => array( + 'form_title' => esc_html__( 'Simple Contact Form', 'genesis-sample' ), + 'notifications' => array( + '1' => array( + 'email' => '{admin_email}', + 'subject' => esc_html__( 'Contact Form Submission', 'genesis-sample' ), + 'replyto' => '{field_id="1"}', + 'sender_name' => '{field_id="0"}', + 'sender_address' => '{admin_email}', + 'message' => '{all_fields}', + ), + ), + 'honeypot' => '1', + 'confirmation_message_scroll' => '1', + 'submit_text' => 'Submit', + 'submit_text_processing' => esc_html__( 'Sending...', 'genesis-sample' ), + ), +); From febdfec17d772d1868dcfdab0c4d5832b269db51 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 8 Apr 2019 12:04:34 +0200 Subject: [PATCH 46/60] Add helper functions to create WPForms and get existing form IDs Stores the ID of the form for reuse. This has several purposes: - Prevents multiple form creation during a single onboarding process (I was seeing ~8 forms created with each one-click theme setup due to `genesis_get_config()` being called multiple times in Genesis.) - Prevents multiple form creation when switching between themes. - If a user customises the created form and runs onboarding again or switches theme, that customised form will be used in place of a new one that might look identical but perform differently. Uses the studiopress_ prefix for namespacing so we can re-use functions between themes more easily. --- lib/wpforms.php | 82 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 lib/wpforms.php diff --git a/lib/wpforms.php b/lib/wpforms.php new file mode 100644 index 00000000..52a8e268 --- /dev/null +++ b/lib/wpforms.php @@ -0,0 +1,82 @@ +post_type ) { + return $form_id; + } else { + delete_option( 'genesis_onboarding_wpforms_id' ); // Stored ID no longer points to a WPForms form. + } + + if ( $create_new ) { + return studiopress_create_wpforms_form(); + } + +} + +/** + * Creates a WPForms form. + * + * A `wpforms.php` config file must exist in the theme's config folder. + * + * @since 2.10.0 + * + * @return int|null The form/post ID, or null if no form was created or form config is missing. + */ +function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress prefix for functions shared between themes. + + if ( ! function_exists( 'wpforms' ) ) { + return; + } + + $wpforms_data = genesis_get_config( 'wpforms' ); + + if ( ! $wpforms_data ) { + return; + } + + // Creates an empty form so we have an ID to work with. + $form_id = wp_insert_post( + array( + 'post_status' => 'publish', + 'post_type' => 'wpforms', + ) + ); + + $wpforms_data['id'] = $form_id; // WPForms expects the ID in the form's post content. + + $wpforms_updated = wpforms()->form->update( $form_id, $wpforms_data ); + + if ( $form_id && $wpforms_updated ) { + update_option( 'genesis_onboarding_wpforms_id', $form_id, false ); + return $form_id; + } + +} From 515dec26c1cd5effd18aed6e723a90f4d3a851ab Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Mon, 8 Apr 2019 12:05:22 +0200 Subject: [PATCH 47/60] Update contact form sample content to create a WPForms form --- config/import/content/contact.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/config/import/content/contact.php b/config/import/content/contact.php index c69afb4c..4dca4b56 100644 --- a/config/import/content/contact.php +++ b/config/import/content/contact.php @@ -3,6 +3,7 @@ * Genesis Sample. * * Contact page content optionally installed after theme activation. + * Will create a form with WPForms and embed on the page as a WPForms block. * * Visit `/wp-admin/admin.php?page=genesis-getting-started` to trigger import. * @@ -12,8 +13,17 @@ * @link https://www.studiopress.com/ */ +// Requires the helper function to get the WPForms form ID. +require_once get_stylesheet_directory() . '/lib/wpforms.php'; + +$genesis_sample_wpforms_id = studiopress_get_wpforms_id(); + +if ( $genesis_sample_wpforms_id ) { + return ""; +} + return << -

Add a contact form to this page with the pre-installed WPForms Lite plugin (Third Party). Learn how to create a form using WPForms.

+

Add a contact form to this page with the WPForms Lite plugin (Third Party). Learn how to create a form using WPForms.

CONTENT; From 0d402341fa355de28d9bb9481843c4949335ed71 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Mon, 8 Apr 2019 14:54:56 +0200 Subject: [PATCH 48/60] Use large size for email field Co-Authored-By: nickcernis --- config/wpforms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/wpforms.php b/config/wpforms.php index 59dcc210..4f172cdb 100644 --- a/config/wpforms.php +++ b/config/wpforms.php @@ -26,7 +26,7 @@ 'type' => 'email', 'label' => esc_html__( 'Email', 'genesis-sample' ), 'required' => '1', - 'size' => 'medium', + 'size' => 'large', ), '2' => array( 'id' => '2', From 7869b1e8cce754ba2ed1e025dea3bffedb536056 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Mon, 8 Apr 2019 14:55:16 +0200 Subject: [PATCH 49/60] Use large size for name field Co-Authored-By: nickcernis --- config/wpforms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/wpforms.php b/config/wpforms.php index 4f172cdb..aaa30b6a 100644 --- a/config/wpforms.php +++ b/config/wpforms.php @@ -19,7 +19,7 @@ 'type' => 'name', 'label' => esc_html__( 'Name', 'genesis-sample' ), 'required' => '1', - 'size' => 'medium', + 'size' => 'large', ), '1' => array( 'id' => '1', From 956a7da2d2692d19f6e46ea2b4b069608ae9ae13 Mon Sep 17 00:00:00 2001 From: Jen Baumann Date: Mon, 8 Apr 2019 14:55:35 +0200 Subject: [PATCH 50/60] Use simple format for name field Co-Authored-By: nickcernis --- config/wpforms.php | 1 + 1 file changed, 1 insertion(+) diff --git a/config/wpforms.php b/config/wpforms.php index aaa30b6a..54f57b02 100644 --- a/config/wpforms.php +++ b/config/wpforms.php @@ -18,6 +18,7 @@ 'id' => '0', 'type' => 'name', 'label' => esc_html__( 'Name', 'genesis-sample' ), + 'format' => 'simple', 'required' => '1', 'size' => 'large', ), From e9b639e67d78d33ce52dbd5f54efbaaee8f81879 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 16:53:36 +0200 Subject: [PATCH 51/60] Remove wpforms config file WPForms Lite 1.5.2 allows us to use the new() method to create a working form based on their Contact template instead of having to specify form config ourselves. --- config/wpforms.php | 60 ---------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 config/wpforms.php diff --git a/config/wpforms.php b/config/wpforms.php deleted file mode 100644 index 54f57b02..00000000 --- a/config/wpforms.php +++ /dev/null @@ -1,60 +0,0 @@ - '3', - 'fields' => array( - '0' => array( - 'id' => '0', - 'type' => 'name', - 'label' => esc_html__( 'Name', 'genesis-sample' ), - 'format' => 'simple', - 'required' => '1', - 'size' => 'large', - ), - '1' => array( - 'id' => '1', - 'type' => 'email', - 'label' => esc_html__( 'Email', 'genesis-sample' ), - 'required' => '1', - 'size' => 'large', - ), - '2' => array( - 'id' => '2', - 'type' => 'textarea', - 'label' => esc_html__( 'Comment or Message', 'genesis-sample' ), - 'description' => '', - 'required' => '1', - 'size' => 'medium', - 'placeholder' => '', - 'css' => '', - ), - ), - 'settings' => array( - 'form_title' => esc_html__( 'Simple Contact Form', 'genesis-sample' ), - 'notifications' => array( - '1' => array( - 'email' => '{admin_email}', - 'subject' => esc_html__( 'Contact Form Submission', 'genesis-sample' ), - 'replyto' => '{field_id="1"}', - 'sender_name' => '{field_id="0"}', - 'sender_address' => '{admin_email}', - 'message' => '{all_fields}', - ), - ), - 'honeypot' => '1', - 'confirmation_message_scroll' => '1', - 'submit_text' => 'Submit', - 'submit_text_processing' => esc_html__( 'Sending...', 'genesis-sample' ), - ), -); From 58affbe69004a6913684de2a677ebcdda1e20496 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Thu, 18 Apr 2019 16:55:41 +0200 Subject: [PATCH 52/60] Refactor to remove unneeded studiopress_get_wpforms_id function The ID can be retrieved from the genesis_onboarding_wpforms_id. --- config/import/content/contact.php | 7 +++- lib/wpforms.php | 70 +++++++++---------------------- 2 files changed, 25 insertions(+), 52 deletions(-) diff --git a/config/import/content/contact.php b/config/import/content/contact.php index 4dca4b56..83fb3f4f 100644 --- a/config/import/content/contact.php +++ b/config/import/content/contact.php @@ -13,10 +13,13 @@ * @link https://www.studiopress.com/ */ -// Requires the helper function to get the WPForms form ID. +// Requires helper WPForms function to create a new form. require_once get_stylesheet_directory() . '/lib/wpforms.php'; -$genesis_sample_wpforms_id = studiopress_get_wpforms_id(); +// Creates a WPForms contact form during one-click theme setup if one does not exist already. +studiopress_create_wpforms_form(); + +$genesis_sample_wpforms_id = get_option( 'genesis_onboarding_wpforms_id' ); if ( $genesis_sample_wpforms_id ) { return ""; diff --git a/lib/wpforms.php b/lib/wpforms.php index 52a8e268..dcc4fb87 100644 --- a/lib/wpforms.php +++ b/lib/wpforms.php @@ -2,7 +2,7 @@ /** * StudioPress WPForms helper functions. * - * Adds a form during one-click theme setup, or returns existing forms ID. + * Creates a form during one-click theme setup if one has not been created already. * * @package StudioPress * @author StudioPress @@ -11,72 +11,42 @@ */ /** - * Gets the ID of the WPForms form created during previous StudioPress one-click theme setup, if one exists. - * - * Creates a new form and returns that form's ID if there is no existing form, and `$create_new` is true. + * Creates a WPForms form if one added by a StudioPress theme does not exist. * * @since 2.10.0 - * - * @param bool $create_new Create a form if no form ID exists and return the ID of that form. - * @return int|null The ID of the form, or null if WPForms is inactive or form creation failed. */ -function studiopress_get_wpforms_id( $create_new = true ) { // phpcs:ignore -- studiopress prefix for functions shared between themes. +function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress prefix for functions shared between themes. if ( ! function_exists( 'wpforms' ) ) { return; } - $form_id = get_option( 'genesis_onboarding_wpforms_id' ); - $wpform = get_post( $form_id ); + $existing_form_id = get_option( 'genesis_onboarding_wpforms_id' ); - if ( $wpform && 'wpforms' === $wpform->post_type ) { - return $form_id; - } else { - delete_option( 'genesis_onboarding_wpforms_id' ); // Stored ID no longer points to a WPForms form. - } - - if ( $create_new ) { - return studiopress_create_wpforms_form(); - } + if ( $existing_form_id ) { + $wpform = get_post( $existing_form_id ); -} + // Don't create another form if a valid one already exists. + if ( $wpform && 'wpforms' === $wpform->post_type ) { + return; + } -/** - * Creates a WPForms form. - * - * A `wpforms.php` config file must exist in the theme's config folder. - * - * @since 2.10.0 - * - * @return int|null The form/post ID, or null if no form was created or form config is missing. - */ -function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress prefix for functions shared between themes. - - if ( ! function_exists( 'wpforms' ) ) { - return; + // Stored ID no longer points to a WPForms form. + delete_option( 'genesis_onboarding_wpforms_id' ); } - $wpforms_data = genesis_get_config( 'wpforms' ); - - if ( ! $wpforms_data ) { - return; - } - - // Creates an empty form so we have an ID to work with. - $form_id = wp_insert_post( + // Creates a form using the WPForms 'contact' template. + $new_form_id = wpforms()->form->add( + esc_html__( 'Simple Contact Form', 'genesis-sample' ), + array(), array( - 'post_status' => 'publish', - 'post_type' => 'wpforms', + 'template' => 'contact', + 'builder' => false, ) ); - $wpforms_data['id'] = $form_id; // WPForms expects the ID in the form's post content. - - $wpforms_updated = wpforms()->form->update( $form_id, $wpforms_data ); - - if ( $form_id && $wpforms_updated ) { - update_option( 'genesis_onboarding_wpforms_id', $form_id, false ); - return $form_id; + if ( $new_form_id ) { + update_option( 'genesis_onboarding_wpforms_id', $new_form_id, false ); } } From a22b5b0934a8a7468f50aaaa453c9ba92c92b676 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Tue, 30 Apr 2019 16:57:45 +0200 Subject: [PATCH 53/60] Return form ID from form creation helper function --- lib/wpforms.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/wpforms.php b/lib/wpforms.php index dcc4fb87..dec62d31 100644 --- a/lib/wpforms.php +++ b/lib/wpforms.php @@ -14,8 +14,10 @@ * Creates a WPForms form if one added by a StudioPress theme does not exist. * * @since 2.10.0 + * + * @return int|null ID of form if one exists or gets created. Null if form creation fails or WPForms is inactive. */ -function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress prefix for functions shared between themes. +function studiopress_maybe_create_wpforms_form() { // phpcs:ignore -- studiopress prefix for functions shared between themes. if ( ! function_exists( 'wpforms' ) ) { return; @@ -28,7 +30,7 @@ function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress pref // Don't create another form if a valid one already exists. if ( $wpform && 'wpforms' === $wpform->post_type ) { - return; + return $existing_form_id; } // Stored ID no longer points to a WPForms form. @@ -47,6 +49,10 @@ function studiopress_create_wpforms_form() { // phpcs:ignore -- studiopress pref if ( $new_form_id ) { update_option( 'genesis_onboarding_wpforms_id', $new_form_id, false ); + return $new_form_id; + } + +} } } From 9c841a7e29abf17d33bb8d93d3441d2e6141ec9f Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Tue, 30 Apr 2019 17:02:22 +0200 Subject: [PATCH 54/60] Swap default contact content with WPForms block after content import - Ensures default content exists as a fallback if form creation fails. - Prevents issue where a form was created if onboarding was skipped, due to form creation logic being loaded with the contact page content on the Genesis onboarding page. --- config/import/content/contact.php | 10 ++-------- lib/wpforms.php | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/config/import/content/contact.php b/config/import/content/contact.php index 83fb3f4f..e233d69a 100644 --- a/config/import/content/contact.php +++ b/config/import/content/contact.php @@ -16,14 +16,8 @@ // Requires helper WPForms function to create a new form. require_once get_stylesheet_directory() . '/lib/wpforms.php'; -// Creates a WPForms contact form during one-click theme setup if one does not exist already. -studiopress_create_wpforms_form(); - -$genesis_sample_wpforms_id = get_option( 'genesis_onboarding_wpforms_id' ); - -if ( $genesis_sample_wpforms_id ) { - return ""; -} +// Swaps the default content below with a WPForms contact form block if the WPForms plugin is active. +add_action( 'genesis_onboarding_after_import_content', 'studiopress_insert_contact_form', 10, 2 ); return << diff --git a/lib/wpforms.php b/lib/wpforms.php index dec62d31..83fe1a74 100644 --- a/lib/wpforms.php +++ b/lib/wpforms.php @@ -53,6 +53,26 @@ function studiopress_maybe_create_wpforms_form() { // phpcs:ignore -- studiopres } } + +/** + * Replace contact page placeholder content with a block displaying the form. + * + * @since 2.10.0 + * + * @param array $content The content config. + * @param array $imported_posts Imported posts with content short name as keys and IDs as values. + */ +function studiopress_insert_contact_form( $content, $imported_posts ) { // phpcs:ignore -- studiopress prefix for functions shared between themes. + + $form_id = studiopress_maybe_create_wpforms_form(); + + if ( $form_id && array_key_exists( 'contact', $imported_posts ) ) { + $contact_page = array( + 'ID' => $imported_posts['contact'], + 'post_content' => "", + ); + + wp_update_post( $contact_page ); } } From a04d725579dd5871ff7e51f177663716d88b241e Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Tue, 30 Apr 2019 17:21:49 +0200 Subject: [PATCH 55/60] Improve file header comment --- lib/wpforms.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/wpforms.php b/lib/wpforms.php index 83fe1a74..e0bb3d12 100644 --- a/lib/wpforms.php +++ b/lib/wpforms.php @@ -2,7 +2,8 @@ /** * StudioPress WPForms helper functions. * - * Creates a form during one-click theme setup if one has not been created already. + * Assists with the creation of a WPForms form, and the replacement of contact + * page content with a working contact form block during one-click theme setup. * * @package StudioPress * @author StudioPress From 3f7f74b9a8f4a4e871d5ec0f83e1a83b83ec834b Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Wed, 1 May 2019 10:54:01 +0200 Subject: [PATCH 56/60] Correct phpcs error (extra whitespace) --- lib/woocommerce/genesis-sample-woocommerce.css | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/woocommerce/genesis-sample-woocommerce.css b/lib/woocommerce/genesis-sample-woocommerce.css index 2bc26e8c..8830adf5 100644 --- a/lib/woocommerce/genesis-sample-woocommerce.css +++ b/lib/woocommerce/genesis-sample-woocommerce.css @@ -888,4 +888,3 @@ div.woocommerce-info.wc-memberships-restriction-message.wc-memberships-restricte } } - From caa61740bd0797cfdc7c5266a3224e8f6bb70bee Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Wed, 1 May 2019 10:56:34 +0200 Subject: [PATCH 57/60] Correct CSS lint errors --- lib/gutenberg/front-end.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gutenberg/front-end.css b/lib/gutenberg/front-end.css index 27d57cde..85999b79 100644 --- a/lib/gutenberg/front-end.css +++ b/lib/gutenberg/front-end.css @@ -422,7 +422,7 @@ hr.wp-block-separator { .full-width-content .site-container .alignwide { margin-left: -180px; margin-right: -180px; - max-width: calc( 100% + 360px ); /* 360 equals sum of left and right margin */ + max-width: calc(100% + 360px); /* 360 equals sum of left and right margin */ width: auto; } From 80ef6f96d1629bf6d66ea7a4b168ee1f6c845c4f Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Wed, 1 May 2019 10:54:28 +0200 Subject: [PATCH 58/60] Bump version to 2.10.0 --- package.json | 2 +- style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1e9bfdf8..bed648c9 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "description": "The sample child theme for the Genesis Framework.", "author": "StudioPress", "authoruri": "https://www.studiopress.com/", - "version": "2.9.2-dev", + "version": "2.10.0", "tags": "one-column, two-columns, left-sidebar, right-sidebar, accessibility-ready, custom-colors, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready", "license": "GPL-2.0-or-later", "licenseuri": "https://www.gnu.org/licenses/gpl-2.0.html", diff --git a/style.css b/style.css index 96daa8ac..2527bcde 100755 --- a/style.css +++ b/style.css @@ -5,7 +5,7 @@ Description: This is the sample theme created for the Genesis Framework. Author: StudioPress Author URI: https://www.studiopress.com/ -Version: 2.9.2-dev +Version: 2.10.0 Tags: accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, left-sidebar, one-column, right-sidebar, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, two-columns, wide-blocks From bd80a7fab650207595af0f2902c8671c9f233a59 Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Wed, 1 May 2019 10:57:40 +0200 Subject: [PATCH 59/60] Update language file --- languages/genesis-sample.pot | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/languages/genesis-sample.pot b/languages/genesis-sample.pot index 9ecdbb30..b5c74cc7 100644 --- a/languages/genesis-sample.pot +++ b/languages/genesis-sample.pot @@ -2,15 +2,15 @@ # This file is distributed under the GPL-2.0-or-later.=!> msgid "" msgstr "" -"Project-Id-Version: Genesis Sample 2.9.1\n" +"Project-Id-Version: Genesis Sample 2.10.0\n" "Report-Msgid-Bugs-To: StudioPress \n" -"POT-Creation-Date: 2019-03-18 16:45:28+00:00\n" +"POT-Creation-Date: 2019-05-01 08:57:02+00:00\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "PO-Revision-Date: 2019-MO-DA HO:MI+ZONE\n" -"Last-Translator: StudioPress \n" -"Language-Team: StudioPress \n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" "Language: en\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Country: United States\n" @@ -81,8 +81,8 @@ msgstr "" #: lib/customize.php:36 msgid "" -"Change the color of post info links, hover color of linked titles, hover " -"color of menu items, and more." +"Change the color of post info links and button blocks, the hover color of " +"linked titles and menu items, and more." msgstr "" #: lib/customize.php:37 @@ -91,9 +91,8 @@ msgstr "" #: lib/customize.php:57 msgid "" -"Change the default hover color for button links, the menu button, and " -"submit buttons. This setting does not apply to buttons created with the " -"Buttons block." +"Change the default hover color for button links, menu buttons, and submit " +"buttons. The button block uses the Link Color." msgstr "" #: lib/customize.php:58 @@ -126,14 +125,18 @@ msgstr "" msgid "Please %1$s to enable WooCommerce support for %2$s." msgstr "" -#: lib/woocommerce/woocommerce-setup.php:100 +#: lib/woocommerce/woocommerce-setup.php:73 msgid "Previous Page" msgstr "" -#: lib/woocommerce/woocommerce-setup.php:101 +#: lib/woocommerce/woocommerce-setup.php:74 msgid "Next Page" msgstr "" +#: lib/wpforms.php:43 +msgid "Simple Contact Form" +msgstr "" + #. Theme Name of the plugin/theme msgid "Genesis Sample" msgstr "" From dc80ca0a3e4a3db3c28345a514d5d44a31cea52a Mon Sep 17 00:00:00 2001 From: Nick Cernis Date: Wed, 1 May 2019 11:18:56 +0200 Subject: [PATCH 60/60] Update changelog for 2.10.0 --- CHANGELOG.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ea03408..2f690b17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,17 @@ # Genesis Sample Theme Changelog -## [Unreleased] -* +## [2.10.0] - 2019-05-01 +Requires Genesis 2.10.0+. + +* Added: create a WPForms form during one-click theme setup and insert a WPForms block on the sample contact page. +* Added: remove link in hidden title when custom logo is in use for better accessibility. +* Changed: set full-width page layout for the Block Examples and About pages during one-click theme setup. +* Changed: improve styling of tables. +* Changed: improve editor button block styling. +* Changed: clarify wording of Customizer color labels. +* Changed: remove matchHeight script and use CSS flex instead to match heights of WooCommerce product lists. +* Fixed: WooCommmerce shop pages now use the selected page layout instead of the default site layout on sites using object caching. +* Fixed: update the `npm run zip` script to prevent an issue with zip decompression for apps such as Path Finder. (npm scripts are available in the version of Genesis Sample on GitHub: https://github.com/studiopress/genesis-sample/). ## [2.9.1] - 2019-03-19 * Added: Contributing guidelines.