diff --git a/CHANGELOG.md b/CHANGELOG.md index debac03..4a1d769 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to this project will be documented in this file. +## [ 0.8.0 ] - 30-01-2021 + +- Updated firebase packages to 8.2.5 +- Moved scripts to the end of body tag + ## [ 0.7.0 ] - 18-08-2020 - Fixed add_options_page error diff --git a/README.md b/README.md index 70cd3fa..a5246b5 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Requires at least: 4.0.0 Tested up to: 4.9.6 -Stable tag: 0.7.0 +Stable tag: 0.8.0 Requires PHP: 5.2.4 diff --git a/includes/class.firebase-admin.php b/includes/class.firebase-admin.php index d37d4ee..24f9ace 100644 --- a/includes/class.firebase-admin.php +++ b/includes/class.firebase-admin.php @@ -46,12 +46,12 @@ public static function load_firebase_admin_js() { wp_enqueue_style('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'css/firebase-admin.css'); - wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false); + wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-app.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-auth.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-database.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-firestore.js', array(), FIREBASE_WP_VERSION, true); - wp_enqueue_script('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'js/firebase-admin.js', array('jquery'), FIREBASE_WP_VERSION, false); + wp_enqueue_script('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'js/firebase-admin.js', array('jquery'), FIREBASE_WP_VERSION, true); wp_localize_script('firebase-admin', 'firebaseDatabaseOptions', array( 'databaseType' => self::$options_database['database_type'], 'collections' => self::$options_database['collection_names'], diff --git a/includes/class.firebase.php b/includes/class.firebase.php index 3466b58..0c1dec0 100644 --- a/includes/class.firebase.php +++ b/includes/class.firebase.php @@ -20,12 +20,12 @@ public static function load_firebase_js() { wp_enqueue_style('firebase', plugin_dir_url(dirname(__FILE__)) . 'css/firebase.css'); - wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false); - wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false); + wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-app.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-auth.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-database.js', array(), FIREBASE_WP_VERSION, true); + wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-firestore.js', array(), FIREBASE_WP_VERSION, true); - wp_enqueue_script('firebase', plugin_dir_url(dirname(__FILE__)) . 'js/firebase.js', array('jquery'), FIREBASE_WP_VERSION, false); + wp_enqueue_script('firebase', plugin_dir_url(dirname(__FILE__)) . 'js/firebase.js', array('jquery'), FIREBASE_WP_VERSION, true); wp_localize_script('firebase', 'firebaseOptions', array( 'apiKey' => self::$options['api_key'], diff --git a/init.php b/init.php index f299709..ccd662e 100644 --- a/init.php +++ b/init.php @@ -15,7 +15,7 @@ * Author URI: http://dalenguyen.me * Contributors: Dale Nguyen (@dalenguyen) * - * Version: 0.7.0 + * Version: 0.8.0 * * Text Domain: integrate-firebase * @@ -53,7 +53,7 @@ exit; } -define('FIREBASE_WP_VERSION', '0.7.0'); +define('FIREBASE_WP_VERSION', '0.8.0'); define('FIREBASE_WP__MINIMUM_WP_VERSION', '4.0.0'); define('FIREBASE_WP__PLUGIN_DIR', plugin_dir_path(__FILE__)); diff --git a/readme.txt b/readme.txt index f137c08..3369664 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: hanthuy Donate link: https://www.paypal.me/DaleNguyen Tags: firebase Requires at least: 4.0.0 -Tested up to: 5.5 -Stable tag: 0.7.0 +Tested up to: 5.6 +Stable tag: 0.8.0 Requires PHP: 5.2.4 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -64,25 +64,25 @@ You can add a shortcode to show user's info You can show error message when a user cannot login by using a shortcode -> echo do_shortcode("[firebase_login_error class='your-class-name'][/firebase_login_error]"); +> echo do_shortcode("[firebase_login_error class="your-class-name"][/firebase_login_error]"); = How can I show data for a not logged in user? = You can put your data as an HTML code inside a shortcode -> echo do_shortcode("[firebase_show_not_login class='your-class-name']YOUR HTML CODE[/firebase_show_not_login]"); +> echo do_shortcode("[firebase_show_not_login class="your-class-name"]YOUR HTML CODE[/firebase_show_not_login]"); = How can I hide or show data for a logged in user? = You can put your data as an HTML code inside a shortcode -> echo do_shortcode("[firebase_show class='your-class-name']YOUR HTML CODE[/firebase_show]"); +> echo do_shortcode("[firebase_show class="your-class-name"]YOUR HTML CODE[/firebase_show]"); = How can I show realtime database for a logged in user? = You can put your data as an HTML code inside a shortcode. Realtime data will be shown as a table with an id #if-realtime. -> echo do_shortcode("[realtime class='your-class-name' collection_name='string' document_name='string']"); +> echo do_shortcode("[realtime class="your-class-name" collection_name="string" document_name="string"]"); = How can I log out? @@ -97,6 +97,10 @@ This is a shortcode for log out button. == Changelog == += 0.8.0 = +* Updated firebase packages to 8.2.5 +* Moved scripts to the end of body tag + = 0.7.0 = * Fixed add_options_page error * Preformated data before showing in dashboard