@automattic/newspack-blocks 3.0.4-alpha.1 → 3.0.4

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.
Files changed (40) hide show
  1. package/.cache/babel/2fa9c6a361abed0c298ce473e621c94c.json.gz +0 -0
  2. package/.cache/babel/6868f766c1c67a550ee0fb3a6ac463de.json.gz +0 -0
  3. package/.cache/babel/817cbaca80eaec949c5221857f548c88.json.gz +0 -0
  4. package/.cache/babel/fdd76bf50199728a7f02fe0f3bf347cd.json.gz +0 -0
  5. package/CHANGELOG.md +2 -3
  6. package/composer.lock +12 -12
  7. package/dist/carousel/view.asset.php +1 -1
  8. package/dist/carousel/view.css +1 -1
  9. package/dist/carousel/view.rtl.css +1 -1
  10. package/dist/editor.asset.php +1 -1
  11. package/dist/editor.css +1 -1
  12. package/dist/editor.js +2 -2
  13. package/dist/editor.rtl.css +1 -1
  14. package/dist/homepage-articles/view.asset.php +1 -1
  15. package/dist/homepage-articles/view.css +1 -1
  16. package/dist/homepage-articles/view.rtl.css +1 -1
  17. package/includes/class-modal-checkout.php +0 -42
  18. package/includes/class-newspack-blocks-api.php +1 -11
  19. package/includes/class-newspack-blocks.php +35 -0
  20. package/newspack-blocks.php +2 -2
  21. package/package.json +2 -2
  22. package/src/blocks/carousel/edit.js +31 -5
  23. package/src/blocks/carousel/index.js +8 -0
  24. package/src/blocks/carousel/view.php +20 -1
  25. package/src/blocks/carousel/view.scss +16 -0
  26. package/src/blocks/homepage-articles/block.json +35 -11
  27. package/src/blocks/homepage-articles/edit.js +24 -9
  28. package/src/blocks/homepage-articles/templates/article.php +2 -2
  29. package/src/blocks/homepage-articles/utils.ts +8 -0
  30. package/src/blocks/homepage-articles/view.php +3 -0
  31. package/src/blocks/homepage-articles/view.scss +6 -1
  32. package/src/types/index.d.ts +2 -0
  33. package/vendor/autoload.php +1 -1
  34. package/vendor/composer/autoload_real.php +4 -4
  35. package/vendor/composer/autoload_static.php +2 -2
  36. package/vendor/composer/installed.php +2 -2
  37. package/.cache/babel/0066e5fc44f03762bbd751d1e2c47eed.json.gz +0 -0
  38. package/.cache/babel/2bec24377bb9890c2268bcd4c8f3953c.json.gz +0 -0
  39. package/.cache/babel/cf7e0092c3cf7ede0fdc1c41a59af356.json.gz +0 -0
  40. package/.cache/babel/d9e74ec24a15371e21e2d1de3f1976c8.json.gz +0 -0
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-polyfill'), 'version' => '98fe1ccb8e90ec2ca3b4644b173d66ad');
1
+ <?php return array('dependencies' => array('wp-polyfill'), 'version' => '0f6eebe13cb7a074b004dc5b8a85d42c');
@@ -1 +1 @@
1
- .newspack-preview-label{position:absolute;top:5px;left:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:0;margin-right:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta .byline:not(:last-child){margin-right:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-right:.5em}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;left:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;right:0;text-align:right;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:right}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-left:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-right:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-right:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-right:0}}
1
+ .newspack-preview-label{position:absolute;top:5px;left:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:0;margin-right:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-right:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-left:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta .byline:not(:last-child){margin-right:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-right:.5em}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;left:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;right:0;text-align:right;text-overflow:ellipsis;z-index:3}.wpnbha.image-alignbehind figcaption a,.wpnbha.image-alignbehind figcaption a:visited{color:#fff}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:right}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-left:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-right:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-right:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 1px 0 0;padding-right:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-right:0}}
@@ -1 +1 @@
1
- .newspack-preview-label{position:absolute;top:5px;right:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:0;margin-left:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta .byline:not(:last-child){margin-left:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-left:.5em}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;right:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;left:0;text-align:left;text-overflow:ellipsis;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:left}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-right:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-left:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-left:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-left:0}}
1
+ .newspack-preview-label{position:absolute;top:5px;right:5px;z-index:1;font-family:sans-serif;font-size:10px;text-transform:uppercase;background:#ffc000;padding:0 4px;border-radius:2px}:root{--wpnbha-col-gap:1em}@media only screen and (min-width:600px){:root{--wpnbha-col-gap:16px}}@media only screen and (min-width:782px){:root{--wpnbha-col-gap:32px}}@media only screen and (min-width:600px){.colgap-2{--wpnbha-col-gap:16px}}@media only screen and (min-width:600px){.colgap-1{--wpnbha-col-gap:8px}}.wpnbha{margin-bottom:1em}.wpnbha article{min-width:0;margin-bottom:1.5em;word-break:break-word;overflow-wrap:break-word;position:relative}.wpnbha article:last-of-type{margin-bottom:0}.wpnbha .article-section-title{font-size:.8em;margin-bottom:.5em;width:100%}.wpnbha .article-section-title mark{background-color:transparent}.wpnbha.is-grid>div{display:flex;flex-flow:row wrap;justify-content:flex-start;gap:var(--wpnbha-col-gap);padding:0;list-style:none}.wpnbha.is-grid article{flex-basis:100%;margin-bottom:0}.wpnbha.is-grid .article-section-title{margin-bottom:calc(1em - var(--wpnbha-col-gap))}@media only screen and (min-width:600px){.wpnbha.columns-3 article,.wpnbha.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)/3*2)}.wpnbha.is-style-borders.columns-3 article,.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(33.33% - var(--wpnbha-col-gap)*2/3*2 - 1px)}.wpnbha.columns-2 article,.wpnbha.columns-4 article,.wpnbha.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)/2)}.wpnbha.is-style-borders.columns-2 article,.wpnbha.is-style-borders.columns-4 article,.wpnbha.is-style-borders.columns-5 article{flex-basis:calc(50% - var(--wpnbha-col-gap)*2/2 - 1px)}.wpnbha.columns-5 article:last-of-type,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:100%}}@media only screen and (min-width:782px){.wpnbha.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)/4*3)}.wpnbha.is-style-borders.columns-4 article{flex-basis:calc(25% - var(--wpnbha-col-gap)*2/4*3 - 1px)}.wpnbha.columns-5 article,.wpnbha.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)/5*4)}.wpnbha.is-style-borders.columns-5 article,.wpnbha.is-style-borders.columns-5 article:last-of-type{flex-basis:calc(20% - var(--wpnbha-col-gap)*2/5*4 - 1px)}.wpnbha.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)/6*5)}.wpnbha.is-style-borders.columns-6 article{flex-basis:calc(16.6666% - var(--wpnbha-col-gap)*2/6*5 - 1px)}}.wpnbha figcaption{font-size:.6em}.wpnbha.image-alignleft .post-has-image,.wpnbha.image-alignright .post-has-image{display:flex}.wpnbha.image-alignleft .post-has-image .post-thumbnail,.wpnbha.image-alignright .post-has-image .post-thumbnail{flex-basis:33%}.wpnbha.image-alignleft .post-has-image .entry-wrapper,.wpnbha.image-alignright .post-has-image .entry-wrapper{flex-basis:67%}.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:block}@media only screen and (min-width:600px){.wpnbha.image-alignleft.mobile-stack .post-has-image,.wpnbha.image-alignright.mobile-stack .post-has-image{display:flex}}@media only screen and (min-width:600px){.wpnbha.image-alignleft.is-4 .post-thumbnail,.wpnbha.image-alignright.is-4 .post-thumbnail{flex-basis:75%}.wpnbha.image-alignleft.is-4 .entry-wrapper,.wpnbha.image-alignright.is-4 .entry-wrapper{flex-basis:25%}.wpnbha.image-alignleft.is-3 .entry-wrapper,.wpnbha.image-alignleft.is-3 .post-thumbnail,.wpnbha.image-alignright.is-3 .entry-wrapper,.wpnbha.image-alignright.is-3 .post-thumbnail{flex-basis:50%}}.wpnbha.image-alignleft.is-1 .post-thumbnail,.wpnbha.image-alignright.is-1 .post-thumbnail{flex-basis:25%}.wpnbha.image-alignleft.is-1 .entry-wrapper,.wpnbha.image-alignright.is-1 .entry-wrapper{flex-basis:75%}.wpnbha.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.image-alignright .post-thumbnail{margin-right:1em}.wpnbha.image-alignright .entry-wrapper{order:-1}.wpnbha.mobile-stack.image-alignleft .post-thumbnail,.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:0;margin-left:0}@media only screen and (min-width:600px){.wpnbha.mobile-stack.image-alignleft .post-thumbnail{margin-left:1em}.wpnbha.mobile-stack.image-alignright .post-thumbnail{margin-right:1em}}.wpnbha .entry-title{margin:0 0 .25em}.wpnbha .entry-title a{color:inherit;text-decoration:none}.wpnbha .entry-meta .byline:not(:last-child){margin-left:1.5em}.wpnbha .entry-meta .updated{display:none}.wpnbha .entry-meta .updated.published{display:block}.wpnbha .avatar{border-radius:100%;display:block;margin-left:.5em}.wpnbha.has-text-color .article-section-title,.wpnbha.has-text-color .cat-links,.wpnbha.has-text-color .cat-links a,.wpnbha.has-text-color .cat-links a:visited,.wpnbha.has-text-color .entry-meta,.wpnbha.has-text-color .entry-meta .byline a,.wpnbha.has-text-color .entry-meta .byline a:visited,.wpnbha.has-text-color .entry-meta a,.wpnbha.has-text-color .entry-title,.wpnbha.has-text-color .entry-title a,.wpnbha.has-text-color .entry-title a:visited,.wpnbha.has-text-color figcaption{color:inherit}.wpnbha.has-text-color .entry-meta span:not(.avatar){opacity:.8}.wpnbha.image-alignbehind .post-has-image{display:flex;align-items:flex-end;position:relative}.wpnbha.image-alignbehind .post-has-image .post-thumbnail{inset:0;margin:0;overflow:hidden;position:absolute}.wpnbha.image-alignbehind .post-has-image .post-thumbnail img{height:100%!important;-o-object-fit:cover!important;object-fit:cover!important;margin:0!important;max-width:1000%!important;width:100%!important}.wpnbha.image-alignbehind .post-has-image .post-thumbnail:after{background:rgba(0,0,0,.5);content:"";inset:0;position:absolute;z-index:1}.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1rem;position:relative;width:100%;z-index:2}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind .post-has-image .entry-wrapper{padding:2rem 1.5rem}}.wpnbha.image-alignbehind .post-has-image .cat-links a,.wpnbha.image-alignbehind .post-has-image .entry-meta,.wpnbha.image-alignbehind .post-has-image .entry-meta .byline a,.wpnbha.image-alignbehind .post-has-image .entry-title a,.wpnbha.image-alignbehind .post-has-image .entry-wrapper{color:#fff}.wpnbha.image-alignbehind figcaption{bottom:1em;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.9);display:-webkit-box;font-style:italic;right:0;-webkit-line-clamp:1;margin:0;max-height:1.6em;overflow:hidden;padding:0 1rem;position:absolute;left:0;text-align:left;text-overflow:ellipsis;z-index:3}.wpnbha.image-alignbehind figcaption a,.wpnbha.image-alignbehind figcaption a:visited{color:#fff}@media only screen and (min-width:1168px){.wpnbha.image-alignbehind figcaption{padding:0 1.5rem}}.wpnbha .error,.wpnbha .loading,.wpnbha button{display:none}.wpnbha>button{margin-top:1em}.wpnbha.has-more-button button{display:block}.wpnbha.has-more-button.is-loading button{display:none}.wpnbha.has-more-button.is-error .error,.wpnbha.has-more-button.is-error button,.wpnbha.has-more-button.is-loading .loading{display:block}.wpnbha .author-avatar,.wpnbha .byline,.wpnbha .cat-links,.wpnbha .posted-on,.wpnbha .tags-links{clip:auto;height:auto;position:relative;width:auto}.wpnbha.has-text-align-center .cat-links,.wpnbha.has-text-align-center .entry-meta,.wpnbha.has-text-align-center .entry-sponsors{justify-content:center}.wpnbha.has-text-align-center.image-alignbehind figcaption,.wpnbha.has-text-align-center figcaption{text-align:inherit}.wpnbha.has-text-align-right .cat-links,.wpnbha.has-text-align-right .entry-meta,.wpnbha.has-text-align-right .entry-sponsors,.wpnbha.has-text-align-right .sponsor-logos{justify-content:flex-end;text-align:left}.wpnbha.has-text-align-right figcaption{text-align:inherit}.wpnbha.has-text-align-right .entry-date:not(:first-child){margin-right:1.5em}.wpnbha.has-text-align-right .entry-meta .byline:not(:last-child){margin:0}.wpnbha .cat-links{display:flex;flex-wrap:wrap;font-size:.6em;font-weight:700;margin:0 0 .5em}.wpnbha .cat-links.sponsor-label{align-items:center;display:flex;gap:.5em}.wpnbha .cat-links a{text-decoration:none}.wpnbha .cat-links a:hover{text-decoration:underline}.wpnbha .entry-sponsors{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.25em;width:100%}.wpnbha .entry-sponsors.plus-author{font-size:.9em}.wpnbha .entry-sponsors.plus-author:not(:last-child){margin-bottom:.5rem}.wpnbha .sponsor-logos{align-items:center;display:inline-flex;flex-wrap:wrap;gap:.5em;line-height:1}@media only screen and (min-width:782px){.wpnbha article .entry-title{font-size:1.6em}.wpnbha article .avatar{height:40px;width:40px}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .avatar,.wpnbha.ts-9 article .avatar,.wpnbha.ts-10 article .avatar{height:2.4em;width:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-10 article .entry-title{font-size:3.6em}}@media only screen and (min-width:1168px){.wpnbha.ts-10 article .entry-title{font-size:4.8em}}@media only screen and (min-width:782px){.wpnbha.ts-9 article .entry-title{font-size:3.4em}}@media only screen and (min-width:1168px){.wpnbha.ts-9 article .entry-title{font-size:4.2em}}@media only screen and (min-width:782px){.wpnbha.ts-8 article .entry-title{font-size:3em}}@media only screen and (min-width:1168px){.wpnbha.ts-8 article .entry-title{font-size:3.6em}}@media only screen and (min-width:782px){.wpnbha.ts-7 article .entry-title{font-size:2.4em}.wpnbha.ts-7 article .avatar{height:48px;width:48px}}@media only screen and (min-width:1168px){.wpnbha.ts-7 article .entry-title{font-size:3em}}@media only screen and (min-width:782px){.wpnbha.ts-6 article .entry-title{font-size:2em}.wpnbha.ts-6 article .avatar{height:44px;width:44px}}@media only screen and (min-width:1168px){.wpnbha.ts-6 article .entry-title{font-size:2.4em}}@media only screen and (min-width:782px){.wpnbha.ts-5 article .entry-title{font-size:1.8em}.wpnbha.ts-5 article .avatar{height:40px;width:40px}}@media only screen and (min-width:1168px){.wpnbha.ts-5 article .entry-title{font-size:2em}}@media only screen and (min-width:782px){.wpnbha.ts-3 article .entry-title{font-size:1.2em}.wpnbha.ts-3 article .entry-meta{font-size:.7em}.wpnbha.ts-3 article .avatar{height:32px;width:32px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-meta,.wpnbha.ts-1 article .entry-wrapper .more-link,.wpnbha.ts-1 article .entry-wrapper p,.wpnbha.ts-1 article .newspack-post-subtitle,.wpnbha.ts-2 article .entry-meta,.wpnbha.ts-2 article .entry-wrapper .more-link,.wpnbha.ts-2 article .entry-wrapper p,.wpnbha.ts-2 article .newspack-post-subtitle{font-size:.7em}}@media only screen and (min-width:782px){.wpnbha.ts-2 article .entry-title{font-size:.9em}.wpnbha.ts-2 article .avatar{height:28px;width:28px}}@media only screen and (min-width:782px){.wpnbha.ts-1 article .entry-title{font-size:.7em}.wpnbha.ts-1 article .avatar{height:24px;width:24px}}.wpnbha.is-style-borders article{border:solid rgba(0,0,0,.2);border-width:0 0 1px;box-sizing:content-box;padding-bottom:1em}.wpnbha.is-style-borders article:last-of-type:not(:first-of-type){border-bottom:0;padding-left:0}@media only screen and (min-width:600px){.wpnbha.is-style-borders.is-grid article{border-width:0;padding-left:0}.wpnbha.is-style-borders.columns-2 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n+2):not(:last-of-type),.wpnbha.is-style-borders.columns-4 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-5 article:nth-of-type(odd):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+1):not(:last-of-type),.wpnbha.is-style-borders.columns-6 article:nth-of-type(3n+2):not(:last-of-type){border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}}@media only screen and (min-width:782px){.wpnbha.is-style-borders.is-grid article{border-width:0 0 0 1px;padding-left:var(--wpnbha-col-gap)}.wpnbha.is-style-borders.columns-1 article,.wpnbha.is-style-borders.columns-2 article:nth-of-type(2n),.wpnbha.is-style-borders.columns-3 article:nth-of-type(3n),.wpnbha.is-style-borders.columns-4 article:nth-of-type(4n),.wpnbha.is-style-borders.columns-5 article:nth-of-type(5n),.wpnbha.is-style-borders.columns-6 article:nth-of-type(6n),.wpnbha.is-style-borders.is-grid article:last-of-type{border:0;padding-left:0}}
@@ -51,8 +51,6 @@ final class Modal_Checkout {
51
51
  add_filter( 'wcs_place_subscription_order_text', [ __CLASS__, 'order_button_text' ], 1 );
52
52
  add_filter( 'woocommerce_order_button_text', [ __CLASS__, 'order_button_text' ] );
53
53
  add_filter( 'option_woocommerce_subscriptions_order_button_text', [ __CLASS__, 'order_button_text' ] );
54
- add_action( 'option_woocommerce_default_customer_address', [ __CLASS__, 'ensure_base_default_customer_address' ] );
55
- add_action( 'default_option_woocommerce_default_customer_address', [ __CLASS__, 'ensure_base_default_customer_address' ] );
56
54
 
57
55
  /** Custom handling for registered users. */
58
56
  add_filter( 'woocommerce_checkout_customer_id', [ __CLASS__, 'associate_existing_user' ] );
@@ -998,46 +996,6 @@ final class Modal_Checkout {
998
996
  return $text;
999
997
  }
1000
998
 
1001
- /**
1002
- * Force option for base country for new customers if unset and billing country optional while state is required
1003
- * unless the NEWSPACK_PREVENT_FORCE_BASE_DEFAULT_CUSTOMER_ADDRESS constant is set.
1004
- *
1005
- * If this option is empty AND billing state is set as a required field AND billing country is not,
1006
- * validation of the state value will fail during modal checkout.
1007
- *
1008
- * See Default Customer Location in: https://woo.com/document/configuring-woocommerce-settings/#general-options
1009
- *
1010
- * @param string $option_value The value of the default customer address option.
1011
- *
1012
- * @return string Option value.
1013
- */
1014
- public static function ensure_base_default_customer_address( $option_value ) {
1015
- // If the option is set, we're good.
1016
- if ( ! empty( $option_value ) ) {
1017
- return $option_value;
1018
- }
1019
-
1020
- // Only in modal checkout.
1021
- if ( ! self::is_modal_checkout() ) {
1022
- return $option_value;
1023
- }
1024
-
1025
- // Escape hatch in case we want the standard behavior even in modal checkout.
1026
- if ( defined( 'NEWSPACK_PREVENT_FORCE_BASE_DEFAULT_CUSTOMER_ADDRESS' ) && NEWSPACK_PREVENT_FORCE_BASE_DEFAULT_CUSTOMER_ADDRESS ) {
1027
- return $option_value;
1028
- }
1029
-
1030
- // If billing state is required but billing country is not, we need to ensure a default location is set.
1031
- if ( defined( '\Newspack\Donations::DONATION_BILLING_FIELDS_OPTION' ) ) {
1032
- $billing_fields = get_option( \Newspack\Donations::DONATION_BILLING_FIELDS_OPTION, [] );
1033
- if ( ! in_array( 'billing_country', $billing_fields, true ) && in_array( 'billing_state', $billing_fields, true ) ) {
1034
- return 'base';
1035
- }
1036
- }
1037
-
1038
- return $option_value;
1039
- }
1040
-
1041
999
  /**
1042
1000
  * If a reader tries to make a purchase with an email address that
1043
1001
  * has been previously registered, automatically associate the transaction
@@ -73,16 +73,6 @@ class Newspack_Blocks_API {
73
73
  return $featured_image_set;
74
74
  }
75
75
 
76
- /**
77
- * Get thumbnail featured image captions for the rest field.
78
- *
79
- * @param array $object_info The object info.
80
- * @return string|null Image caption on success, null on failure.
81
- */
82
- public static function newspack_blocks_get_image_caption( $object_info ) {
83
- return (int) $object_info['featured_media'] > 0 ? trim( wp_get_attachment_caption( $object_info['featured_media'] ) ) : null;
84
- }
85
-
86
76
  /**
87
77
  * Get author info for the rest field.
88
78
  *
@@ -320,7 +310,7 @@ class Newspack_Blocks_API {
320
310
  'newspack_article_classes' => Newspack_Blocks::get_term_classes( $data['id'] ),
321
311
  'newspack_author_info' => self::newspack_blocks_get_author_info( $data ),
322
312
  'newspack_category_info' => self::newspack_blocks_get_primary_category( $data ),
323
- 'newspack_featured_image_caption' => self::newspack_blocks_get_image_caption( $data ),
313
+ 'newspack_featured_image_caption' => Newspack_Blocks::get_image_caption( $data['featured_media'], $attributes['showCaption'], $attributes['showCredit'] ),
324
314
  'newspack_featured_image_src' => self::newspack_blocks_get_image_src( $data ),
325
315
  'newspack_has_custom_excerpt' => self::newspack_blocks_has_custom_excerpt( $data ),
326
316
  'newspack_post_sponsors' => self::newspack_blocks_sponsor_info( $data ),
@@ -1593,5 +1593,40 @@ class Newspack_Blocks {
1593
1593
 
1594
1594
  return '<span class="wpbnbd__tiers__amount__value">' . $wc_formatted_amount . '</span>';
1595
1595
  }
1596
+
1597
+ /**
1598
+ * Get an image caption, optionally with credit appended.
1599
+ *
1600
+ * @param int $attachment_id Attachment ID of the image.
1601
+ * @param bool $include_caption Whether to include the caption.
1602
+ * @param bool $include_credit Whether to include the credit.
1603
+ *
1604
+ * @return string
1605
+ */
1606
+ public static function get_image_caption( $attachment_id = null, $include_caption = true, $include_credit = false ) {
1607
+ if ( ! $attachment_id || ( ! $include_caption && ! $include_credit ) ) {
1608
+ return '';
1609
+ }
1610
+
1611
+ $caption = $include_caption ? wp_get_attachment_caption( $attachment_id ) : '';
1612
+ $credit = '';
1613
+
1614
+ if ( $include_credit && method_exists( 'Newspack\Newspack_Image_Credits', 'get_media_credit_string' ) ) {
1615
+ $credit = \Newspack\Newspack_Image_Credits::get_media_credit_string( $attachment_id );
1616
+ }
1617
+
1618
+ $full_caption = trim( $caption . ' ' . $credit );
1619
+ if ( empty( $full_caption ) ) {
1620
+ return '';
1621
+ }
1622
+
1623
+ $combined_caption = sprintf(
1624
+ '<figcaption%1$s>%2$s</figcaption>',
1625
+ ! empty( $credit ) ? ' class="has-credit"' : '',
1626
+ $full_caption
1627
+ );
1628
+
1629
+ return $combined_caption;
1630
+ }
1596
1631
  }
1597
1632
  Newspack_Blocks::init();
@@ -7,7 +7,7 @@
7
7
  * Author URI: https://newspack.com/
8
8
  * Text Domain: newspack-blocks
9
9
  * Domain Path: /languages
10
- * Version: 3.0.4-alpha.1
10
+ * Version: 3.0.4
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', '3.0.4-alpha.1' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '3.0.4' );
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automattic/newspack-blocks",
3
- "version": "3.0.4-alpha.1",
3
+ "version": "3.0.4",
4
4
  "author": "Automattic",
5
5
  "devDependencies": {
6
6
  "@rushstack/eslint-patch": "^1.7.2",
@@ -10,7 +10,7 @@
10
10
  "@types/lodash.debounce": "^4.0.9",
11
11
  "eslint": "^7.32.0",
12
12
  "fetch-mock-jest": "^1.5.1",
13
- "html-entities": "^2.5.2",
13
+ "html-entities": "^2.4.0",
14
14
  "identity-obj-proxy": "^3.0.0",
15
15
  "lint-staged": "^15.2.2",
16
16
  "newspack-scripts": "^5.3.0",
@@ -161,6 +161,8 @@ class Edit extends Component {
161
161
  showDate,
162
162
  showAuthor,
163
163
  showAvatar,
164
+ showCaption,
165
+ showCredit,
164
166
  showTitle,
165
167
  slidesPerView,
166
168
  specificMode,
@@ -250,8 +252,8 @@ class Edit extends Component {
250
252
  <Fragment>
251
253
  { autoplay && (
252
254
  <Fragment>
253
- <button className="swiper-button swiper-button-pause" ref={ this.btnPauseRef } />
254
- <button className="swiper-button swiper-button-play" ref={ this.btnPlayRef } />
255
+ <button ref={ this.btnPauseRef } />
256
+ <button ref={ this.btnPlayRef } />
255
257
  </Fragment>
256
258
  ) }
257
259
  <div className="swiper-wrapper">
@@ -280,7 +282,9 @@ class Edit extends Component {
280
282
  showCategory ||
281
283
  showTitle ||
282
284
  showAuthor ||
283
- showDate ) && (
285
+ showDate ||
286
+ showCaption ||
287
+ showCredit ) && (
284
288
  <div className="entry-wrapper">
285
289
  { ( post.newspack_post_sponsors ||
286
290
  ( showCategory && 0 < post.newspack_category_info.length ) ) && (
@@ -331,6 +335,14 @@ class Edit extends Component {
331
335
  { dateI18n( dateFormat, post.date ) }
332
336
  </time>
333
337
  ) }
338
+ { ( showCaption || showCredit ) && post.newspack_featured_image_caption && (
339
+ <div
340
+ className="entry-caption"
341
+ dangerouslySetInnerHTML={ {
342
+ __html: post.newspack_featured_image_caption,
343
+ } }
344
+ />
345
+ ) }
334
346
  </div>
335
347
  </div>
336
348
  ) }
@@ -339,8 +351,8 @@ class Edit extends Component {
339
351
  </div>
340
352
  { ! hasNoPosts && ! hasOnePost && (
341
353
  <>
342
- <button className="swiper-button-prev swiper-button" ref={ this.btnPrevRef } />
343
- <button className="swiper-button-next swiper-button" ref={ this.btnNextRef } />
354
+ <button className="swiper-button swiper-button-prev" ref={ this.btnPrevRef } />
355
+ <button className="swiper-button swiper-button-next" ref={ this.btnNextRef } />
344
356
  <div
345
357
  className="swiper-pagination swiper-pagination-bullets"
346
358
  ref={ this.paginationRef }
@@ -534,6 +546,20 @@ class Edit extends Component {
534
546
  />
535
547
  </PanelRow>
536
548
  ) }
549
+ <PanelRow>
550
+ <ToggleControl
551
+ label={ __( 'Show Featured Image Caption', 'newspack-blocks' ) }
552
+ checked={ showCaption }
553
+ onChange={ () => setAttributes( { showCaption: ! showCaption } ) }
554
+ />
555
+ </PanelRow>
556
+ <PanelRow>
557
+ <ToggleControl
558
+ label={ __( 'Show Featured Image Credit', 'newspack-blocks' ) }
559
+ checked={ showCredit }
560
+ onChange={ () => setAttributes( { showCredit: ! showCredit } ) }
561
+ />
562
+ </PanelRow>
537
563
  </PanelBody>
538
564
  <PostTypesPanel attributes={ attributes } setAttributes={ setAttributes } />
539
565
  <PostStatusesPanel attributes={ attributes } setAttributes={ setAttributes } />
@@ -86,6 +86,14 @@ export const settings = {
86
86
  type: 'boolean',
87
87
  default: true,
88
88
  },
89
+ showCaption: {
90
+ type: 'boolean',
91
+ default: false,
92
+ },
93
+ showCredit: {
94
+ type: 'boolean',
95
+ default: false,
96
+ },
89
97
  showCategory: {
90
98
  type: 'boolean',
91
99
  default: false,
@@ -68,6 +68,8 @@ function newspack_blocks_render_block_carousel( $attributes ) {
68
68
  $hide_publish_date = apply_filters( 'newspack_listings_hide_publish_date', false ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
69
69
  $show_author = $attributes['showAuthor'] && ! $hide_author;
70
70
  $show_date = $attributes['showDate'] && ! $hide_publish_date;
71
+ $show_caption = $attributes['showCaption'];
72
+ $show_credit = $attributes['showCredit'];
71
73
 
72
74
  // Validate the value of the "image fit" attribute.
73
75
  $image_fits = [ 'cover', 'contain' ];
@@ -100,7 +102,7 @@ function newspack_blocks_render_block_carousel( $attributes ) {
100
102
  <?php endif; ?>
101
103
  </figure>
102
104
 
103
- <?php if ( ! empty( $sponsors ) || $attributes['showCategory'] || $attributes['showTitle'] || $show_author || $show_date ) : ?>
105
+ <?php if ( ! empty( $sponsors ) || $attributes['showCategory'] || $attributes['showTitle'] || $show_author || $show_date || $show_caption || $show_credit ) : ?>
104
106
  <div class="entry-wrapper">
105
107
  <?php if ( ! empty( $sponsors ) || $attributes['showCategory'] ) : ?>
106
108
  <div class="cat-links <?php if ( ! empty( $sponsors ) ) : ?>sponsor-label<?php endif; // phpcs:ignore Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace ?>">
@@ -193,6 +195,15 @@ function newspack_blocks_render_block_carousel( $attributes ) {
193
195
  esc_html( get_the_date() )
194
196
  );
195
197
  endif;
198
+ if ( $show_caption || $show_credit ) :
199
+ $full_caption = Newspack_Blocks::get_image_caption( get_post_thumbnail_id(), $show_caption, $show_credit );
200
+ if ( $full_caption ) :
201
+ ?>
202
+ <div class="entry-caption">
203
+ <?php echo wp_kses_post( $full_caption ); ?>
204
+ <?php
205
+ endif;
206
+ endif;
196
207
  ?>
197
208
  </div><!-- .entry-meta -->
198
209
  </div><!-- .entry-wrapper -->
@@ -350,6 +361,14 @@ function newspack_blocks_register_carousel() {
350
361
  'type' => 'boolean',
351
362
  'default' => true,
352
363
  ),
364
+ 'showCaption' => array(
365
+ 'type' => 'boolean',
366
+ 'default' => false,
367
+ ),
368
+ 'showCredit' => array(
369
+ 'type' => 'boolean',
370
+ 'default' => false,
371
+ ),
353
372
  'showCategory' => array(
354
373
  'type' => 'boolean',
355
374
  'default' => false,
@@ -77,6 +77,22 @@
77
77
  }
78
78
  }
79
79
  }
80
+
81
+ .entry-caption {
82
+ margin-top: var( --wp--preset--spacing--00, var( --wp--preset--spacing--20, 0.5rem ) );
83
+ width: 100%;
84
+
85
+ figcaption {
86
+ color: #fff;
87
+ font-size: var( --wp--preset--font-size--x-small, var( --newspack-theme-font-size-sm, 0.8em ) );
88
+ line-height: var( --wp--custom--line-height--x-small, var( --newspack-theme-font-line-height-body, 1.6 ) );
89
+
90
+ a {
91
+ font-weight: 400;
92
+ text-decoration: underline;
93
+ }
94
+ }
95
+ }
80
96
  }
81
97
  .post-thumbnail {
82
98
  margin: 0;
@@ -34,6 +34,10 @@
34
34
  "type": "boolean",
35
35
  "default": false
36
36
  },
37
+ "showCredit": {
38
+ "type": "boolean",
39
+ "default": false
40
+ },
37
41
  "disableImageLazyLoad": {
38
42
  "type": "boolean",
39
43
  "default": false
@@ -93,12 +97,16 @@
93
97
  "authors": {
94
98
  "type": "array",
95
99
  "default": [],
96
- "items": { "type": "integer" }
100
+ "items": {
101
+ "type": "integer"
102
+ }
97
103
  },
98
104
  "categories": {
99
105
  "type": "array",
100
106
  "default": [],
101
- "items": { "type": "integer" }
107
+ "items": {
108
+ "type": "integer"
109
+ }
102
110
  },
103
111
  "includeSubcategories": {
104
112
  "type": "boolean",
@@ -107,7 +115,9 @@
107
115
  "tags": {
108
116
  "type": "array",
109
117
  "default": [],
110
- "items": { "type": "integer" }
118
+ "items": {
119
+ "type": "integer"
120
+ }
111
121
  },
112
122
  "customTaxonomies": {
113
123
  "type": "array",
@@ -130,12 +140,16 @@
130
140
  "tagExclusions": {
131
141
  "type": "array",
132
142
  "default": [],
133
- "items": { "type": "integer" }
143
+ "items": {
144
+ "type": "integer"
145
+ }
134
146
  },
135
147
  "categoryExclusions": {
136
148
  "type": "array",
137
149
  "default": [],
138
- "items": { "type": "integer" }
150
+ "items": {
151
+ "type": "integer"
152
+ }
139
153
  },
140
154
  "customTaxonomyExclusions": {
141
155
  "type": "array",
@@ -158,7 +172,9 @@
158
172
  "specificPosts": {
159
173
  "type": "array",
160
174
  "default": [],
161
- "items": { "type": "integer" }
175
+ "items": {
176
+ "type": "integer"
177
+ }
162
178
  },
163
179
  "typeScale": {
164
180
  "type": "integer",
@@ -198,8 +214,12 @@
198
214
  },
199
215
  "postType": {
200
216
  "type": "array",
201
- "default": [ "post" ],
202
- "items": { "type": "string" }
217
+ "default": [
218
+ "post"
219
+ ],
220
+ "items": {
221
+ "type": "string"
222
+ }
203
223
  },
204
224
  "textAlign": {
205
225
  "type": "string",
@@ -207,12 +227,16 @@
207
227
  },
208
228
  "includedPostStatuses": {
209
229
  "type": "array",
210
- "default": [ "publish" ],
211
- "items": { "type": "string" }
230
+ "default": [
231
+ "publish"
232
+ ],
233
+ "items": {
234
+ "type": "string"
235
+ }
212
236
  },
213
237
  "deduplicate": {
214
238
  "type": "boolean",
215
239
  "default": true
216
240
  }
217
241
  }
218
- }
242
+ }
@@ -111,6 +111,7 @@ class Edit extends Component {
111
111
  mediaPosition,
112
112
  minHeight,
113
113
  showCaption,
114
+ showCredit,
114
115
  showExcerpt,
115
116
  showReadMore,
116
117
  readMoreLabel,
@@ -164,8 +165,12 @@ class Edit extends Component {
164
165
  <img src={ post.newspack_featured_image_src.uncropped } alt="" />
165
166
  ) }
166
167
  </a>
167
- { showCaption && '' !== post.newspack_featured_image_caption && (
168
- <figcaption>{ post.newspack_featured_image_caption }</figcaption>
168
+ { ( showCaption || showCredit ) && (
169
+ <div
170
+ dangerouslySetInnerHTML={ {
171
+ __html: post.newspack_featured_image_caption,
172
+ } }
173
+ />
169
174
  ) }
170
175
  </figure>
171
176
  ) }
@@ -273,6 +278,7 @@ class Edit extends Component {
273
278
  postType,
274
279
  showImage,
275
280
  showCaption,
281
+ showCredit,
276
282
  imageScale,
277
283
  mobileStack,
278
284
  minHeight,
@@ -458,13 +464,22 @@ class Edit extends Component {
458
464
  </PanelRow>
459
465
 
460
466
  { showImage && (
461
- <PanelRow>
462
- <ToggleControl
463
- label={ __( 'Show Featured Image Caption', 'newspack-blocks' ) }
464
- checked={ showCaption }
465
- onChange={ () => setAttributes( { showCaption: ! showCaption } ) }
466
- />
467
- </PanelRow>
467
+ <>
468
+ <PanelRow>
469
+ <ToggleControl
470
+ label={ __( 'Show Featured Image Caption', 'newspack-blocks' ) }
471
+ checked={ showCaption }
472
+ onChange={ () => setAttributes( { showCaption: ! showCaption } ) }
473
+ />
474
+ </PanelRow>
475
+ <PanelRow>
476
+ <ToggleControl
477
+ label={ __( 'Show Featured Image Credit', 'newspack-blocks' ) }
478
+ checked={ showCredit }
479
+ onChange={ () => setAttributes( { showCredit: ! showCredit } ) }
480
+ />
481
+ </PanelRow>
482
+ </>
468
483
  ) }
469
484
 
470
485
  { showImage && mediaPosition !== 'top' && mediaPosition !== 'behind' && (
@@ -79,8 +79,8 @@ call_user_func(
79
79
  </a>
80
80
  <?php endif; ?>
81
81
 
82
- <?php if ( $attributes['showCaption'] && '' !== get_the_post_thumbnail_caption() ) : ?>
83
- <figcaption><?php the_post_thumbnail_caption(); ?></figcaption>
82
+ <?php if ( $attributes['showCaption'] || $attributes['showCredit'] ) : ?>
83
+ <?php echo wp_kses_post( Newspack_Blocks::get_image_caption( get_post_thumbnail_id(), $attributes['showCaption'], $attributes['showCredit'] ) ); ?>
84
84
  <?php endif; ?>
85
85
  </figure><!-- .featured-image -->
86
86
  <?php endif; ?>