@automattic/newspack-blocks 1.37.0 → 1.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/babel/00255e6096be9e31ec354db849dfefaa.json.gz +0 -0
- package/.cache/babel/0265bee20d709ac92f56456637727f4b.json.gz +0 -0
- package/.cache/babel/02986ba19dc461a152ea1c45f3f36a27.json.gz +0 -0
- package/.cache/babel/06a1700c1a4a989fc7886c86bf6223f7.json.gz +0 -0
- package/.cache/babel/07169c73863508b392f15022920bd0b6.json.gz +0 -0
- package/.cache/babel/0a5083e561829e3884cb5c71388adc3f.json.gz +0 -0
- package/.cache/babel/0a713997b6e4f45849ed6a4bff79cca5.json.gz +0 -0
- package/.cache/babel/0a9506bf649ffbe854e75459cf6b8972.json.gz +0 -0
- package/.cache/babel/0c12c4398bbbf2d771b13dd1d0e64097.json.gz +0 -0
- package/.cache/babel/0f8c18da204f4cc2777ca3191f10c309.json.gz +0 -0
- package/.cache/babel/0fced15ed787cc4239bb53c1d12892e6.json.gz +0 -0
- package/.cache/babel/10faf7c74a89e9aa4d8b9528a654913e.json.gz +0 -0
- package/.cache/babel/1353b411b65a123b5dc35012db11aa1d.json.gz +0 -0
- package/.cache/babel/1729336f326db1cf54b9c1671dc5e36c.json.gz +0 -0
- package/.cache/babel/17a433ab631a32d0712f3f75cf85ea99.json.gz +0 -0
- package/.cache/babel/1948e72d907f681ff771881ad6800ee1.json.gz +0 -0
- package/.cache/babel/1ab4bf44aa14d2eb7e6911900a3b2c12.json.gz +0 -0
- package/.cache/babel/1decfd137cac87a75bd83ffbd39c9106.json.gz +0 -0
- package/.cache/babel/2143ceff6d186bc13bc902e0f1f33dbf.json.gz +0 -0
- package/.cache/babel/23c63332718e167968a7c2a8a5f730eb.json.gz +0 -0
- package/.cache/babel/24bf53676e12293cbf88d01e649fd167.json.gz +0 -0
- package/.cache/babel/26ba0bb46844575022e54a8819fbf405.json.gz +0 -0
- package/.cache/babel/281ca171ce8947f87f574df11059e00b.json.gz +0 -0
- package/.cache/babel/28700b83434e4dbfb9a20d7ec0a7e7a4.json.gz +0 -0
- package/.cache/babel/29cf8eeea8630ade027e34459f2e49ee.json.gz +0 -0
- package/.cache/babel/2b0dd254a46223a93e6259d2b797a7e7.json.gz +0 -0
- package/.cache/babel/2da6786ede3ddda4c86eeac524a6a796.json.gz +0 -0
- package/.cache/babel/2e7ce10fdee94274b48d528f94c32b34.json.gz +0 -0
- package/.cache/babel/2f93fed1706a40d82122281cc3677074.json.gz +0 -0
- package/.cache/babel/3a59b710e9745ef93148d6d74ee7d16f.json.gz +0 -0
- package/.cache/babel/3b2c440027c793c8f7978d7622cbfca0.json.gz +0 -0
- package/.cache/babel/3ca939ace4af88e266942d93837ab37a.json.gz +0 -0
- package/.cache/babel/3e671670c4d395cd1804ef4be31955e4.json.gz +0 -0
- package/.cache/babel/3e69fe002d9973c0030152a51da9477a.json.gz +0 -0
- package/.cache/babel/3f5f8ea603fd57850c6683c750fe53d8.json.gz +0 -0
- package/.cache/babel/41abaaadb68b0657a95fa0c356873def.json.gz +0 -0
- package/.cache/babel/421ac952d6b472ba18e1cb95ef65f42a.json.gz +0 -0
- package/.cache/babel/424185dd50e91d8dee5fdae43086010e.json.gz +0 -0
- package/.cache/babel/427a6423ebde76bcb488747127e47351.json.gz +0 -0
- package/.cache/babel/43e800659f23430a181fb4fc328eb6ef.json.gz +0 -0
- package/.cache/babel/469651017a2b6f3b9f63fda034974b3a.json.gz +0 -0
- package/.cache/babel/480d26447b7ee019a37e4e18422403e9.json.gz +0 -0
- package/.cache/babel/4b58fad313d90a4c1577a2766e6c924c.json.gz +0 -0
- package/.cache/babel/4d2d42fea63650192d1a3a5648b621c5.json.gz +0 -0
- package/.cache/babel/4d8c26a76e77fa64d01f30a5f2d62f85.json.gz +0 -0
- package/.cache/babel/4f606ce6656565507a74aaac8dc21eea.json.gz +0 -0
- package/.cache/babel/505f37592f4c601ccdc1581ca89d9009.json.gz +0 -0
- package/.cache/babel/50aaf34aa54b2cd3058518e42850bb62.json.gz +0 -0
- package/.cache/babel/51fbf389462feb111228ba7ec64c631d.json.gz +0 -0
- package/.cache/babel/51fc90ae5fe129a095172032f304dc2c.json.gz +0 -0
- package/.cache/babel/53dbf5484c5601528c2fd8d7fe728b78.json.gz +0 -0
- package/.cache/babel/58e4535574062eb2d8fa56d002e7190d.json.gz +0 -0
- package/.cache/babel/5aa5e8d1492938c62999de022c4b220e.json.gz +0 -0
- package/.cache/babel/5d64e475284e52c104df17e26066b17b.json.gz +0 -0
- package/.cache/babel/6333c664d69f13036f42bcf575c8e65d.json.gz +0 -0
- package/.cache/babel/635c439786b8522888342779b28ee9ee.json.gz +0 -0
- package/.cache/babel/648cffdd5ec4a2446f8935a17b98080b.json.gz +0 -0
- package/.cache/babel/64b0dd478e6f2dd51de5ee20e311aee7.json.gz +0 -0
- package/.cache/babel/6531721abbc0b3906b28b268ed7914af.json.gz +0 -0
- package/.cache/babel/66bf5585c7901a76c7d4014fa9ffed40.json.gz +0 -0
- package/.cache/babel/6ef313cb6d3a59f73a6b78e1a729fb13.json.gz +0 -0
- package/.cache/babel/6f14eed506421f15710d3dfafe3dcd93.json.gz +0 -0
- package/.cache/babel/70f6c01d8c6bc3efc41c97eaf49f7617.json.gz +0 -0
- package/.cache/babel/72321dde68f0bb9c334d90d6f4584be8.json.gz +0 -0
- package/.cache/babel/76c815fab58595f57e01af6591791d57.json.gz +0 -0
- package/.cache/babel/7c10f4d554daa8efe1e0a4457fb6d27b.json.gz +0 -0
- package/.cache/babel/7dffccddd9780ab37fb79f809947c2cd.json.gz +0 -0
- package/.cache/babel/7e5162e3319cd5d6fca6c0db0516aaeb.json.gz +0 -0
- package/.cache/babel/803192c922f7d419648bab7e1201b22e.json.gz +0 -0
- package/.cache/babel/81f3f0f896d29cdf88f8543dedb77787.json.gz +0 -0
- package/.cache/babel/84c019d3d643195fb37d08110f15f8c9.json.gz +0 -0
- package/.cache/babel/853c31db7c4351f2f36d1021c667224d.json.gz +0 -0
- package/.cache/babel/88ec99735ea4f314937736f04360ff8c.json.gz +0 -0
- package/.cache/babel/8959ab8fcfa783cb56e9418b99c0951c.json.gz +0 -0
- package/.cache/babel/8b9624d721f8706682e33fe1853c8287.json.gz +0 -0
- package/.cache/babel/8de5c373bbc4b6fbeec373d582935887.json.gz +0 -0
- package/.cache/babel/8f24517cff634d2e91c19e51be8816cc.json.gz +0 -0
- package/.cache/babel/901e1bb823eca196b594baa35a35a81c.json.gz +0 -0
- package/.cache/babel/90dbc666ff9fa3b88f305fe90a9917bf.json.gz +0 -0
- package/.cache/babel/91b62dfd9475df7a39dc08fbd43847f9.json.gz +0 -0
- package/.cache/babel/956daf27323e3b87bf8bf9bbf58881ed.json.gz +0 -0
- package/.cache/babel/959e9b81103c539a9d85ac60955451b9.json.gz +0 -0
- package/.cache/babel/963b1e44be998c4dcc6845745c377369.json.gz +0 -0
- package/.cache/babel/966b41ac1317b3e03ca1e59f7eb57e8c.json.gz +0 -0
- package/.cache/babel/969d5992cc682e3b43761ef02c10b851.json.gz +0 -0
- package/.cache/babel/99df128bb528d0f95a56b311801d14c1.json.gz +0 -0
- package/.cache/babel/9b33e7d21f3fc4955a536a033cced71b.json.gz +0 -0
- package/.cache/babel/9c5ec84f77314a621c01ad77da7ccb58.json.gz +0 -0
- package/.cache/babel/9d325af12a88623602a5f8c2fce04847.json.gz +0 -0
- package/.cache/babel/a413e4d325543836d0800684bb26ed04.json.gz +0 -0
- package/.cache/babel/a5405f86b8d1485e62a125275507e60f.json.gz +0 -0
- package/.cache/babel/a7f7461321ca6fd4360df04bb894c106.json.gz +0 -0
- package/.cache/babel/a8a6812e1c7b65cc6d0bdebe2a35c8ca.json.gz +0 -0
- package/.cache/babel/aa89cfc4c88fcc465b8d74af824e7f6b.json.gz +0 -0
- package/.cache/babel/adbaeb5ddf5612b3dcd233a3f6f17bf2.json.gz +0 -0
- package/.cache/babel/ae18cd6ec42a3366c73435b62a9f5f70.json.gz +0 -0
- package/.cache/babel/aea149ee1ec6fa3ca7839c63f5edd78d.json.gz +0 -0
- package/.cache/babel/af1b34067a69854e109c0b0e45d90e43.json.gz +0 -0
- package/.cache/babel/b3a335ab950f502914013810b43b0ad5.json.gz +0 -0
- package/.cache/babel/b6cfba15cda3404d4b1041df448ed2b2.json.gz +0 -0
- package/.cache/babel/ba711530bd319618a0510d8361bebb45.json.gz +0 -0
- package/.cache/babel/ba77e682225df6126b636458055601d9.json.gz +0 -0
- package/.cache/babel/bab8189a74eee8d72702d1510b52b3b3.json.gz +0 -0
- package/.cache/babel/bd8741020db56bb5d999252812d1d717.json.gz +0 -0
- package/.cache/babel/beaa874c5e01203d9dbe23cb89405276.json.gz +0 -0
- package/.cache/babel/c196c9b8c21953c474acdaa9029b3cbf.json.gz +0 -0
- package/.cache/babel/c1e31e6c217023eb3d3fd5d3de486ac3.json.gz +0 -0
- package/.cache/babel/c3aa996443e7f377aa423bcc03ffc617.json.gz +0 -0
- package/.cache/babel/c481eae84d69b65405a44af442dbfea7.json.gz +0 -0
- package/.cache/babel/c4a817d6c4bf6eb3687ffccc5c2df801.json.gz +0 -0
- package/.cache/babel/c8b10cf6f706fb669d6dd7564385768d.json.gz +0 -0
- package/.cache/babel/caa2f98ba4af6eba0605543f690693c6.json.gz +0 -0
- package/.cache/babel/cada4b2cecb2c1fcc48b7a7ecda54907.json.gz +0 -0
- package/.cache/babel/d1bed5404789c427c32965ac6ecad0d9.json.gz +0 -0
- package/.cache/babel/d395e8c0a9c63680f2dcf90ca0e91d4a.json.gz +0 -0
- package/.cache/babel/d4672090e0dd9a73bfb00bd770b23643.json.gz +0 -0
- package/.cache/babel/d4c81f65fe6d78cdbdcf1ef901b7ba1b.json.gz +0 -0
- package/.cache/babel/d515ddc0797ea256ff7271507737e9ce.json.gz +0 -0
- package/.cache/babel/d742848d263503f79168f1a6b8a52097.json.gz +0 -0
- package/.cache/babel/d834b41d7028519ecd0cbc8c65d33dde.json.gz +0 -0
- package/.cache/babel/d9060b9162e7caf974db0b90b6134727.json.gz +0 -0
- package/.cache/babel/d946975b9beac51a39f600461e84b1b6.json.gz +0 -0
- package/.cache/babel/daf0af780cff2270b1ae0e4b97a5a4ab.json.gz +0 -0
- package/.cache/babel/db5215643b0737dc5245972a5c25f736.json.gz +0 -0
- package/.cache/babel/dd57b8d31664b147b9f1e3f5cd18cc2a.json.gz +0 -0
- package/.cache/babel/e0c78bdaae19f15e2dd4a773e842422b.json.gz +0 -0
- package/.cache/babel/e1a2c7e4fc3afe9cc6e03d60f4e4a23d.json.gz +0 -0
- package/.cache/babel/e210ff9aa99df972b8d81c4bda70f642.json.gz +0 -0
- package/.cache/babel/e259a73f84d5b92b94e6d094719264c3.json.gz +0 -0
- package/.cache/babel/e6ce03a9908c9c4dc2c723531f1073f6.json.gz +0 -0
- package/.cache/babel/e8a1501dd8e4b3389ecdc8f722622359.json.gz +0 -0
- package/.cache/babel/eb3bb371036da362c42db50248d0b180.json.gz +0 -0
- package/.cache/babel/eb854e03c810bdb969497b2a36119bfa.json.gz +0 -0
- package/.cache/babel/ec25bb53826070b7f301e64f02355b8c.json.gz +0 -0
- package/.cache/babel/edbaca20e4a65f850c3d8321c1945718.json.gz +0 -0
- package/.cache/babel/f059f1ca9e49d5c3e655d20339860dce.json.gz +0 -0
- package/.cache/babel/f24c559fb42ef906405966598baf5f80.json.gz +0 -0
- package/.cache/babel/f2f333c3c546ad711d722d782decd450.json.gz +0 -0
- package/.cache/babel/f42c854ce8f1dc1a6e6fe7c510b033a5.json.gz +0 -0
- package/.cache/babel/f5211608f22c2e12594eafdbc4e66aa5.json.gz +0 -0
- package/.cache/babel/f645b8c88a49718cd778e3595212d4eb.json.gz +0 -0
- package/.cache/babel/f66dda5c4e4e9d04eb6b7411fcb12a65.json.gz +0 -0
- package/.cache/babel/f9d5b6f3f5438342dba75c2ce6143eef.json.gz +0 -0
- package/.cache/babel/fc9c60ee1d2e8783ba4c08db5cf97d40.json.gz +0 -0
- package/.cache/babel/fd558798cea72d04fb826468a89d72aa.json.gz +0 -0
- package/.cache/babel/fe735cbd0f6e131e28d8b6eb1f39141b.json.gz +0 -0
- package/.eslintrc.js +3 -26
- package/.nvmrc +1 -0
- package/CHANGELOG.md +422 -0
- package/babel.config.js +6 -0
- package/block-list.json +1 -1
- package/composer.json +2 -2
- package/composer.lock +446 -161
- package/dist/author-list/view.asset.php +1 -0
- package/dist/author-list/view.css +1 -0
- package/dist/author-list/view.js +1 -0
- package/dist/author-list/view.rtl.css +1 -0
- package/dist/author-profile/view.asset.php +1 -0
- package/dist/author-profile/view.css +1 -0
- package/dist/author-profile/view.js +1 -0
- package/dist/author-profile/view.rtl.css +1 -0
- package/dist/block_styles.asset.php +1 -0
- package/dist/block_styles.css +1 -0
- package/dist/block_styles.js +1 -0
- package/dist/block_styles.rtl.css +1 -0
- package/dist/carousel/view.asset.php +1 -0
- package/dist/carousel/view.css +1 -0
- package/dist/carousel/view.js +1 -0
- package/dist/carousel/view.rtl.css +1 -0
- package/dist/donate/view.asset.php +1 -0
- package/dist/donate/view.css +1 -0
- package/dist/donate/view.js +1 -0
- package/dist/donate/view.rtl.css +1 -0
- package/dist/donateStreamlined.asset.php +1 -0
- package/dist/donateStreamlined.css +1 -0
- package/dist/donateStreamlined.js +1 -0
- package/dist/donateStreamlined.rtl.css +1 -0
- package/dist/editor.asset.php +1 -0
- package/dist/editor.css +1 -0
- package/dist/editor.js +41 -0
- package/dist/editor.rtl.css +1 -0
- package/dist/homepage-articles/view.asset.php +1 -0
- package/dist/homepage-articles/view.css +1 -0
- package/dist/homepage-articles/view.js +1 -0
- package/dist/homepage-articles/view.rtl.css +1 -0
- package/dist/iframe/view.asset.php +1 -0
- package/dist/iframe/view.css +1 -0
- package/dist/iframe/view.js +1 -0
- package/dist/iframe/view.rtl.css +1 -0
- package/includes/class-newspack-blocks-api.php +14 -69
- package/includes/class-newspack-blocks-patterns.php +4 -1
- package/includes/class-newspack-blocks.php +421 -95
- package/newspack-blocks.php +26 -2
- package/package.json +31 -129
- package/postcss.config.js +11 -0
- package/src/block-patterns/subscribe-2.php +1 -1
- package/src/block-patterns/subscribe-3.php +1 -1
- package/src/block-patterns/subscribe-7.php +12 -0
- package/src/block-patterns/subscribe-8.php +12 -0
- package/src/block-patterns/subscribe-9.php +12 -0
- package/src/block-styles/core/columns/editor.scss +5 -8
- package/src/block-styles/core/columns/view.scss +83 -42
- package/src/blocks/author-list/block.json +82 -0
- package/src/blocks/author-list/class-wp-rest-newspack-author-list-controller.php +387 -0
- package/src/blocks/author-list/edit.js +527 -0
- package/src/blocks/author-list/editor.js +7 -0
- package/src/blocks/author-list/editor.scss +1 -0
- package/src/blocks/author-list/index.js +45 -0
- package/src/blocks/author-list/view.js +5 -0
- package/src/blocks/author-list/view.php +175 -0
- package/src/blocks/author-list/view.scss +46 -0
- package/src/blocks/author-profile/block.json +8 -0
- package/src/blocks/author-profile/class-wp-rest-newspack-authors-controller.php +69 -14
- package/src/blocks/author-profile/edit.js +212 -189
- package/src/blocks/author-profile/editor.scss +1 -1
- package/src/blocks/author-profile/single-author.js +100 -0
- package/src/blocks/author-profile/view.php +38 -92
- package/src/blocks/author-profile/view.scss +120 -1
- package/src/blocks/carousel/create-swiper.js +14 -5
- package/src/blocks/carousel/edit.js +4 -2
- package/src/blocks/carousel/editor.scss +3 -12
- package/src/blocks/carousel/view.js +1 -1
- package/src/blocks/carousel/view.php +9 -5
- package/src/blocks/carousel/view.scss +29 -3
- package/src/blocks/donate/class-wp-rest-newspack-donate-controller.php +22 -24
- package/src/blocks/donate/edit.js +49 -42
- package/src/blocks/donate/editor.scss +27 -3
- package/src/blocks/donate/index.js +31 -4
- package/src/blocks/donate/streamlined/index.js +248 -0
- package/src/blocks/donate/streamlined/index.test.js +125 -0
- package/src/blocks/donate/streamlined/style.scss +324 -0
- package/src/blocks/donate/streamlined/utils.js +174 -0
- package/src/blocks/donate/streamlined/utils.test.js +18 -0
- package/src/blocks/donate/view.php +77 -36
- package/src/blocks/donate/view.scss +291 -0
- package/src/blocks/homepage-articles/block.json +8 -0
- package/src/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php +24 -78
- package/src/blocks/homepage-articles/edit.js +26 -0
- package/src/blocks/homepage-articles/store.js +11 -1
- package/src/blocks/homepage-articles/templates/article.php +31 -3
- package/src/blocks/homepage-articles/templates/articles-loop.php +6 -5
- package/src/blocks/homepage-articles/utils.js +11 -10
- package/src/blocks/homepage-articles/view.php +4 -1
- package/src/blocks/homepage-articles/view.scss +69 -24
- package/src/blocks/iframe/block.json +34 -0
- package/src/blocks/iframe/class-wp-rest-newspack-iframe-controller.php +345 -0
- package/src/blocks/iframe/edit.js +252 -0
- package/src/blocks/iframe/editor.js +7 -0
- package/src/blocks/iframe/editor.scss +84 -0
- package/src/blocks/iframe/icons.js +10 -0
- package/src/blocks/iframe/iframe-placeholder.js +180 -0
- package/src/blocks/iframe/index.js +48 -0
- package/src/blocks/iframe/view.js +5 -0
- package/src/blocks/iframe/view.php +130 -0
- package/src/blocks/iframe/view.scss +9 -0
- package/src/blocks/video-playlist/view.php +4 -3
- package/src/components/query-controls.js +5 -4
- package/src/setup/editor.js +0 -1
- package/src/shared/js/utils.js +1 -1
- package/src/templates/author-profile-card.php +99 -0
- package/vendor/autoload.php +7 -0
- package/vendor/composer/ClassLoader.php +572 -0
- package/vendor/composer/InstalledVersions.php +350 -0
- package/vendor/composer/LICENSE +21 -0
- package/vendor/composer/autoload_classmap.php +10 -0
- package/vendor/composer/autoload_namespaces.php +9 -0
- package/vendor/composer/autoload_psr4.php +9 -0
- package/vendor/composer/autoload_real.php +55 -0
- package/vendor/composer/autoload_static.php +20 -0
- package/vendor/composer/installed.json +5 -0
- package/vendor/composer/installed.php +23 -0
- package/webpack.config.js +2 -3
- package/.circleci/config.yml +0 -96
- package/.distignore +0 -36
- package/.editorconfig +0 -22
- package/.github/ISSUE_TEMPLATE/Bug_report.md +0 -21
- package/.github/ISSUE_TEMPLATE/Enhancement.md +0 -17
- package/.github/ISSUE_TEMPLATE/Feature_request.md +0 -17
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -29
- package/.github/workflows/main.yml +0 -15
- package/.phpcs.xml.dist +0 -55
- package/.prettierrc +0 -10
- package/.stylelintrc +0 -21
- package/.travis.yml +0 -67
- package/phpunit.xml.dist +0 -16
- package/src/blocks/author-profile/shared.scss +0 -95
- package/src/blocks/donate/streamlined.js +0 -180
- package/src/blocks/donate/streamlined.scss +0 -124
- package/src/setup/public-path.js +0 -13
- package/src/setup/view.js +0 -4
- package/tests/bootstrap.php +0 -31
- package/tests/test-sample.php +0 -20
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.blog/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 1.
|
|
10
|
+
* Version: 1.48.0
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '1.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '1.48.0' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
|
@@ -27,9 +27,15 @@ require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'src/blocks/homepage-articles/class-w
|
|
|
27
27
|
// REST Controller for Author Profile Block.
|
|
28
28
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'src/blocks/author-profile/class-wp-rest-newspack-authors-controller.php';
|
|
29
29
|
|
|
30
|
+
// REST Controller for Author List Block.
|
|
31
|
+
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'src/blocks/author-list/class-wp-rest-newspack-author-list-controller.php';
|
|
32
|
+
|
|
30
33
|
// REST Controller for Donate Block.
|
|
31
34
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'src/blocks/donate/class-wp-rest-newspack-donate-controller.php';
|
|
32
35
|
|
|
36
|
+
// REST Controller for Iframe Block.
|
|
37
|
+
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'src/blocks/iframe/class-wp-rest-newspack-iframe-controller.php';
|
|
38
|
+
|
|
33
39
|
/**
|
|
34
40
|
* Registers Articles block routes.
|
|
35
41
|
*/
|
|
@@ -48,6 +54,15 @@ function newspack_authors_block_register_rest_routes() { // phpcs:ignore WordPre
|
|
|
48
54
|
}
|
|
49
55
|
add_action( 'rest_api_init', 'newspack_authors_block_register_rest_routes' );
|
|
50
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Registers Author List block routes.
|
|
59
|
+
*/
|
|
60
|
+
function newspack_author_list_block_register_rest_routes() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
|
|
61
|
+
$author_list_controller = new WP_REST_Newspack_Author_List_Controller();
|
|
62
|
+
$author_list_controller->register_routes();
|
|
63
|
+
}
|
|
64
|
+
add_action( 'rest_api_init', 'newspack_author_list_block_register_rest_routes' );
|
|
65
|
+
|
|
51
66
|
/**
|
|
52
67
|
* Registers Donate block routes.
|
|
53
68
|
*/
|
|
@@ -57,6 +72,15 @@ function newspack_donate_block_register_rest_routes() { // phpcs:ignore WordPres
|
|
|
57
72
|
}
|
|
58
73
|
add_action( 'rest_api_init', 'newspack_donate_block_register_rest_routes' );
|
|
59
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Registers Iframe block routes.
|
|
77
|
+
*/
|
|
78
|
+
function newspack_iframe_block_register_rest_routes() { // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound
|
|
79
|
+
$iframe_controller = new WP_REST_Newspack_Iframe_Controller();
|
|
80
|
+
$iframe_controller->register_routes();
|
|
81
|
+
}
|
|
82
|
+
add_action( 'rest_api_init', 'newspack_iframe_block_register_rest_routes' );
|
|
83
|
+
|
|
60
84
|
Newspack_Blocks::manage_view_scripts();
|
|
61
85
|
add_action( 'enqueue_block_editor_assets', array( 'Newspack_Blocks', 'enqueue_block_editor_assets' ) );
|
|
62
86
|
add_action( 'wp_enqueue_scripts', array( 'Newspack_Blocks', 'enqueue_block_styles_assets' ) );
|
package/package.json
CHANGED
|
@@ -1,150 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/newspack-blocks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.48.0",
|
|
4
4
|
"author": "Automattic",
|
|
5
5
|
"devDependencies": {
|
|
6
|
-
"@
|
|
7
|
-
"@
|
|
8
|
-
"@
|
|
9
|
-
"@commitlint/config-conventional": "^8.3.4",
|
|
10
|
-
"@semantic-release/changelog": "^5.0.0",
|
|
11
|
-
"@semantic-release/git": "^9.0.0",
|
|
12
|
-
"@wordpress/api-fetch": "^5.2.1",
|
|
13
|
-
"@wordpress/base-styles": "^3.6.0",
|
|
14
|
-
"@wordpress/block-editor": "^7.0.1",
|
|
15
|
-
"@wordpress/blocks": "^11.0.1",
|
|
16
|
-
"@wordpress/components": "^16.0.0",
|
|
17
|
-
"@wordpress/element": "^4.0.0",
|
|
18
|
-
"@wordpress/eslint-plugin": "^9.1.1",
|
|
19
|
-
"@wordpress/stylelint-config": "^19.1.0",
|
|
20
|
-
"@wordpress/url": "^3.2.1",
|
|
21
|
-
"classnames": "^2.2.6",
|
|
22
|
-
"commitizen": "^4.0.3",
|
|
23
|
-
"cz-conventional-changelog": "^3.0.2",
|
|
6
|
+
"@rushstack/eslint-patch": "^1.1.2",
|
|
7
|
+
"@testing-library/dom": "^8.13.0",
|
|
8
|
+
"@testing-library/user-event": "^14.1.0",
|
|
24
9
|
"eslint": "^7.32.0",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"prettier": "npm:wp-prettier@2.2.1-beta-1",
|
|
33
|
-
"semantic-release": "^16.0.2",
|
|
34
|
-
"semantic-release-version-bump": "^1.3.0",
|
|
35
|
-
"stylelint": "^13.13.1",
|
|
36
|
-
"stylelint-config-prettier": "^8.0.0",
|
|
37
|
-
"stylelint-prettier": "^1.1.2",
|
|
38
|
-
"webpack": "^5.46.0",
|
|
39
|
-
"webpack-cli": "^4.7.2 "
|
|
10
|
+
"fetch-mock-jest": "^1.5.1",
|
|
11
|
+
"html-entities": "^2.3.3",
|
|
12
|
+
"identity-obj-proxy": "^3.0.0",
|
|
13
|
+
"lint-staged": "^12.3.7",
|
|
14
|
+
"newspack-scripts": "^3.3.0",
|
|
15
|
+
"prettier": "npm:wp-prettier@^2.2.1-beta-1",
|
|
16
|
+
"stylelint": "^13.3.1"
|
|
40
17
|
},
|
|
41
18
|
"description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
|
|
42
|
-
"directories": {
|
|
43
|
-
"test": "tests"
|
|
44
|
-
},
|
|
45
19
|
"dependencies": {
|
|
46
|
-
"@stripe/stripe-js": "^1.
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"@wordpress/date": "^4.2.1",
|
|
51
|
-
"@wordpress/dom-ready": "^3.2.1",
|
|
52
|
-
"@wordpress/edit-post": "^5.0.1",
|
|
53
|
-
"@wordpress/escape-html": "^2.2.1",
|
|
54
|
-
"@wordpress/hooks": "^3.2.0",
|
|
55
|
-
"@wordpress/html-entities": "^3.2.1",
|
|
56
|
-
"@wordpress/i18n": "^4.2.1",
|
|
57
|
-
"@wordpress/icons": "^5.0.1",
|
|
58
|
-
"@wordpress/keycodes": "^3.2.1",
|
|
59
|
-
"@wordpress/plugins": "^4.0.1",
|
|
60
|
-
"lodash": "^4.17.20",
|
|
61
|
-
"newspack-components": "^1.6.1",
|
|
20
|
+
"@stripe/stripe-js": "^1.27.0",
|
|
21
|
+
"classnames": "^2.3.1",
|
|
22
|
+
"lodash": "^4.17.21",
|
|
23
|
+
"newspack-components": "^2.0.3",
|
|
62
24
|
"react": "^17.0.2",
|
|
63
|
-
"redux": "^4.
|
|
25
|
+
"redux": "^4.1.2",
|
|
64
26
|
"redux-saga": "^1.1.3",
|
|
65
|
-
"regenerator-runtime": "^0.13.
|
|
66
|
-
"swiper": "4.
|
|
27
|
+
"regenerator-runtime": "^0.13.9",
|
|
28
|
+
"swiper": "7.4.1"
|
|
67
29
|
},
|
|
68
30
|
"scripts": {
|
|
69
|
-
"cm": "
|
|
70
|
-
"semantic-release": "
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"lint
|
|
31
|
+
"cm": "newspack-scripts commit",
|
|
32
|
+
"semantic-release": "newspack-scripts release --files=newspack-blocks.php",
|
|
33
|
+
"build": "newspack-scripts build",
|
|
34
|
+
"start": "npm ci && newspack-scripts watch",
|
|
35
|
+
"watch": "newspack-scripts watch",
|
|
36
|
+
"test": "newspack-scripts test",
|
|
37
|
+
"lint": "npm run lint:scss && npm run lint:js",
|
|
38
|
+
"lint:js": "prettier 'src/**/*.{js,jsx}' --write",
|
|
76
39
|
"lint:js:staged": "eslint --ext .js,.jsx",
|
|
77
40
|
"format:js": "prettier 'src/**/*.{js,jsx}' --write",
|
|
78
|
-
"lint:scss": "stylelint
|
|
41
|
+
"lint:scss": "stylelint '**/*.scss' --syntax scss --config=./node_modules/newspack-scripts/config/stylelint.config.js",
|
|
79
42
|
"format:scss": "prettier --write 'src/**/*.scss'",
|
|
80
|
-
"lint:scss:staged": "stylelint --syntax scss",
|
|
43
|
+
"lint:scss:staged": "stylelint --syntax scss --config=./node_modules/newspack-scripts/config/stylelint.config.js",
|
|
81
44
|
"i18n": "NODE_ENV=production npm run build; bash ./bin/update-translations.sh",
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"release:archive": "rm -rf release && mkdir -p release && rsync -r . ./release/newspack-blocks --exclude-from='./.distignore' && cd release && zip -r newspack-blocks.zip newspack-blocks"
|
|
45
|
+
"release": "npm run build && npm run semantic-release",
|
|
46
|
+
"release:archive": "rm -rf release && mkdir -p release && rsync -r . ./release/newspack-blocks --exclude-from='./.distignore' && cd release && zip -r newspack-blocks.zip newspack-blocks",
|
|
47
|
+
"postinstall": "rm -rf node_modules/newspack-scripts/node_modules/prettier"
|
|
86
48
|
},
|
|
87
49
|
"lint-staged": {
|
|
88
50
|
"*.scss": "npm run lint:scss:staged",
|
|
89
51
|
"*.js": "npm run lint:js:staged"
|
|
90
52
|
},
|
|
91
|
-
"release": {
|
|
92
|
-
"branches": [
|
|
93
|
-
"release",
|
|
94
|
-
{
|
|
95
|
-
"name": "alpha",
|
|
96
|
-
"prerelease": "alpha"
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
"prepare": [
|
|
100
|
-
"@semantic-release/changelog",
|
|
101
|
-
"@semantic-release/npm",
|
|
102
|
-
[
|
|
103
|
-
"semantic-release-version-bump",
|
|
104
|
-
{
|
|
105
|
-
"files": "newspack-blocks.php",
|
|
106
|
-
"callback": "npm run release:archive"
|
|
107
|
-
}
|
|
108
|
-
],
|
|
109
|
-
{
|
|
110
|
-
"path": "@semantic-release/git",
|
|
111
|
-
"assets": [
|
|
112
|
-
"newspack-blocks.php",
|
|
113
|
-
"package.json",
|
|
114
|
-
"package-lock.json",
|
|
115
|
-
"CHANGELOG.md"
|
|
116
|
-
],
|
|
117
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"plugins": [
|
|
121
|
-
"@semantic-release/commit-analyzer",
|
|
122
|
-
"@semantic-release/release-notes-generator",
|
|
123
|
-
[
|
|
124
|
-
"@semantic-release/npm",
|
|
125
|
-
{
|
|
126
|
-
"npmPublish": false
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
"semantic-release-version-bump",
|
|
130
|
-
[
|
|
131
|
-
"@semantic-release/github",
|
|
132
|
-
{
|
|
133
|
-
"assets": [
|
|
134
|
-
{
|
|
135
|
-
"path": "./release/newspack-blocks.zip",
|
|
136
|
-
"label": "newspack-blocks.zip"
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
]
|
|
141
|
-
]
|
|
142
|
-
},
|
|
143
|
-
"config": {
|
|
144
|
-
"commitizen": {
|
|
145
|
-
"path": "./node_modules/cz-conventional-changelog"
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
53
|
"repository": {
|
|
149
54
|
"type": "git",
|
|
150
55
|
"url": "git+https://github.com/Automattic/newspack-blocks.git"
|
|
@@ -152,8 +57,5 @@
|
|
|
152
57
|
"license": "GPL-3.0-or-later",
|
|
153
58
|
"bugs": {
|
|
154
59
|
"url": "https://github.com/Automattic/newspack-blocks/issues"
|
|
155
|
-
},
|
|
156
|
-
"optionalDependencies": {
|
|
157
|
-
"fsevents": "^1.2.11"
|
|
158
60
|
}
|
|
159
61
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
return array(
|
|
9
9
|
'title' => __( 'Subscribe Pattern 2', 'newspack-blocks' ),
|
|
10
|
-
'content' => "<!-- wp:group {\"className\":\"newspack-pattern subscribe__style-2\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-2\"><div class=\"wp-block-group__inner-container\"><!-- wp:cover {\"url\":\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\",\"id\":131} -->\n<div class=\"wp-block-cover has-background-dim\"><img class=\"wp-block-cover__image-background wp-image-131\" alt=\"\" src=\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textAlign\":\"center\"} -->\n<h2 class=\"has-text-align-center\">" . esc_html__( 'Subscribe to our newsletter', 'newspack-blocks' ) . "</h2>\n<!-- /wp:heading --></div></div>\n<!-- /wp:cover -->\n\n<!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us and Mailchimp to receive marketing, updates, and other emails from us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\",\"interests\":[]} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div></div>\n<!-- /wp:group -->",
|
|
10
|
+
'content' => "<!-- wp:group {\"className\":\"newspack-pattern subscribe__style-2\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-2\"><div class=\"wp-block-group__inner-container\"><!-- wp:cover {\"url\":\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\",\"id\":131} -->\n<div class=\"wp-block-cover has-background-dim\"><img class=\"wp-block-cover__image-background wp-image-131\" alt=\"\" src=\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textAlign\":\"center\",\"textColor\":\"white\"} -->\n<h2 class=\"has-text-align-center has-white-color has-text-color\">" . esc_html__( 'Subscribe to our newsletter', 'newspack-blocks' ) . "</h2>\n<!-- /wp:heading --></div></div>\n<!-- /wp:cover -->\n\n<!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us and Mailchimp to receive marketing, updates, and other emails from us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\",\"interests\":[]} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div></div>\n<!-- /wp:group -->",
|
|
11
11
|
'viewportWidth' => 1000,
|
|
12
12
|
'categories' => array( 'newspack-subscribe' ),
|
|
13
13
|
);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
return array(
|
|
9
9
|
'title' => __( 'Subscribe Pattern 3', 'newspack-blocks' ),
|
|
10
|
-
'content' => "<!-- wp:group {\"className\":\"newspack-pattern subscribe__style-3\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-3\"><!-- wp:columns {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-columns are-vertically-aligned-center\"><!-- wp:column {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-column is-vertically-aligned-center\"><!-- wp:cover {\"url\":\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\",\"id\":131,\"contentPosition\":\"center center\"} -->\n<div class=\"wp-block-cover has-background-dim\"><img class=\"wp-block-cover__image-background wp-image-131\" alt=\"\" src=\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading -->\n<h2>" . esc_html__( 'Subscribe to our newsletter', 'newspack-blocks' ) . "</h2>\n<!-- /wp:heading --></div></div>\n<!-- /wp:cover --></div>\n<!-- /wp:column -->\n\n<!-- wp:column {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-column is-vertically-aligned-center\"><!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us and Mailchimp to receive marketing, updates, and other emails from us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\",\"interests\":[]} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div>\n<!-- /wp:group -->",
|
|
10
|
+
'content' => "<!-- wp:group {\"className\":\"newspack-pattern subscribe__style-3\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-3\"><!-- wp:columns {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-columns are-vertically-aligned-center\"><!-- wp:column {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-column is-vertically-aligned-center\"><!-- wp:cover {\"url\":\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\",\"id\":131,\"contentPosition\":\"center center\"} -->\n<div class=\"wp-block-cover has-background-dim\"><img class=\"wp-block-cover__image-background wp-image-131\" alt=\"\" src=\"https://newspack.newspackstaging.com/wp-content/uploads/2020/03/automated_upload-62.jpg\" data-object-fit=\"cover\"/><div class=\"wp-block-cover__inner-container\"><!-- wp:heading {\"textColor\":\"white\"} -->\n<h2 class=\"has-white-color has-text-color\">" . esc_html__( 'Subscribe to our newsletter', 'newspack-blocks' ) . "</h2>\n<!-- /wp:heading --></div></div>\n<!-- /wp:cover --></div>\n<!-- /wp:column -->\n\n<!-- wp:column {\"verticalAlignment\":\"center\"} -->\n<div class=\"wp-block-column is-vertically-aligned-center\"><!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us and Mailchimp to receive marketing, updates, and other emails from us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\",\"interests\":[]} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div>\n<!-- /wp:group -->",
|
|
11
11
|
'viewportWidth' => 1000,
|
|
12
12
|
'categories' => array( 'newspack-subscribe' ),
|
|
13
13
|
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe Pattern 7.
|
|
4
|
+
*
|
|
5
|
+
* @package Newspack_Blocks
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
return array(
|
|
9
|
+
'title' => esc_html__( 'Subscribe Pattern 7', 'newspack-blocks' ),
|
|
10
|
+
'content' => "<!-- wp:group {\"templateLock\":\"all\",\"className\":\"newspack-pattern subscribe__style-7\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-7\"><!-- wp:media-text {\"mediaId\":999,\"mediaLink\":\"https://newspackdev.mystagingwebsite.com/prompts-patterns/pexels-brotin-biswas-518543/\",\"mediaType\":\"image\",\"imageFill\":true} -->\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile is-image-fill\"><figure class=\"wp-block-media-text__media\" style=\"background-image:url(https://newspackdev.mystagingwebsite.com/wp-content/uploads/2022/03/pexels-brotin-biswas-518543-1024x683.jpeg);background-position:50% 50%\"><img src=\"https://newspackdev.mystagingwebsite.com/wp-content/uploads/2022/03/pexels-brotin-biswas-518543-1024x683.jpeg\" alt=\"\" class=\"wp-image-999 size-full\"/></figure><div class=\"wp-block-media-text__content\"><!-- wp:heading {\"lock\":{\"remove\":false},\"level\":4,\"className\":\"newspack-pattern__heading\"} -->\n<h4 class=\"newspack-pattern__heading\">" . esc_html__( 'Subscribe to our Newsletter', 'newspack-blocks' ) . "</h4>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"lock\":{\"remove\":false}} -->\n<p>" . esc_html__( 'Be the first to know about breaking news, articles, and updates.', 'newspack-blocks' ) . "</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\"} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\",\"width\":\"100%\"} /-->\n<!-- /wp:jetpack/mailchimp --></div></div>\n<!-- /wp:media-text --></div>\n<!-- /wp:group -->",
|
|
11
|
+
'categories' => array( 'newspack-subscribe' ),
|
|
12
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe Pattern 8.
|
|
4
|
+
*
|
|
5
|
+
* @package Newspack_Blocks
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
return array(
|
|
9
|
+
'title' => esc_html__( 'Subscribe Pattern 8', 'newspack-blocks' ),
|
|
10
|
+
'content' => "<!-- wp:group {\"templateLock\":\"all\",\"className\":\"newspack-pattern subscribe__style-8\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-8\"><!-- wp:image {\"lock\":{\"remove\":false},\"id\":999} -->\n<figure class=\"wp-block-image\"><img src=\"https://newspack.newspackstaging.com/wp-content/uploads/2022/03/pexels-brotin-biswas-518543-crop-scaled.jpg\" alt=\"\" class=\"wp-image-999\"/></figure>\n<!-- /wp:image -->\n\n<!-- wp:group {\"className\":\"newspack-pattern__inner\"} -->\n<div class=\"wp-block-group newspack-pattern__inner\"><!-- wp:heading {\"lock\":{\"remove\":false},\"level\":4,\"className\":\"newspack-pattern__heading\"} -->\n<h4 class=\"newspack-pattern__heading\">" . esc_html__( 'Subscribe to our Newsletter', 'newspack-blocks' ) . "</h4>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"lock\":{\"remove\":false}} -->\n<p>" . esc_html__( 'Be the first to know about breaking news, articles, and updates.', 'newspack-blocks' ) . "</p>\n<!-- /wp:paragraph -->\n\n<!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\"} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div>\n<!-- /wp:group --></div>\n<!-- /wp:group -->",
|
|
11
|
+
'categories' => array( 'newspack-subscribe' ),
|
|
12
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe Pattern 9.
|
|
4
|
+
*
|
|
5
|
+
* @package Newspack_Blocks
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
return array(
|
|
9
|
+
'title' => esc_html__( 'Subscribe Pattern 9', 'newspack-blocks' ),
|
|
10
|
+
'content' => "<!-- wp:group {\"templateLock\":\"all\",\"className\":\"newspack-pattern subscribe__style-9\"} -->\n<div class=\"wp-block-group newspack-pattern subscribe__style-9\"><!-- wp:columns -->\n<div class=\"wp-block-columns\"><!-- wp:column {\"templateLock\":\"all\"} -->\n<div class=\"wp-block-column\"><!-- wp:heading {\"lock\":{\"remove\":false},\"level\":4,\"className\":\"newspack-pattern__heading\"} -->\n<h4 class=\"newspack-pattern__heading\">" . esc_html__( 'Subscribe to our Newsletter', 'newspack-blocks' ) . "</h4>\n<!-- /wp:heading -->\n\n<!-- wp:paragraph {\"lock\":{\"remove\":false}} -->\n<p>" . esc_html__( 'Be the first to know about breaking news, articles, and updates.', 'newspack-blocks' ) . "</p>\n<!-- /wp:paragraph --></div>\n<!-- /wp:column -->\n\n<!-- wp:column {\"templateLock\":\"all\"} -->\n<div class=\"wp-block-column\"><!-- wp:jetpack/mailchimp {\"consentText\":\"" . esc_html__( 'By subscribing, you agree to share your email address with us. Use the unsubscribe link in those emails to opt out at any time.', 'newspack-blocks' ) . "\"} -->\n<!-- wp:jetpack/button {\"element\":\"button\",\"uniqueId\":\"mailchimp-widget-id\",\"text\":\"" . esc_html__( 'Subscribe', 'newspack-blocks' ) . "\"} /-->\n<!-- /wp:jetpack/mailchimp --></div>\n<!-- /wp:column --></div>\n<!-- /wp:columns --></div>\n<!-- /wp:group -->",
|
|
11
|
+
'categories' => array( 'newspack-subscribe' ),
|
|
12
|
+
);
|
|
@@ -4,17 +4,14 @@
|
|
|
4
4
|
.wp-block-columns {
|
|
5
5
|
@include media( mobile ) {
|
|
6
6
|
&[class*='is-style-first-col-to'] [data-type='core/column'] {
|
|
7
|
-
margin-left:
|
|
7
|
+
margin-left: 2em;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
&[class*='is-style-first-col-to'] [data-type='core/column']:nth-child( 2 ) {
|
|
11
11
|
margin-left: 0;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
&.is-style-first-col-to-second [data-type='core/column']:nth-child( 2 )
|
|
15
|
-
order: -1;
|
|
16
|
-
}
|
|
17
|
-
|
|
14
|
+
&.is-style-first-col-to-second [data-type='core/column']:nth-child( 2 ),
|
|
18
15
|
&.is-style-first-col-to-third [data-type='core/column']:nth-child( 2 ),
|
|
19
16
|
&.is-style-first-col-to-third [data-type='core/column']:nth-child( 3 ) {
|
|
20
17
|
order: -1;
|
|
@@ -37,11 +34,11 @@
|
|
|
37
34
|
|
|
38
35
|
&::after {
|
|
39
36
|
border-right: 1px solid $color__border;
|
|
40
|
-
bottom:
|
|
37
|
+
bottom: 15px;
|
|
41
38
|
content: '';
|
|
42
39
|
position: absolute;
|
|
43
|
-
right: -
|
|
44
|
-
top:
|
|
40
|
+
right: -18px;
|
|
41
|
+
top: 15px;
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
&:nth-child( odd )::after {
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
@import '../../../shared/sass/mixins';
|
|
3
3
|
|
|
4
4
|
.wp-block-columns {
|
|
5
|
-
|
|
6
|
-
margin-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
margin-bottom: 0;
|
|
10
|
-
}
|
|
5
|
+
&.is-not-stack-on-mobile {
|
|
6
|
+
margin-left: -16px;
|
|
7
|
+
max-width: calc( 100% + 32px );
|
|
8
|
+
width: calc( 100% + 32px );
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
@include media( mobile ) {
|
|
@@ -16,12 +14,6 @@
|
|
|
16
14
|
max-width: calc( 100% + 32px );
|
|
17
15
|
width: calc( 100% + 32px );
|
|
18
16
|
|
|
19
|
-
.wp-block-column {
|
|
20
|
-
margin-bottom: 0;
|
|
21
|
-
margin-left: 16px;
|
|
22
|
-
margin-right: 16px;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
17
|
&.is-style-first-col-to-second .wp-block-column:nth-child( 2 ) {
|
|
26
18
|
order: -1;
|
|
27
19
|
}
|
|
@@ -32,32 +24,6 @@
|
|
|
32
24
|
}
|
|
33
25
|
}
|
|
34
26
|
|
|
35
|
-
@include media( tablet ) {
|
|
36
|
-
&.is-style-borders {
|
|
37
|
-
margin-left: -24px;
|
|
38
|
-
max-width: calc( 100% + 48px );
|
|
39
|
-
width: calc( 100% + 48px );
|
|
40
|
-
|
|
41
|
-
> .wp-block-column {
|
|
42
|
-
margin-left: 24px;
|
|
43
|
-
margin-right: 24px;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
@include media( desktop ) {
|
|
49
|
-
&.is-style-borders {
|
|
50
|
-
margin-left: -32px;
|
|
51
|
-
max-width: calc( 100% + 64px );
|
|
52
|
-
width: calc( 100% + 64px );
|
|
53
|
-
|
|
54
|
-
> .wp-block-column {
|
|
55
|
-
margin-left: 32px;
|
|
56
|
-
margin-right: 32px;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
27
|
&.is-style-borders {
|
|
62
28
|
> .wp-block-column {
|
|
63
29
|
position: relative;
|
|
@@ -93,16 +59,91 @@
|
|
|
93
59
|
top: 0;
|
|
94
60
|
}
|
|
95
61
|
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
96
64
|
|
|
65
|
+
&.is-not-stacked-on-mobile {
|
|
66
|
+
> .wp-block-column,
|
|
67
|
+
> .wp-block-column:not( :first-child ),
|
|
68
|
+
> .wp-block-column:nth-child( 2n ) {
|
|
69
|
+
margin: 0 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.is-style-borders > .wp-block-column {
|
|
73
|
+
&::after {
|
|
74
|
+
border-right-width: 1px;
|
|
75
|
+
border-top-width: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: auto;
|
|
78
|
+
right: -16px;
|
|
79
|
+
top: 0;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:not( .is-not-stacked-on-mobile ) {
|
|
85
|
+
> .wp-block-column {
|
|
86
|
+
margin-bottom: 32px;
|
|
87
|
+
|
|
88
|
+
&:last-child {
|
|
89
|
+
margin-bottom: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.is-style-borders {
|
|
94
|
+
> .wp-block-column {
|
|
95
|
+
margin-bottom: 64px;
|
|
96
|
+
|
|
97
|
+
&:last-child {
|
|
98
|
+
margin-bottom: 0;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@include media( mobile ) {
|
|
104
|
+
&.is-style-borders > .wp-block-column,
|
|
105
|
+
> .wp-block-column,
|
|
106
|
+
> .wp-block-column:not( :first-child ),
|
|
107
|
+
> .wp-block-column:nth-child( 2n ) {
|
|
108
|
+
margin: 0 16px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&:not( .is-not-stacked-on-mobile ),
|
|
114
|
+
&.is-not-stacked-on-mobile {
|
|
115
|
+
&.is-style-borders {
|
|
97
116
|
@include media( tablet ) {
|
|
98
|
-
|
|
99
|
-
|
|
117
|
+
margin-left: -24px;
|
|
118
|
+
max-width: calc( 100% + 48px );
|
|
119
|
+
width: calc( 100% + 48px );
|
|
120
|
+
|
|
121
|
+
> .wp-block-column,
|
|
122
|
+
> .wp-block-column:not( :first-child ),
|
|
123
|
+
> .wp-block-column:nth-child( 2n ) {
|
|
124
|
+
margin-left: 24px;
|
|
125
|
+
margin-right: 24px;
|
|
126
|
+
|
|
127
|
+
&::after {
|
|
128
|
+
right: -24px;
|
|
129
|
+
}
|
|
100
130
|
}
|
|
101
131
|
}
|
|
102
132
|
|
|
103
133
|
@include media( desktop ) {
|
|
104
|
-
|
|
105
|
-
|
|
134
|
+
margin-left: -32px;
|
|
135
|
+
max-width: calc( 100% + 64px );
|
|
136
|
+
width: calc( 100% + 64px );
|
|
137
|
+
|
|
138
|
+
> .wp-block-column,
|
|
139
|
+
> .wp-block-column:not( :first-child ),
|
|
140
|
+
> .wp-block-column:nth-child( 2n ) {
|
|
141
|
+
margin-left: 32px;
|
|
142
|
+
margin-right: 32px;
|
|
143
|
+
|
|
144
|
+
&::after {
|
|
145
|
+
right: -32px;
|
|
146
|
+
}
|
|
106
147
|
}
|
|
107
148
|
}
|
|
108
149
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "author-list",
|
|
3
|
+
"category": "newspack",
|
|
4
|
+
"attributes": {
|
|
5
|
+
"className": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"default": ""
|
|
8
|
+
},
|
|
9
|
+
"columns": {
|
|
10
|
+
"type": "number",
|
|
11
|
+
"default": 2
|
|
12
|
+
},
|
|
13
|
+
"exclude": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"default": []
|
|
16
|
+
},
|
|
17
|
+
"excludeEmpty": {
|
|
18
|
+
"type": "boolean",
|
|
19
|
+
"default": false
|
|
20
|
+
},
|
|
21
|
+
"layout": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"default": "list"
|
|
24
|
+
},
|
|
25
|
+
"textSize": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"default": "medium"
|
|
28
|
+
},
|
|
29
|
+
"authorRoles": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"default": [ "Administrator", "Editor", "Author", "Contributor" ]
|
|
32
|
+
},
|
|
33
|
+
"authorType": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"default": "all"
|
|
36
|
+
},
|
|
37
|
+
"showBio": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"default": true
|
|
40
|
+
},
|
|
41
|
+
"showSocial": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"default": true
|
|
44
|
+
},
|
|
45
|
+
"showEmail": {
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"default": true
|
|
48
|
+
},
|
|
49
|
+
"showArchiveLink": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"default": true
|
|
52
|
+
},
|
|
53
|
+
"showSeparators": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"default": false
|
|
56
|
+
},
|
|
57
|
+
"separatorSections": {
|
|
58
|
+
"type": "boolean",
|
|
59
|
+
"default": false
|
|
60
|
+
},
|
|
61
|
+
"showAvatar": {
|
|
62
|
+
"type": "boolean",
|
|
63
|
+
"default": true
|
|
64
|
+
},
|
|
65
|
+
"avatarAlignment": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"default": "left"
|
|
68
|
+
},
|
|
69
|
+
"avatarBorderRadius": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"default": "50%"
|
|
72
|
+
},
|
|
73
|
+
"avatarSize": {
|
|
74
|
+
"type": "number",
|
|
75
|
+
"default": 128
|
|
76
|
+
},
|
|
77
|
+
"avatarHideDefault": {
|
|
78
|
+
"type": "boolean",
|
|
79
|
+
"default": false
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|