@automattic/newspack-blocks 4.26.3 → 4.26.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.
@@ -9,7 +9,7 @@ msgstr ""
9
9
  "MIME-Version: 1.0\n"
10
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2026-05-06T21:24:33+00:00\n"
12
+ "POT-Creation-Date: 2026-05-15T23:56:57+00:00\n"
13
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
14
  "X-Generator: WP-CLI 2.12.0\n"
15
15
  "X-Domain: newspack-blocks\n"
@@ -480,12 +480,10 @@ msgstr ""
480
480
  msgid "Subscribe Pattern 7"
481
481
  msgstr ""
482
482
 
483
- #. Translators: %s: The name of the type.
484
- #. Translators: %s: the name of a post type.
485
483
  #: src/blocks/author-profile/view.php:25
486
- #: dist/editor.js:16
487
- #: dist/editor.js:19
488
- #: dist/editor.js:20
484
+ #: dist/editor.js:7
485
+ #: dist/editor.js:10
486
+ #: dist/editor.js:11
489
487
  #: dist/editor.js:30
490
488
  #: src/blocks/author-profile/edit.js:59
491
489
  #: src/blocks/author-profile/edit.js:635
@@ -503,7 +501,7 @@ msgstr ""
503
501
  #. translators: %s: author name.
504
502
  #: src/blocks/author-profile/view.php:62
505
503
  #: dist/editor.js:5
506
- #: dist/editor.js:17
504
+ #: dist/editor.js:8
507
505
  #: dist/editor.js:30
508
506
  #: src/blocks/author-profile/edit.js:85
509
507
  #: src/blocks/author-profile/single-author.js:84
@@ -777,8 +775,8 @@ msgid "(no title)"
777
775
  msgstr ""
778
776
 
779
777
  #: dist/editor.js:1
780
- #: dist/editor.js:19
781
- #: dist/editor.js:20
778
+ #: dist/editor.js:10
779
+ #: dist/editor.js:11
782
780
  #: dist/editor.js:29
783
781
  #: src/blocks/author-list/edit.js:249
784
782
  #: src/blocks/author-profile/edit.js:785
@@ -995,7 +993,7 @@ msgid "9:16"
995
993
  msgstr ""
996
994
 
997
995
  #: dist/editor.js:7
998
- #: dist/editor.js:19
996
+ #: dist/editor.js:10
999
997
  #: dist/editor.js:33
1000
998
  #: dist/editor.js:45
1001
999
  #: dist/editor.js:57
@@ -1007,7 +1005,7 @@ msgid "Settings"
1007
1005
  msgstr ""
1008
1006
 
1009
1007
  #: dist/editor.js:7
1010
- #: dist/editor.js:19
1008
+ #: dist/editor.js:10
1011
1009
  #: dist/editor.js:45
1012
1010
  #: src/blocks/author-profile/edit.js:557
1013
1011
  #: src/blocks/carousel/edit.js:236
@@ -1183,7 +1181,7 @@ msgstr ""
1183
1181
  #. translators: label for small text size option
1184
1182
  #. translators: label for small avatar size option
1185
1183
  #. translators: label for small size option
1186
- #: dist/editor.js:17
1184
+ #: dist/editor.js:8
1187
1185
  #: dist/editor.js:45
1188
1186
  #: src/blocks/author-profile/edit.js:136
1189
1187
  #: src/blocks/author-profile/edit.js:160
@@ -1193,7 +1191,7 @@ msgstr ""
1193
1191
  #. translators: abbreviation for small text size option
1194
1192
  #. translators: abbreviation for small avatar size option
1195
1193
  #. translators: abbreviation for small size
1196
- #: dist/editor.js:17
1194
+ #: dist/editor.js:8
1197
1195
  #: dist/editor.js:45
1198
1196
  #: src/blocks/author-profile/edit.js:137
1199
1197
  #: src/blocks/author-profile/edit.js:161
@@ -1203,7 +1201,7 @@ msgstr ""
1203
1201
  #. translators: label for medium text size option
1204
1202
  #. translators: label for medium avatar size option
1205
1203
  #. translators: label for medium size option
1206
- #: dist/editor.js:17
1204
+ #: dist/editor.js:8
1207
1205
  #: dist/editor.js:45
1208
1206
  #: src/blocks/author-profile/edit.js:141
1209
1207
  #: src/blocks/author-profile/edit.js:165
@@ -1213,7 +1211,7 @@ msgstr ""
1213
1211
  #. translators: abbreviation for medium text size option
1214
1212
  #. translators: abbreviation for medium avatar size option
1215
1213
  #. translators: abbreviation for medium size
1216
- #: dist/editor.js:17
1214
+ #: dist/editor.js:8
1217
1215
  #: dist/editor.js:45
1218
1216
  #: src/blocks/author-profile/edit.js:142
1219
1217
  #: src/blocks/author-profile/edit.js:166
@@ -1223,7 +1221,7 @@ msgstr ""
1223
1221
  #. translators: label for small text size option
1224
1222
  #. translators: label for large avatar size option
1225
1223
  #. translators: label for large size option
1226
- #: dist/editor.js:17
1224
+ #: dist/editor.js:8
1227
1225
  #: dist/editor.js:45
1228
1226
  #: src/blocks/author-profile/edit.js:146
1229
1227
  #: src/blocks/author-profile/edit.js:170
@@ -1233,7 +1231,7 @@ msgstr ""
1233
1231
  #. translators: abbreviation for large text size option
1234
1232
  #. translators: abbreviation for large avatar size option
1235
1233
  #. translators: abbreviation for large size
1236
- #: dist/editor.js:17
1234
+ #: dist/editor.js:8
1237
1235
  #: dist/editor.js:45
1238
1236
  #: src/blocks/author-profile/edit.js:147
1239
1237
  #: src/blocks/author-profile/edit.js:171
@@ -1242,7 +1240,7 @@ msgstr ""
1242
1240
 
1243
1241
  #. translators: label for extra-large text size option
1244
1242
  #. translators: label for extra large size option
1245
- #: dist/editor.js:17
1243
+ #: dist/editor.js:8
1246
1244
  #: dist/editor.js:45
1247
1245
  #: src/blocks/author-profile/edit.js:151
1248
1246
  msgid "Extra Large"
@@ -1251,7 +1249,7 @@ msgstr ""
1251
1249
  #. translators: abbreviation for small text size option
1252
1250
  #. translators: abbreviation for extra-large avatar size option
1253
1251
  #. translators: abbreviation for extra large size
1254
- #: dist/editor.js:17
1252
+ #: dist/editor.js:8
1255
1253
  #: dist/editor.js:45
1256
1254
  #: src/blocks/author-profile/edit.js:152
1257
1255
  #: src/blocks/author-profile/edit.js:176
@@ -1259,72 +1257,72 @@ msgid "XL"
1259
1257
  msgstr ""
1260
1258
 
1261
1259
  #. translators: label for extra-large avatar size option
1262
- #: dist/editor.js:17
1260
+ #: dist/editor.js:8
1263
1261
  #: src/blocks/author-profile/edit.js:175
1264
1262
  msgid "Extra-large"
1265
1263
  msgstr ""
1266
1264
 
1267
- #: dist/editor.js:17
1265
+ #: dist/editor.js:8
1268
1266
  #: src/blocks/author-profile/edit.js:205
1269
1267
  msgid "Select a layout to start with:"
1270
1268
  msgstr ""
1271
1269
 
1272
1270
  #. translators: %s: error text for when no authors are found.
1273
- #: dist/editor.js:18
1274
- #: dist/editor.js:19
1271
+ #: dist/editor.js:9
1272
+ #: dist/editor.js:10
1275
1273
  #: src/blocks/author-profile/edit.js:420
1276
1274
  #: src/blocks/author-profile/edit.js:431
1277
1275
  #, js-format
1278
1276
  msgid "No authors or guest authors found for ID %s."
1279
1277
  msgstr ""
1280
1278
 
1281
- #: dist/editor.js:19
1279
+ #: dist/editor.js:10
1282
1280
  #: src/blocks/author-profile/edit.js:464
1283
1281
  msgid "Error fetching authors for this post."
1284
1282
  msgstr ""
1285
1283
 
1286
- #: dist/editor.js:19
1284
+ #: dist/editor.js:10
1287
1285
  #: src/blocks/author-profile/edit.js:495
1288
1286
  msgid "Error fetching byline authors."
1289
1287
  msgstr ""
1290
1288
 
1291
- #: dist/editor.js:19
1289
+ #: dist/editor.js:10
1292
1290
  #: src/blocks/author-profile/edit.js:559
1293
1291
  msgid "Show authors without bio"
1294
1292
  msgstr ""
1295
1293
 
1296
- #: dist/editor.js:19
1294
+ #: dist/editor.js:10
1297
1295
  #: src/blocks/author-profile/edit.js:560
1298
1296
  msgid "Display author profiles even if their bio is empty."
1299
1297
  msgstr ""
1300
1298
 
1301
- #: dist/editor.js:19
1299
+ #: dist/editor.js:10
1302
1300
  #: src/blocks/author-profile/edit.js:570
1303
1301
  msgid "Text size"
1304
1302
  msgstr ""
1305
1303
 
1306
- #: dist/editor.js:19
1304
+ #: dist/editor.js:10
1307
1305
  #: dist/editor.js:29
1308
1306
  #: src/blocks/author-list/edit.js:277
1309
1307
  #: src/blocks/author-profile/edit.js:585
1310
1308
  msgid "Avatar"
1311
1309
  msgstr ""
1312
1310
 
1313
- #: dist/editor.js:19
1311
+ #: dist/editor.js:10
1314
1312
  #: dist/editor.js:29
1315
1313
  #: src/blocks/author-list/edit.js:279
1316
1314
  #: src/blocks/author-profile/edit.js:587
1317
1315
  msgid "Display avatar"
1318
1316
  msgstr ""
1319
1317
 
1320
- #: dist/editor.js:19
1318
+ #: dist/editor.js:10
1321
1319
  #: dist/editor.js:29
1322
1320
  #: src/blocks/author-list/edit.js:285
1323
1321
  #: src/blocks/author-profile/edit.js:594
1324
1322
  msgid "Hide default avatar"
1325
1323
  msgstr ""
1326
1324
 
1327
- #: dist/editor.js:19
1325
+ #: dist/editor.js:10
1328
1326
  #: dist/editor.js:29
1329
1327
  #: dist/editor.js:51
1330
1328
  #: src/blocks/author-list/edit.js:292
@@ -1332,29 +1330,29 @@ msgstr ""
1332
1330
  msgid "Size"
1333
1331
  msgstr ""
1334
1332
 
1335
- #: dist/editor.js:19
1333
+ #: dist/editor.js:10
1336
1334
  #: dist/editor.js:29
1337
1335
  #: src/blocks/author-list/edit.js:293
1338
1336
  #: src/blocks/author-profile/edit.js:603
1339
1337
  msgid "Avatar size"
1340
1338
  msgstr ""
1341
1339
 
1342
- #: dist/editor.js:19
1340
+ #: dist/editor.js:10
1343
1341
  #: dist/editor.js:29
1344
1342
  #: src/blocks/author-list/edit.js:306
1345
1343
  #: src/blocks/author-profile/edit.js:616
1346
1344
  msgid "Border radius"
1347
1345
  msgstr ""
1348
1346
 
1349
- #: dist/editor.js:19
1347
+ #: dist/editor.js:10
1350
1348
  #: dist/editor.js:29
1351
1349
  #: src/blocks/author-list/edit.js:307
1352
1350
  #: src/blocks/author-profile/edit.js:617
1353
1351
  msgid "Avatar border radius"
1354
1352
  msgstr ""
1355
1353
 
1356
- #: dist/editor.js:19
1357
- #: dist/editor.js:20
1354
+ #: dist/editor.js:10
1355
+ #: dist/editor.js:11
1358
1356
  #: dist/editor.js:29
1359
1357
  #: src/blocks/author-list/edit.js:446
1360
1358
  #: src/blocks/author-profile/edit.js:638
@@ -1362,69 +1360,70 @@ msgstr ""
1362
1360
  msgid "Fetching authors…"
1363
1361
  msgstr ""
1364
1362
 
1365
- #: dist/editor.js:19
1363
+ #: dist/editor.js:10
1366
1364
  #: dist/editor.js:29
1367
1365
  #: src/blocks/author-list/edit.js:345
1368
1366
  #: src/blocks/author-profile/edit.js:652
1369
1367
  msgid "Show avatar on left"
1370
1368
  msgstr ""
1371
1369
 
1372
- #: dist/editor.js:19
1370
+ #: dist/editor.js:10
1373
1371
  #: dist/editor.js:29
1374
1372
  #: src/blocks/author-list/edit.js:351
1375
1373
  #: src/blocks/author-profile/edit.js:658
1376
1374
  msgid "Show avatar on right"
1377
1375
  msgstr ""
1378
1376
 
1379
- #: dist/editor.js:19
1377
+ #: dist/editor.js:10
1380
1378
  #: dist/editor.js:29
1381
1379
  #: src/blocks/author-list/edit.js:362
1382
1380
  #: src/blocks/author-profile/edit.js:670
1383
1381
  msgid "Edit selection"
1384
1382
  msgstr ""
1385
1383
 
1386
- #: dist/editor.js:19
1384
+ #: dist/editor.js:10
1387
1385
  #: src/blocks/author-profile/edit.js:690
1388
1386
  msgid "Select a type:"
1389
1387
  msgstr ""
1390
1388
 
1391
- #: dist/editor.js:19
1389
+ #: dist/editor.js:10
1392
1390
  #: src/blocks/author-profile/edit.js:693
1393
1391
  msgid "Contextual"
1394
1392
  msgstr ""
1395
1393
 
1396
- #: dist/editor.js:19
1394
+ #: dist/editor.js:10
1397
1395
  #: src/blocks/author-profile/edit.js:696
1398
1396
  msgid "Specific"
1399
1397
  msgstr ""
1400
1398
 
1401
- #: dist/editor.js:19
1399
+ #: dist/editor.js:10
1402
1400
  #: src/blocks/author-profile/edit.js:712
1403
1401
  msgid "This block was created with a block theme and is not supported in the current theme. It will render using the classic layout on the frontend."
1404
1402
  msgstr ""
1405
1403
 
1406
- #: dist/editor.js:19
1407
- #: dist/editor.js:20
1404
+ #: dist/editor.js:10
1405
+ #: dist/editor.js:11
1408
1406
  #: src/blocks/author-profile/edit.js:744
1409
1407
  #: src/blocks/author-profile/edit.js:900
1410
1408
  msgid "Author bio is hidden because Custom Byline is active on this post."
1411
1409
  msgstr ""
1412
1410
 
1413
- #: dist/editor.js:19
1414
- #: dist/editor.js:20
1411
+ #: dist/editor.js:10
1412
+ #: dist/editor.js:11
1415
1413
  #: src/blocks/author-profile/edit.js:763
1416
1414
  #: src/blocks/author-profile/edit.js:964
1417
1415
  msgid "Search for an author to display"
1418
1416
  msgstr ""
1419
1417
 
1420
- #: dist/editor.js:19
1421
- #: dist/editor.js:20
1418
+ #: dist/editor.js:10
1419
+ #: dist/editor.js:11
1422
1420
  #: src/blocks/author-profile/edit.js:764
1423
1421
  #: src/blocks/author-profile/edit.js:965
1424
1422
  msgid "Begin typing name, click autocomplete result to select."
1425
1423
  msgstr ""
1426
1424
 
1427
- #: dist/editor.js:19
1425
+ #: dist/editor.js:10
1426
+ #: dist/editor.js:11
1428
1427
  #: dist/editor.js:20
1429
1428
  #: dist/editor.js:29
1430
1429
  #: dist/editor.js:30
@@ -1436,8 +1435,8 @@ msgstr ""
1436
1435
  msgid "author"
1437
1436
  msgstr ""
1438
1437
 
1439
- #: dist/editor.js:19
1440
- #: dist/editor.js:20
1438
+ #: dist/editor.js:10
1439
+ #: dist/editor.js:11
1441
1440
  #: dist/editor.js:29
1442
1441
  #: src/blocks/author-list/edit.js:257
1443
1442
  #: src/blocks/author-profile/edit.js:808
@@ -1445,57 +1444,59 @@ msgstr ""
1445
1444
  msgid "authors"
1446
1445
  msgstr ""
1447
1446
 
1448
- #: dist/editor.js:19
1449
- #: dist/editor.js:20
1447
+ #: dist/editor.js:10
1448
+ #: dist/editor.js:11
1450
1449
  #: src/blocks/author-profile/edit.js:822
1451
1450
  #: src/blocks/author-profile/edit.js:913
1452
1451
  msgid "No authors found for this post."
1453
1452
  msgstr ""
1454
1453
 
1455
- #: dist/editor.js:19
1454
+ #: dist/editor.js:10
1456
1455
  #: src/blocks/author-profile/edit.js:851
1457
1456
  msgid "Preview author"
1458
1457
  msgstr ""
1459
1458
 
1460
1459
  #. translators: %d: number of authors
1461
- #: dist/editor.js:20
1460
+ #: dist/editor.js:11
1462
1461
  #: src/blocks/author-profile/edit.js:860
1463
1462
  #, js-format
1464
1463
  msgid "Previewing 1 of %d authors. All authors display on frontend."
1465
1464
  msgstr ""
1466
1465
 
1467
- #: dist/editor.js:20
1466
+ #: dist/editor.js:11
1468
1467
  msgid "Post-Checkout Button"
1469
1468
  msgstr ""
1470
1469
 
1471
- #: dist/editor.js:20
1470
+ #: dist/editor.js:11
1472
1471
  msgid "After a successful purchase, a button will be presented to finish the process."
1473
1472
  msgstr ""
1474
1473
 
1475
- #: dist/editor.js:20
1474
+ #: dist/editor.js:11
1476
1475
  msgid "Close the modal"
1477
1476
  msgstr ""
1478
1477
 
1479
- #: dist/editor.js:20
1478
+ #: dist/editor.js:11
1480
1479
  msgid "Go to a custom URL"
1481
1480
  msgstr ""
1482
1481
 
1483
- #: dist/editor.js:20
1482
+ #: dist/editor.js:11
1484
1483
  msgid "Go to the previous page"
1485
1484
  msgstr ""
1486
1485
 
1487
- #: dist/editor.js:20
1486
+ #: dist/editor.js:11
1488
1487
  msgid "Button Label"
1489
1488
  msgstr ""
1490
1489
 
1491
- #: dist/editor.js:20
1490
+ #: dist/editor.js:11
1492
1491
  msgid "Custom URL"
1493
1492
  msgstr ""
1494
1493
 
1495
- #: dist/editor.js:20
1494
+ #: dist/editor.js:11
1496
1495
  msgid "https://example.com"
1497
1496
  msgstr ""
1498
1497
 
1498
+ #. Translators: %s: The name of the type.
1499
+ #. Translators: %s: the name of a post type.
1499
1500
  #: dist/editor.js:20
1500
1501
  #: dist/editor.js:29
1501
1502
  #: src/blocks/author-list/edit.js:437
@@ -7,7 +7,7 @@
7
7
  * Author URI: https://newspack.com/
8
8
  * Text Domain: newspack-blocks
9
9
  * Domain Path: /languages
10
- * Version: 4.26.3
10
+ * Version: 4.26.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', '4.26.3' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '4.26.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,13 +1,14 @@
1
1
  {
2
2
  "name": "@automattic/newspack-blocks",
3
- "version": "4.26.3",
3
+ "version": "4.26.4",
4
4
  "author": "Automattic",
5
5
  "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",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/Automattic/newspack-blocks.git"
8
+ "url": "git+https://github.com/Automattic/newspack-workspace.git",
9
+ "directory": "plugins/newspack-blocks"
9
10
  },
10
- "license": "GPL-3.0-or-later",
11
+ "license": "GPL-2.0-or-later",
11
12
  "bugs": {
12
13
  "url": "https://github.com/Automattic/newspack-blocks/issues"
13
14
  },
@@ -44,8 +45,9 @@
44
45
  ],
45
46
  "dependencies": {
46
47
  "classnames": "^2.5.1",
47
- "newspack-colors": "^1.1.0",
48
- "newspack-icons": "^1.0.5",
48
+ "lodash": "^4.17.21",
49
+ "newspack-colors": "1.1.0",
50
+ "newspack-icons": "1.0.8",
49
51
  "redux": "^5.0.0",
50
52
  "redux-saga": "^1.4.2",
51
53
  "regenerator-runtime": "^0.14.1",
@@ -53,8 +55,8 @@
53
55
  },
54
56
  "devDependencies": {
55
57
  "@types/lodash": "^4.17.23",
56
- "newspack-components": "^4.2.0",
57
- "newspack-scripts": "^5.9.2"
58
+ "newspack-components": "4.3.0",
59
+ "newspack-scripts": "5.9.8"
58
60
  },
59
61
  "overrides": {
60
62
  "path-to-regexp": "1.7.0"
@@ -0,0 +1 @@
1
+ module.exports = require( '../../config/release' )( { name: 'newspack-blocks', phpFile: 'newspack-blocks.php', npmPublish: true } );
@@ -47,8 +47,10 @@ function render_callback( $attributes ) {
47
47
  \Newspack_Blocks::enqueue_view_assets( 'checkout-button' );
48
48
 
49
49
  $background_color = $attributes['backgroundColor'] ?? '';
50
+ $text_color = $attributes['textColor'] ?? '';
50
51
  $gradient = $attributes['gradient'] ?? '';
51
52
  $font_size = $attributes['fontSize'] ?? '';
53
+ $font_family = $attributes['fontFamily'] ?? '';
52
54
  $style = $attributes['style'] ?? [];
53
55
  $text_align = $attributes['textAlign'] ?? '';
54
56
  $width = $attributes['width'] ?? '';
@@ -62,22 +64,17 @@ function render_callback( $attributes ) {
62
64
  }
63
65
 
64
66
  // Generate the button.
65
- $button_color = '';
66
- // Get button color from style attribute since style engine doesn't seem to handle this.
67
- if ( isset( $style['elements']['link']['color']['text'] ) ) {
68
- $color = $style['elements']['link']['color']['text'];
69
- $color = explode( '|', $color );
67
+ // Fall back to the legacy link-color storage path if textColor isn't set.
68
+ if ( ! $text_color && isset( $style['elements']['link']['color']['text'] ) ) {
69
+ $color = explode( '|', $style['elements']['link']['color']['text'] );
70
70
  if ( isset( $color[2] ) ) {
71
- $button_color = $color[2];
71
+ $text_color = $color[2];
72
72
  }
73
73
  }
74
74
  $button_styles = Newspack_Blocks::block_styles(
75
75
  $attributes,
76
76
  [
77
- $background_color ? 'background-color:' . esc_attr( $background_color ) . ';' : '',
78
- $font_size ? 'font-size:' . esc_attr( $font_size ) . ';' : '',
79
77
  $width ? 'width:' . esc_attr( $width ) . '%;' : '',
80
- $button_color ? 'color:' . esc_attr( $button_color ) . ';' : '',
81
78
  ]
82
79
  );
83
80
 
@@ -86,19 +83,23 @@ function render_callback( $attributes ) {
86
83
  $attributes,
87
84
  [
88
85
  'wp-block-button__link',
89
- $background_color ? 'has-background has-' . esc_attr( $background_color ) . '-background-color' : '',
90
- $gradient ? 'has-background has-' . esc_attr( $gradient ) . '-gradient-background' : '',
86
+ ( $background_color || $gradient || isset( $style['color']['background'] ) || isset( $style['color']['gradient'] ) ) ? 'has-background' : '',
87
+ $background_color ? 'has-' . esc_attr( $background_color ) . '-background-color' : '',
88
+ $gradient ? 'has-' . esc_attr( $gradient ) . '-gradient-background' : '',
89
+ $font_size ? 'has-' . esc_attr( $font_size ) . '-font-size' : '',
90
+ $font_family ? 'has-' . esc_attr( $font_family ) . '-font-family' : '',
91
91
  $text_align ? 'has-text-align-' . esc_attr( $text_align ) : '',
92
92
  isset( $style['border']['radius'] ) && $style['border']['radius'] === 0 ? 'no-border-radius' : '',
93
- $button_color ? 'has-text-color has-' . esc_attr( $button_color ) . '-color' : '',
93
+ ( $text_color || isset( $style['color']['text'] ) ) ? 'has-text-color' : '',
94
+ $text_color ? 'has-' . esc_attr( $text_color ) . '-color' : '',
94
95
  ]
95
96
  );
96
97
 
97
98
  $button = sprintf(
98
99
  '<button class="%1$s" style="%2$s" type="submit">%3$s</button>',
99
- $button_classes,
100
- $button_styles,
101
- $text
100
+ esc_attr( $button_classes ),
101
+ esc_attr( $button_styles ),
102
+ wp_kses_post( $text )
102
103
  );
103
104
 
104
105
  // Generate hidden fields for the form.
@@ -166,7 +167,7 @@ function render_callback( $attributes ) {
166
167
  [
167
168
  'wp-block-button',
168
169
  ( $font_size || isset( $style['typography']['fontSize'] ) ) ? 'has-custom-font-size' : '',
169
- $width ? ' has-custom-width wp-block-button__width-' . esc_attr( $width ) : '',
170
+ $width ? 'has-custom-width wp-block-button__width-' . esc_attr( $width ) : '',
170
171
  ]
171
172
  );
172
173
  return sprintf(
@@ -1,9 +1,9 @@
1
1
  <?php return array(
2
2
  'root' => array(
3
3
  'name' => 'automattic/newspack-blocks',
4
- 'pretty_version' => 'dev-trunk',
5
- 'version' => 'dev-trunk',
6
- 'reference' => 'ba6bce32bf4ab49e94e637209d8d1aec39ae031a',
4
+ 'pretty_version' => 'dev-main',
5
+ 'version' => 'dev-main',
6
+ 'reference' => 'e6af2c45db24228ad7eca429986c1b42e24605f9',
7
7
  'type' => 'wordpress-plugin',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -11,9 +11,9 @@
11
11
  ),
12
12
  'versions' => array(
13
13
  'automattic/newspack-blocks' => array(
14
- 'pretty_version' => 'dev-trunk',
15
- 'version' => 'dev-trunk',
16
- 'reference' => 'ba6bce32bf4ab49e94e637209d8d1aec39ae031a',
14
+ 'pretty_version' => 'dev-main',
15
+ 'version' => 'dev-main',
16
+ 'reference' => 'e6af2c45db24228ad7eca429986c1b42e24605f9',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),
@@ -1 +0,0 @@
1
- module.exports = { extends: [ '@commitlint/config-conventional' ] };