diff --git a/CHANGES.md b/CHANGES.md index 769572c..3b7cbe9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ #### [unreleased] + +#### 2.0.1 / 2019-01-11 * added `composer.json` and automatically create POT with `composer update` +* added check for `register_block_type()` for WP 4.9.x and below #### 2.0.0 / 2018-12-20 🎂 * a proper PDF block was added with much help from [Alex Kirk](https://github.com/akirk), many thanks diff --git a/embed-pdf-viewer.php b/embed-pdf-viewer.php index 7a355da..0b839fe 100644 --- a/embed-pdf-viewer.php +++ b/embed-pdf-viewer.php @@ -5,7 +5,7 @@ * Description: Embed a PDF from the Media Library or elsewhere via oEmbed or as a block into an `object` tag or Google Doc Viewer as fallback. * Author: Andy Fragen * Author URI: https://github.com/afragen - * Version: 2.0.0.1 + * Version: 2.0.1 * License: GPLv2+ * Domain Path: /languages * Text Domain: embed-pdf-viewer @@ -50,13 +50,14 @@ function() { array( 'wp-blocks', 'wp-element' ) ); - register_block_type( - 'embed-pdf-viewer/index', - array( - 'editor_script' => 'embed-pdf-viewer', - ) - ); - + if ( function_exists( 'register_block_type' ) ) { + register_block_type( + 'embed-pdf-viewer/index', + array( + 'editor_script' => 'embed-pdf-viewer', + ) + ); + } } ); diff --git a/languages/embed-pdf-viewer.pot b/languages/embed-pdf-viewer.pot index 887a5b7..207f1a4 100644 --- a/languages/embed-pdf-viewer.pot +++ b/languages/embed-pdf-viewer.pot @@ -2,14 +2,14 @@ # This file is distributed under the same license as the Embed PDF Viewer plugin. msgid "" msgstr "" -"Project-Id-Version: Embed PDF Viewer 2.0.0.1\n" +"Project-Id-Version: Embed PDF Viewer 2.0.1\n" "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/embed-pdf-viewer\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2019-01-02T19:26:00+00:00\n" +"POT-Creation-Date: 2019-01-11T16:02:16+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.1.0\n" "X-Domain: embed-pdf-viewer\n" diff --git a/readme.txt b/readme.txt index 8a9f467..85b25a3 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: pdf, embed, oembed, viewer, block Requires at least: 5.0 Tested up to: 5.0 Requires PHP: 5.6 -Stable tag: 2.0.0 +Stable tag: 2.0.1 License: GPL v2+ License URI: @@ -22,6 +22,10 @@ Development on [GitHub](https://github.com/afragen/embed-pdf-viewer). Pull reque ## Changelog +#### 2.0.1 / 2019-01-11 +* added `composer.json` and automatically create POT with `composer update` +* added check for `register_block_type()` for WP 4.9.x and below + #### 2.0.0 / 2018-12-20 🎂 * a proper PDF block was added with much help from [Alex Kirk](https://github.com/akirk), many thanks