Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
v2.2.0: upgrade widgets + defer load javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Jan 6, 2024
1 parent 76f8a1e commit 59cd775
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ https://web3wordpress.xyz/
In order to release the plugins simply push a git tag:

```
git tag v2.1.4
git push origin v2.1.4
git tag v2.2.0
git push origin v2.2.0
```
2 changes: 1 addition & 1 deletion block.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category": "widgets",
"description": "Web3 donations directly into your own wallet. A Block-enabled WordPress plugin for P2P crypto donations with on-the-fly conversion.",
"keywords": [ "donations", "cryptocurrency", "p2p", "web3", "depay" ],
"version": "2.1.4",
"version": "2.2.0",
"textdomain": "depay-donations",
"example": {},
"editorScript": "depay-donations-script",
Expand Down
31 changes: 25 additions & 6 deletions core/includes/classes/class-depay-donations-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,40 +90,59 @@ public static function render_block(array $attributes) {
'depay-donations-widgets',
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/widgets.bundle.js',
array(),
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/widgets.bundle.js'
DEPAYDONATIONS_VERSION,
array(
'in_footer' => true,
'strategy' => 'defer'
)
);
wp_enqueue_script( 'depay-donations-widgets' );

wp_register_script(
'depay-donations-react-shadow-dom',
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/react-shadow-dom.js',
['wp-element'],
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/react-shadow-dom.js'
DEPAYDONATIONS_VERSION,
array(
'in_footer' => true,
'strategy' => 'defer'
)
);
wp_enqueue_script( 'depay-donations-react-shadow-dom' );

wp_register_script(
'depay-donations-blockchains',
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/blockchains.js',
['wp-element'],
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/blockchains.js'
DEPAYDONATIONS_VERSION,
array(
'in_footer' => true,
'strategy' => 'defer'
)
);
wp_enqueue_script( 'depay-donations-blockchains' );

wp_register_script(
'depay-donations-buttons',
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/buttons.js',
['wp-element'],
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/buttons.js'
DEPAYDONATIONS_VERSION,
array(
'in_footer' => true,
'strategy' => 'defer'
)
);
wp_enqueue_script( 'depay-donations-buttons' );

wp_register_script(
'depay-donations-init-buttons',
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/init-buttons.js',
[],
DEPAYDONATIONS_PLUGIN_URL . 'core/includes/assets/js/init-buttons.js',
true
DEPAYDONATIONS_VERSION,
array(
'in_footer' => true,
'strategy' => 'defer'
)
);
wp_enqueue_script( 'depay-donations-init-buttons' );

Expand Down
4 changes: 2 additions & 2 deletions depay-donations.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Plugin Name: DePay Donations
* Plugin URI: https://depay.com/plugins/wordpress
* Description: Web3 donations directly into your own wallet. Block-enabled Wordpress plugin for P2P cryptocurrency donations on multiple blockchains, with on-the-fly token conversion.
* Version: 2.1.4
* Version: 2.2.0
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Author: DePay
Expand All @@ -29,7 +29,7 @@
define( 'DEPAYDONATIONS_NAME', 'DePay Donations' );

// Plugin version
define( 'DEPAYDONATIONS_VERSION', '2.1.4' );
define( 'DEPAYDONATIONS_VERSION', '2.2.0' );

// Plugin Root File
define( 'DEPAYDONATIONS_PLUGIN_FILE', __FILE__ );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wordpress-depay-donations",
"moduleName": "WordpressDePayDonations",
"version": "2.1.4",
"version": "2.2.0",
"description": "Web3 donations directly into your own wallet. A Block-enabled WordPress plugin for P2P cryptocurrency donations on multiple blockchains.",
"main": "./dist/umd/index.js",
"module": "./dist/esm/index.js",
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Contributors: depayfi
Tags: donations, cryptocurrency, p2p, web3, depay
Requires at least: 5.0
Tested up to: 6.3
Stable tag: 2.1.4
Tested up to: 6.4
Stable tag: 2.2.0
Requires PHP: 5.6
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -90,6 +90,10 @@ Building on the idea that "Web3" is the next generation of a blockchain-based an

== Changelog ==

= 2.2.0 =
* upgrade widgets
* load javascript async defer (to speed up pageload & pagespeed)

= 2.1.4 =
* fix wrap<>unwrap payments
* fix applied gas
Expand Down

0 comments on commit 59cd775

Please sign in to comment.