@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.
- package/.cache/babel/2fa9c6a361abed0c298ce473e621c94c.json.gz +0 -0
- package/.cache/babel/6868f766c1c67a550ee0fb3a6ac463de.json.gz +0 -0
- package/.cache/babel/817cbaca80eaec949c5221857f548c88.json.gz +0 -0
- package/.cache/babel/fdd76bf50199728a7f02fe0f3bf347cd.json.gz +0 -0
- package/CHANGELOG.md +2 -3
- package/composer.lock +12 -12
- package/dist/carousel/view.asset.php +1 -1
- package/dist/carousel/view.css +1 -1
- package/dist/carousel/view.rtl.css +1 -1
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.js +2 -2
- package/dist/editor.rtl.css +1 -1
- package/dist/homepage-articles/view.asset.php +1 -1
- package/dist/homepage-articles/view.css +1 -1
- package/dist/homepage-articles/view.rtl.css +1 -1
- package/includes/class-modal-checkout.php +0 -42
- package/includes/class-newspack-blocks-api.php +1 -11
- package/includes/class-newspack-blocks.php +35 -0
- package/newspack-blocks.php +2 -2
- package/package.json +2 -2
- package/src/blocks/carousel/edit.js +31 -5
- package/src/blocks/carousel/index.js +8 -0
- package/src/blocks/carousel/view.php +20 -1
- package/src/blocks/carousel/view.scss +16 -0
- package/src/blocks/homepage-articles/block.json +35 -11
- package/src/blocks/homepage-articles/edit.js +24 -9
- package/src/blocks/homepage-articles/templates/article.php +2 -2
- package/src/blocks/homepage-articles/utils.ts +8 -0
- package/src/blocks/homepage-articles/view.php +3 -0
- package/src/blocks/homepage-articles/view.scss +6 -1
- package/src/types/index.d.ts +2 -0
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
- package/.cache/babel/0066e5fc44f03762bbd751d1e2c47eed.json.gz +0 -0
- package/.cache/babel/2bec24377bb9890c2268bcd4c8f3953c.json.gz +0 -0
- package/.cache/babel/cf7e0092c3cf7ede0fdc1c41a59af356.json.gz +0 -0
- package/.cache/babel/d9e74ec24a15371e21e2d1de3f1976c8.json.gz +0 -0
|
@@ -40,6 +40,8 @@ const POST_QUERY_ATTRIBUTES = [
|
|
|
40
40
|
'postType',
|
|
41
41
|
'includedPostStatuses',
|
|
42
42
|
'deduplicate',
|
|
43
|
+
'showCaption',
|
|
44
|
+
'showCredit',
|
|
43
45
|
];
|
|
44
46
|
|
|
45
47
|
type HomepageArticlesAttributes = {
|
|
@@ -57,6 +59,8 @@ type HomepageArticlesAttributes = {
|
|
|
57
59
|
tagExclusions: TagId[];
|
|
58
60
|
categoryExclusions: CategoryId[];
|
|
59
61
|
customTaxonomyExclusions: Taxonomy[];
|
|
62
|
+
showCaption: boolean;
|
|
63
|
+
showCredit: boolean;
|
|
60
64
|
};
|
|
61
65
|
|
|
62
66
|
type HomepageArticlesProps = {
|
|
@@ -96,6 +100,8 @@ export const queryCriteriaFromAttributes = ( attributes: Block[ 'attributes' ] )
|
|
|
96
100
|
excerptLength,
|
|
97
101
|
postType,
|
|
98
102
|
showExcerpt,
|
|
103
|
+
showCaption,
|
|
104
|
+
showCredit,
|
|
99
105
|
tags,
|
|
100
106
|
customTaxonomies,
|
|
101
107
|
specificPosts = [],
|
|
@@ -132,6 +138,8 @@ export const queryCriteriaFromAttributes = ( attributes: Block[ 'attributes' ] )
|
|
|
132
138
|
);
|
|
133
139
|
criteria.excerptLength = excerptLength;
|
|
134
140
|
criteria.showExcerpt = showExcerpt;
|
|
141
|
+
criteria.showCaption = showCaption;
|
|
142
|
+
criteria.showCredit = showCredit;
|
|
135
143
|
return criteria;
|
|
136
144
|
};
|
|
137
145
|
|
|
@@ -282,6 +282,9 @@ function newspack_blocks_render_block_homepage_articles( $attributes ) {
|
|
|
282
282
|
if ( $attributes['showCaption'] ) {
|
|
283
283
|
$classes .= ' show-caption';
|
|
284
284
|
}
|
|
285
|
+
if ( $attributes['showCredit'] ) {
|
|
286
|
+
$classes .= ' show-credit';
|
|
287
|
+
}
|
|
285
288
|
if ( $attributes['showCategory'] ) {
|
|
286
289
|
$classes .= ' show-category';
|
|
287
290
|
}
|
package/src/types/index.d.ts
CHANGED
package/vendor/autoload.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// autoload_real.php @generated by Composer
|
|
4
4
|
|
|
5
|
-
class
|
|
5
|
+
class ComposerAutoloaderInitbf41db5fd90f71daf81a6c15709bfd19
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ class ComposerAutoloaderInita79acdd5c7d41d18c52fcb779f35c2e9
|
|
|
22
22
|
return self::$loader;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
spl_autoload_register(array('
|
|
25
|
+
spl_autoload_register(array('ComposerAutoloaderInitbf41db5fd90f71daf81a6c15709bfd19', 'loadClassLoader'), true, true);
|
|
26
26
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
|
27
|
-
spl_autoload_unregister(array('
|
|
27
|
+
spl_autoload_unregister(array('ComposerAutoloaderInitbf41db5fd90f71daf81a6c15709bfd19', 'loadClassLoader'));
|
|
28
28
|
|
|
29
29
|
require __DIR__ . '/autoload_static.php';
|
|
30
|
-
call_user_func(\Composer\Autoload\
|
|
30
|
+
call_user_func(\Composer\Autoload\ComposerStaticInitbf41db5fd90f71daf81a6c15709bfd19::getInitializer($loader));
|
|
31
31
|
|
|
32
32
|
$loader->register(true);
|
|
33
33
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
namespace Composer\Autoload;
|
|
6
6
|
|
|
7
|
-
class
|
|
7
|
+
class ComposerStaticInitbf41db5fd90f71daf81a6c15709bfd19
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -13,7 +13,7 @@ class ComposerStaticInita79acdd5c7d41d18c52fcb779f35c2e9
|
|
|
13
13
|
public static function getInitializer(ClassLoader $loader)
|
|
14
14
|
{
|
|
15
15
|
return \Closure::bind(function () use ($loader) {
|
|
16
|
-
$loader->classMap =
|
|
16
|
+
$loader->classMap = ComposerStaticInitbf41db5fd90f71daf81a6c15709bfd19::$classMap;
|
|
17
17
|
|
|
18
18
|
}, null, ClassLoader::class);
|
|
19
19
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => 'automattic/newspack-blocks',
|
|
4
4
|
'pretty_version' => 'dev-trunk',
|
|
5
5
|
'version' => 'dev-trunk',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '92a7bd33dd1b8a41ecd85a62a748e743015d634a',
|
|
7
7
|
'type' => 'wordpress-plugin',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'automattic/newspack-blocks' => array(
|
|
14
14
|
'pretty_version' => 'dev-trunk',
|
|
15
15
|
'version' => 'dev-trunk',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '92a7bd33dd1b8a41ecd85a62a748e743015d634a',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|