diff --git a/README.md b/README.md
index 32aeb99..51c6daa 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,35 @@ Embed Google Drive
Embed a link and preview of Google Drive Documents by pasting a shared document link into the editor.
-No configuration is required.
+**Requires at least:** 5.5
+
+**Tested up to:** 6.4
+
+**License:** [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)
+
+**Requires PHP:** 8.0+
+
+## Installation
+
+1. Download the plugin from [here](https://wordpress.org/plugins/embed-google-drive/)
+
+2. Add the plugin from the WordPress admin panel.
+
+
+
+3. Activate the plugin through the 'Plugins' menu in WordPress
+
+
+## How to use
+1. Copy the URL of drive document which you want to embed. Note: The document must be shared with anyone with the link.
+2. Create new post/page or edit existing one.
+3. Paste the URL in the editor. It will automatically embed the document.
+ 
+ 
+ 
+
+## Video Guide
+https://github.com/rtCamp/embed-google-drive/assets/56588503/d376c750-c0f8-4bfe-8b23-79ae1f070f46
## Development Notes
diff --git a/includes/classes/class-rtcamp-google-embeds.php b/includes/classes/class-rtcamp-google-embeds.php
index 1f344ff..2cba601 100644
--- a/includes/classes/class-rtcamp-google-embeds.php
+++ b/includes/classes/class-rtcamp-google-embeds.php
@@ -7,6 +7,9 @@
namespace RT_Google_Embeds;
+use WP_REST_Request;
+use WP_REST_Response;
+
defined( 'ABSPATH' ) || exit;
/**
@@ -29,40 +32,44 @@ class rtCamp_Google_Embeds {
* @return rtCamp_Google_Embeds.
*/
public static function instance() {
- if ( is_null( self::$instance ) ) {
+
+ if ( null === self::$instance ) {
self::$instance = new self();
}
return self::$instance;
+
}
/**
* rtCamp_Google_Embeds constructor.
*/
public function __construct() {
- $this->add_plugin_constants();
+
add_action( 'plugins_loaded', array( $this, 'load_textdomain' ) );
add_action( 'init', array( $this, 'register_embeds' ) );
add_action( 'rest_api_init', array( $this, 'register_routes' ) );
// Register custom oembed provider for google drive urls.
add_filter( 'oembed_providers', array( $this, 'oembed_providers' ) );
+
}
/**
* Register custom oembed provider for google drive urls.
- *
+ *
* @param array $providers Default providers.
- *
+ *
* @return array Modified providers.
*/
public function oembed_providers( $providers ) {
+
global $wp_rewrite;
- if ( is_null( $wp_rewrite ) ) {
+ if ( null === $wp_rewrite ) {
return $providers;
}
-
+
$formats = array(
'#https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/(.*)\\/(.*)?#i',
'#https?:\\/\\/docs\\.google\\.com\\/forms\\/d\\/(.*)\\/(.*)?#i',
@@ -72,39 +79,32 @@ public function oembed_providers( $providers ) {
'#https?:\\/\\/drive\\.google\\.com\\/file\\/d\\/(.*)\\/(.*)?#i',
'#https?:\\/\\/docs\\.google\\.com\\/drawings\\/d\\/(.*)\\/(.*)?#i',
);
-
+
foreach ( $formats as $format ) {
$providers[ $format ] = array( get_rest_url( null, 'rt-google-embed/v1/oembed' ), true );
}
-
- return $providers;
- }
- /**
- * Define required plugin constants.
- *
- * @return void
- */
- private function add_plugin_constants() {
- define( 'RT_GOOGLE_EMBEDS_VERSION', '1.0' );
- define( 'RT_GOOGLE_EMBEDS_PLUGIN_DIR', plugin_dir_path( RT_GOOGLE_EMBEDS_PLUGIN_FILE ) );
+ return $providers;
}
/**
- * Loads plugin textdomain.
- *
+ * Loads plugin text-domain.
+ *
* @return void
*/
public function load_textdomain() {
+
load_plugin_textdomain( 'rt-google-embeds', false, RT_GOOGLE_EMBEDS_PLUGIN_DIR . 'languages/' );
+
}
/**
* Registers all supported embeds.
- *
+ *
* @return void
*/
public function register_embeds() {
+
// Google Docs regex.
$gdoc_oembed_pattern = '#https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/(.*)\\/(.*)?#i';
wp_embed_register_handler(
@@ -160,6 +160,7 @@ public function register_embeds() {
$gdrawings_oembed_pattern,
array( $this, 'wpdocs_embed_handler_google_drive' )
);
+
}
/**
@@ -173,6 +174,7 @@ public function register_embeds() {
* @return false|string
*/
public function wpdocs_embed_handler_google_drive( $matches, $attr, $url ) {
+
$thumbnail_url = $this->get_thumbnail_url( $matches[1] );
if ( ! $thumbnail_url ) {
@@ -186,6 +188,7 @@ public function wpdocs_embed_handler_google_drive( $matches, $attr, $url ) {
'thumbnail_url' => $thumbnail_url,
)
);
+
}
/**
@@ -197,15 +200,18 @@ public function wpdocs_embed_handler_google_drive( $matches, $attr, $url ) {
* @return false|string
*/
public function render_embed( $type, $data ) {
+
ob_start();
$template = sprintf( 'templates/embeds/%s.php', $type );
+
if ( ! empty( $data ) && is_array( $data ) ) {
extract( $data, EXTR_OVERWRITE );
}
- include RT_GOOGLE_EMBEDS_PLUGIN_DIR . $template; // phpcs:ignore
- $embed_markup = ob_get_clean();
- return $embed_markup;
+ include RT_GOOGLE_EMBEDS_PLUGIN_DIR . $template; // phpcs:ignore WordPressVIPMinimum.Files.IncludingFile.UsingVariable
+
+ return ob_get_clean();
+
}
/**
@@ -216,18 +222,25 @@ public function render_embed( $type, $data ) {
* @return string|boolean
*/
private function get_thumbnail_url( $file_id ) {
+
if ( empty( $file_id ) ) {
return false;
}
// Check if a preview exists for supplied file id.
$thumbnail_url = sprintf( 'https://drive.google.com/thumbnail?id=%s&sz=w400-h400', $file_id );
- $response = wp_remote_get( $thumbnail_url );
+
+ if ( function_exists( 'vip_safe_wp_remote_get' ) ) {
+ $response = vip_safe_wp_remote_get( $thumbnail_url );
+ } else {
+ $response = wp_remote_get( $thumbnail_url );
+ }
+
if ( ! is_wp_error( $response ) ) {
-
+
// Check if retrieved content is image and not google sign up page.
$content_type = wp_remote_retrieve_header( $response, 'content-type' );
- if ( false !== strpos( $content_type, 'image/' ) ) {
+ if ( str_contains( $content_type, 'image/' ) ) {
// Check if retrieved http code is 200.
$status_code = wp_remote_retrieve_response_code( $response );
@@ -238,55 +251,59 @@ private function get_thumbnail_url( $file_id ) {
}
return false;
+
}
/**
* Register endpoints.
- *
+ *
* @return void
*/
public function register_routes() {
+
register_rest_route(
'rt-google-embed/v1',
'/get-preview-url',
- [
- 'methods' => 'GET',
- 'callback' => [ $this, 'get_thumb_preview' ],
- 'args' => [
- 'media_id' => [
+ array(
+ 'methods' => 'GET',
+ 'callback' => array( $this, 'get_thumb_preview' ),
+ 'args' => array(
+ 'media_id' => array(
'file_id' => true,
- ],
- ],
+ ),
+ ),
'permission_callback' => '__return_true',
- ]
+ )
);
-
+
// Route for custom oembed provider for google drive.
register_rest_route(
'rt-google-embed/v1',
'/oembed',
array(
- 'methods' => 'GET',
- 'callback' => array( $this, 'oembed' ),
+ 'methods' => 'GET',
+ 'callback' => array( $this, 'oembed' ),
'permission_callback' => '__return_true',
)
);
+
}
/**
* REST API callback to get drive preview URL on block editor.
*
- * @param \WP_REST_Request $request REST request Instance.
+ * @param WP_REST_Request $request REST request Instance.
*
- * @return \WP_REST_Response
+ * @return WP_REST_Response
*/
- public function oembed( \WP_REST_Request $request ) {
+ public function oembed( $request ) {
+
// Get id from url query string.
$url = $request->get_param( 'url' );
$file_id = $this->get_file_id_from_url( $url );
if ( empty( $file_id ) ) {
- return new \WP_REST_Response( array(), 404 );
+ return new WP_REST_Response( array(), 404 );
}
// Get preview url.
@@ -294,7 +311,7 @@ public function oembed( \WP_REST_Request $request ) {
// If permission is not set or invalid url, send 404.
if ( empty( $thumbnail_url ) ) {
- return new \WP_REST_Response( array(), 404 );
+ return new WP_REST_Response( array(), 404 );
}
// Data to send as response.
@@ -324,7 +341,8 @@ public function oembed( \WP_REST_Request $request ) {
$data['thumbnail_url'] = $thumbnail_url;
- return new \WP_REST_Response( $data, 200 );
+ return new WP_REST_Response( $data, 200 );
+
}
/**
@@ -335,6 +353,7 @@ public function oembed( \WP_REST_Request $request ) {
* @return bool|string Returns false or ID.
*/
public function get_file_id_from_url( $url ) {
+
$matches = array();
preg_match( '/[-\w]{25,}/', $url, $matches );
if ( empty( $matches[0] ) ) {
@@ -342,26 +361,30 @@ public function get_file_id_from_url( $url ) {
}
return $matches[0];
+
}
/**
* REST API callback to get drive preview URL.
*
- * @param \WP_REST_Request $request REST Instance.
+ * @param WP_REST_Request $request REST Instance.
*
- * @return \WP_REST_Response
+ * @return WP_REST_Response
*/
- public function get_thumb_preview( \WP_REST_Request $request ) {
+ public function get_thumb_preview( $request ) {
+
$url = $request->get_param( 'url' );
$file_id = $this->get_file_id_from_url( $url );
if ( empty( $file_id ) ) {
- return new \WP_REST_Response( array(), 404 );
+ return new WP_REST_Response( array(), 404 );
}
$data['preview_url'] = $this->get_thumbnail_url( $file_id );
- return new \WP_REST_Response( $data, 200 );
+ return new WP_REST_Response( $data, 200 );
+
}
+
}
// Initialize the class.
diff --git a/languages/rt-google-embeds.po b/languages/rt-google-embeds.po
index 0e413b8..763ec46 100644
--- a/languages/rt-google-embeds.po
+++ b/languages/rt-google-embeds.po
@@ -1,29 +1,29 @@
-# Copyright (C) 2020 rtCamp
-# This file is distributed under the same license as the rtCamp Google Embeds plugin.
+# Copyright (C) 2023 rtCamp
+# This file is distributed under the same license as the Embed Google Drive plugin.
msgid ""
msgstr ""
-"Project-Id-Version: rtCamp Google Embeds 0.1.0\n"
-"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rt-google-embeds\n"
+"Project-Id-Version: Embed Google Drive 1.1\n"
+"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/embed-google-drive\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: 2020-04-16T14:43:14+00:00\n"
+"POT-Creation-Date: 2023-12-15T08:26:36+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"X-Generator: WP-CLI 2.4.0\n"
+"X-Generator: WP-CLI 2.9.0\n"
"X-Domain: rt-google-embeds\n"
#. Plugin Name of the plugin
-msgid "rtCamp Google Embeds"
+msgid "Embed Google Drive"
msgstr ""
#. Plugin URI of the plugin
-msgid "https://github.com/rtCamp/rt-google-embeds"
+msgid "https://github.com/rtCamp/embed-google-drive"
msgstr ""
#. Description of the plugin
-msgid "Allows adding preview for your Google Drive Documents right in your editor."
+msgid "Embed a link and preview of Google Drive Documents by pasting a shared document link into the editor."
msgstr ""
#. Author of the plugin
@@ -34,14 +34,14 @@ msgstr ""
msgid "https://rtcamp.com/"
msgstr ""
-#: templates/embeds/google-drive-file.php:14
+#: templates/embeds/google-drive-file.php:16
msgid "Open the Shared Document"
msgstr ""
-#: templates/embeds/google-drive-file.php:15
+#: templates/embeds/google-drive-file.php:17
msgid "Open Shared Document"
msgstr ""
-#: templates/embeds/google-drive-file.php:17
+#: templates/embeds/google-drive-file.php:19
msgid "Shared Document Preview"
msgstr ""
diff --git a/package-lock.json b/package-lock.json
index cfbe23b..ced0c38 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,79 +1,93 @@
{
"name": "rt-google-embed",
"version": "0.1.0",
- "lockfileVersion": 1,
+ "lockfileVersion": 3,
"requires": true,
- "dependencies": {
- "ansi-styles": {
+ "packages": {
+ "": {
+ "name": "rt-google-embed",
+ "version": "0.1.0",
+ "license": "GPL-2.0",
+ "devDependencies": {
+ "npm-run-all": "^4.1.5"
+ }
+ },
+ "node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
"dev": true,
- "requires": {
+ "dependencies": {
"color-convert": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=4"
}
},
- "balanced-match": {
+ "node_modules/balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
},
- "brace-expansion": {
+ "node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
- "requires": {
+ "dependencies": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
}
},
- "color-convert": {
+ "node_modules/color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
"dev": true,
- "requires": {
+ "dependencies": {
"color-name": "1.1.3"
}
},
- "color-name": {
+ "node_modules/color-name": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
"dev": true
},
- "concat-map": {
+ "node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
},
- "define-properties": {
+ "node_modules/define-properties": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"object-keys": "^1.0.12"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
- "error-ex": {
+ "node_modules/error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-arrayish": "^0.2.1"
}
},
- "es-abstract": {
+ "node_modules/es-abstract": {
"version": "1.17.3",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.3.tgz",
"integrity": "sha512-AwiVPKf3sKGMoWtFw0J7Y4MTZ4Iek67k4COWOwHqS8B9TOZ71DCfcoBmdamy8Y6mj4MDz0+VNUpC2HKHFHA3pg==",
"dev": true,
- "requires": {
+ "dependencies": {
"es-to-primitive": "^1.2.1",
"function-bind": "^1.1.1",
"has": "^1.0.3",
@@ -85,151 +99,208 @@
"object.assign": "^4.1.0",
"string.prototype.trimleft": "^2.1.1",
"string.prototype.trimright": "^2.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "es-to-primitive": {
+ "node_modules/es-to-primitive": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
"dev": true,
- "requires": {
+ "dependencies": {
"is-callable": "^1.1.4",
"is-date-object": "^1.0.1",
"is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "escape-string-regexp": {
+ "node_modules/escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
},
- "function-bind": {
+ "node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
},
- "graceful-fs": {
+ "node_modules/graceful-fs": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
"dev": true
},
- "has": {
+ "node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
- "requires": {
+ "dependencies": {
"function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4.0"
}
},
- "has-flag": {
+ "node_modules/has-flag": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "has-symbols": {
+ "node_modules/has-symbols": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
"integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "hosted-git-info": {
+ "node_modules/hosted-git-info": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
"integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==",
"dev": true
},
- "is-arrayish": {
+ "node_modules/is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
"dev": true
},
- "is-callable": {
+ "node_modules/is-callable": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz",
"integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "is-date-object": {
+ "node_modules/is-date-object": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
"integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "is-regex": {
+ "node_modules/is-regex": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz",
"integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"has": "^1.0.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "is-symbol": {
+ "node_modules/is-symbol": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
"integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"has-symbols": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "isexe": {
+ "node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
"dev": true
},
- "json-parse-better-errors": {
+ "node_modules/json-parse-better-errors": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
"dev": true
},
- "memorystream": {
+ "node_modules/memorystream": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
"integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10.0"
+ }
},
- "minimatch": {
+ "node_modules/minimatch": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
- "requires": {
+ "dependencies": {
"brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
}
},
- "nice-try": {
+ "node_modules/nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
"dev": true
},
- "normalize-package-data": {
+ "node_modules/normalize-package-data": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
"dev": true,
- "requires": {
+ "dependencies": {
"hosted-git-info": "^2.1.4",
"resolve": "^1.10.0",
"semver": "2 || 3 || 4 || 5",
"validate-npm-package-license": "^3.0.1"
}
},
- "npm-run-all": {
+ "node_modules/npm-run-all": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
"integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"ansi-styles": "^3.2.1",
"chalk": "^2.4.1",
"cross-spawn": "^6.0.5",
@@ -240,253 +311,337 @@
"shell-quote": "^1.6.1",
"string.prototype.padend": "^3.0.0"
},
+ "bin": {
+ "npm-run-all": "bin/npm-run-all/index.js",
+ "run-p": "bin/run-p/index.js",
+ "run-s": "bin/run-s/index.js"
+ },
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "dependencies": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "engines": {
+ "node": ">=4.8"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+ "dev": true,
"dependencies": {
- "chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dev": true,
- "requires": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- }
- },
- "cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dev": true,
- "requires": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- }
- },
- "load-json-file": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
- "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
- "dev": true,
- "requires": {
- "graceful-fs": "^4.1.2",
- "parse-json": "^4.0.0",
- "pify": "^3.0.0",
- "strip-bom": "^3.0.0"
- }
- },
- "parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
- "dev": true,
- "requires": {
- "error-ex": "^1.3.1",
- "json-parse-better-errors": "^1.0.1"
- }
- },
- "path-type": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
- "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
- "dev": true,
- "requires": {
- "pify": "^3.0.0"
- }
- },
- "pify": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
- "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
- "dev": true
- },
- "read-pkg": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
- "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
- "dev": true,
- "requires": {
- "load-json-file": "^4.0.0",
- "normalize-package-data": "^2.3.2",
- "path-type": "^3.0.0"
- }
- },
- "strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
- "dev": true
- },
- "supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dev": true,
- "requires": {
- "has-flag": "^3.0.0"
- }
- }
- }
- },
- "object-inspect": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "dependencies": {
+ "pify": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+ "dev": true,
+ "dependencies": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/object-inspect": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
"integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==",
- "dev": true
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
- "object-keys": {
+ "node_modules/object-keys": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ }
},
- "object.assign": {
+ "node_modules/object.assign": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.2",
"function-bind": "^1.1.1",
"has-symbols": "^1.0.0",
"object-keys": "^1.0.11"
+ },
+ "engines": {
+ "node": ">= 0.4"
}
},
- "path-key": {
+ "node_modules/path-key": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
},
- "path-parse": {
+ "node_modules/path-parse": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
"dev": true
},
- "pidtree": {
+ "node_modules/pidtree": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.0.tgz",
"integrity": "sha512-9CT4NFlDcosssyg8KVFltgokyKZIFjoBxw8CTGy+5F38Y1eQWrt8tRayiUOXE+zVKQnYu5BR8JjCtvK3BcnBhg==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "pidtree": "bin/pidtree.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
},
- "resolve": {
+ "node_modules/resolve": {
"version": "1.14.2",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
"integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"path-parse": "^1.0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "semver": {
+ "node_modules/semver": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "dev": true
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver"
+ }
},
- "shebang-command": {
+ "node_modules/shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
"dev": true,
- "requires": {
+ "dependencies": {
"shebang-regex": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
}
},
- "shebang-regex": {
+ "node_modules/shebang-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
- "dev": true
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
},
- "shell-quote": {
+ "node_modules/shell-quote": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
"dev": true
},
- "spdx-correct": {
+ "node_modules/spdx-correct": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
"integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
"dev": true,
- "requires": {
+ "dependencies": {
"spdx-expression-parse": "^3.0.0",
"spdx-license-ids": "^3.0.0"
}
},
- "spdx-exceptions": {
+ "node_modules/spdx-exceptions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
"integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
"dev": true
},
- "spdx-expression-parse": {
+ "node_modules/spdx-expression-parse": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
"dev": true,
- "requires": {
+ "dependencies": {
"spdx-exceptions": "^2.1.0",
"spdx-license-ids": "^3.0.0"
}
},
- "spdx-license-ids": {
+ "node_modules/spdx-license-ids": {
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
"dev": true
},
- "string.prototype.padend": {
+ "node_modules/string.prototype.padend": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz",
"integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"es-abstract": "^1.17.0-next.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "string.prototype.trimleft": {
+ "node_modules/string.prototype.trimleft": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz",
"integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "string.prototype.trimright": {
+ "node_modules/string.prototype.trimright": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz",
"integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==",
"dev": true,
- "requires": {
+ "dependencies": {
"define-properties": "^1.1.3",
"function-bind": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
}
},
- "validate-npm-package-license": {
+ "node_modules/validate-npm-package-license": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
"dev": true,
- "requires": {
+ "dependencies": {
"spdx-correct": "^3.0.0",
"spdx-expression-parse": "^3.0.0"
}
},
- "which": {
+ "node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"dev": true,
- "requires": {
+ "dependencies": {
"isexe": "^2.0.0"
+ },
+ "bin": {
+ "which": "bin/which"
}
}
}
diff --git a/readme.txt b/readme.txt
index 3f04254..4196fe8 100644
--- a/readme.txt
+++ b/readme.txt
@@ -3,9 +3,9 @@ Contributors: rtCamp
Donate link: https://rtcamp.com/
Tags: Google Drive, embed, spreadsheet, document, drawing
Requires at least: 5.5
-Tested up to: 6.1
-Requires PHP: 7.3
-Stable tag: 1.0
+Tested up to: 6.4.2
+Requires PHP: 8.0+
+Stable tag: 1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -21,11 +21,24 @@ No configuration is required.
[
](https://rtcamp.com/careers/)
-== Installation ==
-
-1. Upload `embed-google-drive` to the `/wp-content/plugins/` directory
-2. Activate the plugin through the 'Plugins' menu in WordPress
-3. Paste a shared Google Drive document link into the WordPress editor.
+## Installation
+
+1. Download the plugin from [here](https://wordpress.org/plugins/embed-google-drive/)
+
+2. Add the plugin from the WordPress admin panel.
+
+
+
+3. Activate the plugin through the 'Plugins' menu in WordPress
+
+
+## How to use
+1. Copy the URL of drive document which you want to embed. Note: The document must be shared with anyone with the link.
+2. Create new post/page or edit existing one.
+3. Paste the URL in the editor. It will automatically embed the document.
+ 
+ 
+ 
== Frequently Asked Questions ==
@@ -59,7 +72,26 @@ Once you're ready to send a pull request, please run through the following check
= 1.0 =
* Initial release.
+= 1.0.1 =
+* Jetpack compatibility.
+
+= 1.1 =
+* Plugin tested up to WordPress 6.4.2
+* PHP Version updated to 8.0
+* Fixed PHP Coding Standards issues
+* Plugin is VIP compatible
+
+
== Upgrade Notice ==
= 1.0 =
-* Initial release.
\ No newline at end of file
+* Initial release.
+
+= 1.0.1 =
+* Jetpack compatibility.
+
+= 1.1 =
+* Plugin tested upto WordPress 6.4.2
+* PHP Version updated to 8.0
+* Fixed PHP Coding Standards issues
+* Plugin is VIP compatible
diff --git a/rt-google-embeds.php b/rt-google-embeds.php
index f5bab69..50e2631 100644
--- a/rt-google-embeds.php
+++ b/rt-google-embeds.php
@@ -2,8 +2,8 @@
/**
* Plugin Name: Embed Google Drive
* Description: Embed a link and preview of Google Drive Documents by pasting a shared document link into the editor.
- * Plugin URI: https://github.com/rtCamp/rt-google-embeds
- * Version: 1.0
+ * Plugin URI: https://github.com/rtCamp/embed-google-drive
+ * Version: 1.1
* Author: rtCamp
* Text Domain: rt-google-embeds
* Author URI: https://rtcamp.com/
@@ -18,6 +18,14 @@
define( 'RT_GOOGLE_EMBEDS_PLUGIN_FILE', __FILE__ );
}
-if ( ! class_exists( 'rtCamp_Google_Embeds' ) ) {
- require_once dirname( __FILE__ ) . '/includes/classes/class-rtcamp-google-embeds.php';
+if ( ! defined( 'RT_GOOGLE_EMBEDS_VERSION' ) ) {
+ define( 'RT_GOOGLE_EMBEDS_VERSION', '1.2' );
+}
+
+if ( ! defined( 'RT_GOOGLE_EMBEDS_PLUGIN_DIR' ) ) {
+ define( 'RT_GOOGLE_EMBEDS_PLUGIN_DIR', plugin_dir_path( RT_GOOGLE_EMBEDS_PLUGIN_FILE ) );
+}
+
+if ( ! class_exists( 'RT_Google_Embeds\rtCamp_Google_Embeds' ) ) {
+ require_once RT_GOOGLE_EMBEDS_PLUGIN_DIR . '/includes/classes/class-rtcamp-google-embeds.php';
}
diff --git a/templates/embeds/google-drive-file.php b/templates/embeds/google-drive-file.php
index e6efbd2..eab253e 100644
--- a/templates/embeds/google-drive-file.php
+++ b/templates/embeds/google-drive-file.php
@@ -5,10 +5,12 @@
* @package rt-google-embeds
*/
-if ( ! defined( 'ABSPATH' ) ) {
- // prevent direct access to this file.
- exit;
+defined( 'ABSPATH' ) || exit;
+
+if ( ! isset( $drive_file_url ) || ! isset( $thumbnail_url ) ) {
+ return;
}
+
?>