Skip to content

Commit

Permalink
Prepare 1.5.0 release
Browse files Browse the repository at this point in the history
Now GutenBlocks requires WordPress 5.0
  • Loading branch information
imath committed Dec 9, 2018
1 parent 6255e5a commit cfc8ec1
Show file tree
Hide file tree
Showing 8 changed files with 949 additions and 1,332 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.5.0

+ _Requires WordPress 5.0_
+ _Tested up to WordPress 5.0_

### Bug fixes

- Make sure JavaScripts to use the right dependancies for Gutenblocks.
- Stop using Gutenberg specific functions and use the corresponding ones introduced in WordPress 5.0
- Set the plugin CSS dependency to `wp-block-library` handle to make sure it loads.

---

## 1.4.1

+ _Requires Gutenberg 4.5.0 & WordPress 4.9_
Expand Down
8 changes: 4 additions & 4 deletions gutenblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* Plugin Name: GutenBlocks
* Plugin URI: https://imathi.eu/tag/gutenblocks/
* Description: Ma collection personnelle de blocs Gutenberg.
* Version: 1.4.2
* Requires at least: 4.9
* Version: 1.5.0
* Requires at least: 5.0
* Tested up to: 5.0
* License: GNU/GPL 2
* Author: imath
Expand Down Expand Up @@ -68,7 +68,7 @@ public static function start() {
*/
private function globals() {
// Version
$this->version = '1.4.2';
$this->version = '1.5.0';

// DB Version
$this->db_version = get_option( 'gutenblocks_version', 0 );
Expand Down Expand Up @@ -140,7 +140,7 @@ public function autoload( $class ) {
* @since 1.0.0
*/
function gutenblocks() {
if ( ! function_exists( 'gutenberg_init' ) ) {
if ( ! function_exists( 'render_block' ) ) {
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions inc/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function gutenblocks_register_scripts() {

wp_register_style( 'gutenblocks',
sprintf( '%1$sblocks%2$s.css', gutenblocks_assets_url(), $min ),
array( 'wp-blocks' ),
array( 'wp-block-library' ),
$v
);

Expand Down Expand Up @@ -741,7 +741,7 @@ function gutenblocks_upgrade() {
return;
}

if ( (float) $db_version < 1.2 ) {
if ( (float) $db_version < 1.2 || (float) $db_version < 1.5 ) {
delete_option( 'rewrite_rules' );
flush_rewrite_rules( false );
}
Expand Down Expand Up @@ -928,7 +928,7 @@ function gutenblocks_translate_blocks( $content = '' ) {
$localeblock = sprintf( 'gutenblocks/language-%s', str_replace( '_', '-', strtolower( $locale ) ) );

foreach ( $matches[1] as $k => $m ) {
$blocks = gutenberg_parse_blocks( $m );
$blocks = parse_blocks( $m );

foreach( $blocks as $block ) {
if ( is_object( $block ) ) {
Expand Down
Binary file modified languages/gutenblocks-en_US.mo
Binary file not shown.
14 changes: 7 additions & 7 deletions languages/gutenblocks-en_US.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# This file is distributed under the GNU/GPL 2.
msgid ""
msgstr ""
"Project-Id-Version: GutenBlocks 1.4.1\n"
"Project-Id-Version: GutenBlocks 1.5.0\n"
"Report-Msgid-Bugs-To: https://github.com/imath/gutenblocks/issues\n"
"POT-Creation-Date: 2018-11-22 06:21:16+00:00\n"
"PO-Revision-Date: 2018-11-22 07:47+0100\n"
"POT-Creation-Date: 2018-12-09 09:03:23+00:00\n"
"PO-Revision-Date: 2018-12-09 10:06+0100\n"
"Last-Translator: imath <mathchristo@yahoo.fr>\n"
"Language-Team: FRENCH <contact@imathi.eu>\n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.7.1\n"
"X-Generator: Poedit 2.2\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#: inc/functions.php:449
Expand Down Expand Up @@ -114,7 +114,7 @@ msgstr "https://imathi.eu/tag/gutenblocks/"

#. Description of the plugin/theme
msgid "Ma collection personnelle de blocs Gutenberg."
msgstr "my personal collection of Gutenberg blocks."
msgstr "My personal collection of Gutenberg blocks."

#. Author of the plugin/theme
msgid "imath"
Expand Down Expand Up @@ -146,7 +146,7 @@ msgid ""
"gist.GitHub.com"
msgstr ""
"Easily embed the source codes you are hosting on gist.GitHub.com thanks to "
"this block."
"this block"

#: inc/functions.php:195
msgctxt "Release Block Title"
Expand Down Expand Up @@ -203,4 +203,4 @@ msgstr "Replacing Photo blocks by Image blocks. Please wait"
#: inc/upgrade.php:283
msgctxt "Upgrader feedback message"
msgid "Mise à jour de la version de l’extension"
msgstr "Updating the plugin version."
msgstr "Updating the plugin version"
4 changes: 2 additions & 2 deletions languages/gutenblocks.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# This file is distributed under the GNU/GPL 2.
msgid ""
msgstr ""
"Project-Id-Version: GutenBlocks 1.4.1\n"
"Project-Id-Version: GutenBlocks 1.5.0\n"
"Report-Msgid-Bugs-To: https://github.com/imath/gutenblocks/issues\n"
"POT-Creation-Date: 2018-11-22 06:21:16+00:00\n"
"POT-Creation-Date: 2018-12-09 09:03:23+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
Loading

0 comments on commit cfc8ec1

Please sign in to comment.