Skip to content

Commit

Permalink
Fix translation loading and release v0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwweb committed Dec 16, 2024
1 parent 7f0efce commit 6809504
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
38 changes: 19 additions & 19 deletions mrw-card-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Requires at least: 6.6
* Requires PHP: 7.0
* Text Domain: mrw-card-block
* Version: 0.4.2
* Version: 0.4.3
* Plugin URI: https://github.com/mrwweb/mrw-card-block
*
* @package MRW_Card_Block
Expand All @@ -18,7 +18,7 @@
require_once( 'github-updater/github-updater.php' );
use WP_GitHub_Updater;

define( 'MRW_CARD_BLOCK_VERSION', '0.4.1' );
define( 'MRW_CARD_BLOCK_VERSION', '0.4.3' );

add_filter( 'after_setup_theme', __NAMESPACE__ . '\register_block_styles' );
function register_block_styles() {
Expand Down Expand Up @@ -77,20 +77,20 @@ function render_card_block( $block_content, $block ) {
}

// Initialize the plugin updater
if ( is_admin() ) {
$config = array(
'slug' => plugin_basename(__FILE__),
'proper_folder_name' => 'mrw-card-block',
'api_url' => 'https://github.com/mrwweb/mrw-card-block',
'raw_url' => 'https://raw.githubusercontent.com/mrwweb/mrw-card-block/main',
'github_url' => 'https://github.com/mrwweb/mrw-card-block',
'zip_url' => 'https://github.com/mrwweb/mrw-card-block/archive/refs/heads/main.zip',
'sslverify' => true, // whether WP should check the validity of the SSL cert when getting an update, see https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/2 and https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/4 for details
'requires' => '6.6',
'tested' => '6.6',
'readme' => 'readme.txt',
);
new WP_GitHub_Updater($config);
}

require_once( 'github-updater/github-updater.php' );
add_action( 'admin_init', function() {
if ( is_admin() ) {
$config = array(
'slug' => plugin_basename(__FILE__),
'proper_folder_name' => 'mrw-card-block',
'api_url' => 'https://github.com/mrwweb/mrw-card-block',
'raw_url' => 'https://raw.githubusercontent.com/mrwweb/mrw-card-block/main',
'github_url' => 'https://github.com/mrwweb/mrw-card-block',
'zip_url' => 'https://github.com/mrwweb/mrw-card-block/archive/refs/heads/main.zip',
'sslverify' => true, // whether WP should check the validity of the SSL cert when getting an update, see https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/2 and https://github.com/jkudish/WordPress-GitHub-Plugin-Updater/issues/4 for details
'requires' => '6.6',
'tested' => '6.6',
'readme' => 'readme.txt',
);
new WP_GitHub_Updater($config);
}
} );
7 changes: 6 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: Block, Blocks, Media & Text, Card, Block Editor
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 7.0
Stable tag: 0.4.2
Stable tag: 0.4.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -16,6 +16,11 @@ A variation of the Media & Text block that creates a "Card" with stacked media a

== Changelog ==

= 0.4.3 (December 16, 2024) =

- Load Github updater on `admin_init` hook to prevent "`_load_textdomain_just_in_time` was called incorrectly" error introduced with WordPress 6.7
- Remove duplicate require_once statement loading Github updater

= 0.4.2 (November 21, 2024) =

- Add support for new `.is-image-fill-element` class introduced in WordPress 6.7
Expand Down

0 comments on commit 6809504

Please sign in to comment.