@automattic/newspack-blocks 2.1.0 → 2.2.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/6aca28a6c4a1d89dde32fdeb4bda53d5.json.gz +0 -0
- package/.cache/babel/b69c05682a3bd6b8f597906127dab44e.json.gz +0 -0
- package/.cache/babel/c163868a7a55ba37b772721cb99ffc73.json.gz +0 -0
- package/.cache/babel/c7cfb8590e887722a3e715c72ee99bac.json.gz +0 -0
- package/CHANGELOG.md +34 -0
- package/composer.json +2 -2
- package/composer.lock +171 -19
- package/dist/checkout-button/view.asset.php +1 -1
- package/dist/checkout-button/view.css +1 -1
- package/dist/checkout-button/view.rtl.css +1 -1
- package/dist/donateStreamlined.asset.php +1 -1
- package/dist/donateStreamlined.js +1 -1
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.js +1 -1
- 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-newspack-blocks-api.php +44 -30
- package/includes/class-newspack-blocks.php +2 -2
- package/newspack-blocks.php +2 -2
- package/package.json +5 -5
- package/src/block-patterns/subscribe-1.php +1 -1
- package/src/block-patterns/subscribe-10.php +1 -1
- package/src/block-patterns/subscribe-2.php +1 -1
- package/src/block-patterns/subscribe-3.php +1 -1
- package/src/block-patterns/subscribe-4.php +1 -1
- package/src/block-patterns/subscribe-5.php +1 -1
- package/src/block-patterns/subscribe-6.php +1 -1
- package/src/block-patterns/subscribe-7.php +1 -1
- package/src/block-patterns/subscribe-8.php +1 -1
- package/src/block-patterns/subscribe-9.php +1 -1
- package/src/blocks/author-list/class-wp-rest-newspack-author-list-controller.php +9 -11
- package/src/blocks/checkout-button/block.json +3 -0
- package/src/blocks/checkout-button/edit.js +35 -1
- package/src/blocks/checkout-button/save.js +3 -1
- package/src/blocks/checkout-button/view.scss +19 -6
- package/src/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php +13 -0
- package/src/blocks/homepage-articles/edit.js +1 -4
- package/src/blocks/homepage-articles/editor.js +16 -2
- package/src/blocks/homepage-articles/templates/article.php +10 -12
- package/src/blocks/homepage-articles/templates/articles-list.php +2 -2
- package/src/blocks/homepage-articles/view.php +177 -11
- package/src/blocks/homepage-articles/view.scss +0 -102
- package/src/modal-checkout/templates/thankyou.php +7 -1
- package/src/templates/author-profile-card.php +22 -12
- 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/39bcc541624feefe54d1493493ae1ce8.json.gz +0 -0
- package/.cache/babel/4d8c26a76e77fa64d01f30a5f2d62f85.json.gz +0 -0
- package/.cache/babel/6715650e6d89955011841839faac29f2.json.gz +0 -0
- package/.cache/babel/6d457f8985600b07d97aebc4e1a21855.json.gz +0 -0
|
@@ -47,7 +47,8 @@ function newspack_blocks_replace_login_with_order_summary() {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
$is_success
|
|
50
|
+
$is_success = ! $order->has_status( 'failed' );
|
|
51
|
+
$order_item_name = array_values( $order->get_items() )[0]->get_name();
|
|
51
52
|
|
|
52
53
|
?>
|
|
53
54
|
|
|
@@ -79,6 +80,11 @@ function newspack_blocks_replace_login_with_order_summary() {
|
|
|
79
80
|
</li>
|
|
80
81
|
<?php endif; ?>
|
|
81
82
|
|
|
83
|
+
<li>
|
|
84
|
+
<?php esc_html_e( 'Item:', 'newspack-blocks' ); ?>
|
|
85
|
+
<strong><?php echo esc_html( $order_item_name ); ?></strong>
|
|
86
|
+
</li>
|
|
87
|
+
|
|
82
88
|
<li class="woocommerce-order-overview__order order">
|
|
83
89
|
<?php esc_html_e( 'Transaction:', 'newspack-blocks' ); ?>
|
|
84
90
|
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
|
|
@@ -23,16 +23,20 @@ call_user_func(
|
|
|
23
23
|
if ( $attributes['showEmail'] && ! empty( $author['email'] ) ) {
|
|
24
24
|
$social_links['email'] = $author['email'];
|
|
25
25
|
}
|
|
26
|
-
if (
|
|
27
|
-
$
|
|
26
|
+
if ( class_exists( '\Newspack\Authors_Custom_Fields' ) ) {
|
|
27
|
+
if ( $attributes['shownewspack_phone_number'] && ! empty( $author['newspack_phone_number'] ) ) {
|
|
28
|
+
$social_links['newspack_phone_number'] = $author['newspack_phone_number'];
|
|
29
|
+
}
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
$employment_values = [];
|
|
31
|
-
if (
|
|
32
|
-
$
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
$
|
|
33
|
+
if ( class_exists( '\Newspack\Authors_Custom_Fields' ) ) {
|
|
34
|
+
if ( $attributes['shownewspack_role'] && ! empty( $author['newspack_role'] ) ) {
|
|
35
|
+
$employment_values[] = $author['newspack_role'];
|
|
36
|
+
}
|
|
37
|
+
if ( $attributes['shownewspack_employer'] && ! empty( $author['newspack_employer'] ) ) {
|
|
38
|
+
$employment_values[] = $author['newspack_employer'];
|
|
39
|
+
}
|
|
36
40
|
}
|
|
37
41
|
$employment = implode( ', ', $employment_values );
|
|
38
42
|
|
|
@@ -81,11 +85,17 @@ call_user_func(
|
|
|
81
85
|
<?php endif; ?>
|
|
82
86
|
</h3>
|
|
83
87
|
|
|
84
|
-
<?php
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
88
|
+
<?php
|
|
89
|
+
if ( class_exists( '\Newspack\Authors_Custom_Fields' ) ) :
|
|
90
|
+
if ( $attributes['shownewspack_job_title'] && ! empty( $author['newspack_job_title'] ) ) :
|
|
91
|
+
?>
|
|
92
|
+
<p class="wp-block-newspack-blocks-author-profile__job-title">
|
|
93
|
+
<?php echo esc_html( $author['newspack_job_title'] ); ?>
|
|
94
|
+
</p>
|
|
95
|
+
<?php
|
|
96
|
+
endif;
|
|
97
|
+
endif;
|
|
98
|
+
?>
|
|
89
99
|
<?php if ( ! empty( $employment ) ) : ?>
|
|
90
100
|
<p class="wp-block-newspack-blocks-author-profile__employment">
|
|
91
101
|
<?php echo esc_html( $employment ); ?>
|
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 ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16
|
|
6
6
|
{
|
|
7
7
|
private static $loader;
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ class ComposerAutoloaderInitaec483b8816e48daed1110b74d80afc8
|
|
|
22
22
|
return self::$loader;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
spl_autoload_register(array('
|
|
25
|
+
spl_autoload_register(array('ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16', 'loadClassLoader'), true, true);
|
|
26
26
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
|
27
|
-
spl_autoload_unregister(array('
|
|
27
|
+
spl_autoload_unregister(array('ComposerAutoloaderInit71572603e90630c212f3dbb0a10c0c16', 'loadClassLoader'));
|
|
28
28
|
|
|
29
29
|
require __DIR__ . '/autoload_static.php';
|
|
30
|
-
call_user_func(\Composer\Autoload\
|
|
30
|
+
call_user_func(\Composer\Autoload\ComposerStaticInit71572603e90630c212f3dbb0a10c0c16::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 ComposerStaticInit71572603e90630c212f3dbb0a10c0c16
|
|
8
8
|
{
|
|
9
9
|
public static $classMap = array (
|
|
10
10
|
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
|
|
@@ -13,7 +13,7 @@ class ComposerStaticInitaec483b8816e48daed1110b74d80afc8
|
|
|
13
13
|
public static function getInitializer(ClassLoader $loader)
|
|
14
14
|
{
|
|
15
15
|
return \Closure::bind(function () use ($loader) {
|
|
16
|
-
$loader->classMap =
|
|
16
|
+
$loader->classMap = ComposerStaticInit71572603e90630c212f3dbb0a10c0c16::$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-master',
|
|
5
5
|
'version' => 'dev-master',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => '5a2c83bff83cfdcc95fe94c11a039ab718ef76ef',
|
|
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-master',
|
|
15
15
|
'version' => 'dev-master',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => '5a2c83bff83cfdcc95fe94c11a039ab718ef76ef',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|