Skip to content

Commit 5dbf3bd

Browse files
author
Dale Nguyen
authored
Merge pull request #142 from dalenguyen/develop
Updated scripts & moved script to body
2 parents 0f291ac + 21c47cf commit 5dbf3bd

File tree

6 files changed

+28
-19
lines changed

6 files changed

+28
-19
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [ 0.8.0 ] - 30-01-2021
6+
7+
- Updated firebase packages to 8.2.5
8+
- Moved scripts to the end of body tag
9+
510
## [ 0.7.0 ] - 18-08-2020
611

712
- Fixed add_options_page error

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Requires at least: 4.0.0
1010

1111
Tested up to: 4.9.6
1212

13-
Stable tag: 0.7.0
13+
Stable tag: 0.8.0
1414

1515
Requires PHP: 5.2.4
1616

includes/class.firebase-admin.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public static function load_firebase_admin_js() {
4646

4747
wp_enqueue_style('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'css/firebase-admin.css');
4848

49-
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
50-
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
51-
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
52-
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);
49+
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-app.js', array(), FIREBASE_WP_VERSION, true);
50+
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-auth.js', array(), FIREBASE_WP_VERSION, true);
51+
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-database.js', array(), FIREBASE_WP_VERSION, true);
52+
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-firestore.js', array(), FIREBASE_WP_VERSION, true);
5353

54-
wp_enqueue_script('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'js/firebase-admin.js', array('jquery'), FIREBASE_WP_VERSION, false);
54+
wp_enqueue_script('firebase-admin', plugin_dir_url(dirname(__FILE__)) . 'js/firebase-admin.js', array('jquery'), FIREBASE_WP_VERSION, true);
5555
wp_localize_script('firebase-admin', 'firebaseDatabaseOptions', array(
5656
'databaseType' => self::$options_database['database_type'],
5757
'collections' => self::$options_database['collection_names'],

includes/class.firebase.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ public static function load_firebase_js() {
2020

2121
wp_enqueue_style('firebase', plugin_dir_url(dirname(__FILE__)) . 'css/firebase.css');
2222

23-
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-app.js', array(), FIREBASE_WP_VERSION, false);
24-
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-auth.js', array(), FIREBASE_WP_VERSION, false);
25-
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-database.js', array(), FIREBASE_WP_VERSION, false);
26-
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/7.18.0/firebase-firestore.js', array(), FIREBASE_WP_VERSION, false);
23+
wp_enqueue_script('firebase_app', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-app.js', array(), FIREBASE_WP_VERSION, true);
24+
wp_enqueue_script('firebase_auth', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-auth.js', array(), FIREBASE_WP_VERSION, true);
25+
wp_enqueue_script('firebase_database', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-database.js', array(), FIREBASE_WP_VERSION, true);
26+
wp_enqueue_script('firebase_firestore', 'https://www.gstatic.com/firebasejs/8.2.5/firebase-firestore.js', array(), FIREBASE_WP_VERSION, true);
2727

28-
wp_enqueue_script('firebase', plugin_dir_url(dirname(__FILE__)) . 'js/firebase.js', array('jquery'), FIREBASE_WP_VERSION, false);
28+
wp_enqueue_script('firebase', plugin_dir_url(dirname(__FILE__)) . 'js/firebase.js', array('jquery'), FIREBASE_WP_VERSION, true);
2929

3030
wp_localize_script('firebase', 'firebaseOptions', array(
3131
'apiKey' => self::$options['api_key'],

init.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Author URI: http://dalenguyen.me
1616
* Contributors: Dale Nguyen (@dalenguyen)
1717
*
18-
* Version: 0.7.0
18+
* Version: 0.8.0
1919
*
2020
* Text Domain: integrate-firebase
2121
*
@@ -53,7 +53,7 @@
5353
exit;
5454
}
5555

56-
define('FIREBASE_WP_VERSION', '0.7.0');
56+
define('FIREBASE_WP_VERSION', '0.8.0');
5757
define('FIREBASE_WP__MINIMUM_WP_VERSION', '4.0.0');
5858
define('FIREBASE_WP__PLUGIN_DIR', plugin_dir_path(__FILE__));
5959

readme.txt

+10-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: hanthuy
33
Donate link: https://www.paypal.me/DaleNguyen
44
Tags: firebase
55
Requires at least: 4.0.0
6-
Tested up to: 5.5
7-
Stable tag: 0.7.0
6+
Tested up to: 5.6
7+
Stable tag: 0.8.0
88
Requires PHP: 5.2.4
99
License: GPLv2 or later
1010
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
6464

6565
You can show error message when a user cannot login by using a shortcode
6666

67-
> echo do_shortcode("[firebase_login_error class='your-class-name'][/firebase_login_error]");
67+
> echo do_shortcode("[firebase_login_error class="your-class-name"][/firebase_login_error]");
6868

6969
= How can I show data for a not logged in user? =
7070

7171
You can put your data as an HTML code inside a shortcode
7272

73-
> echo do_shortcode("[firebase_show_not_login class='your-class-name']YOUR HTML CODE[/firebase_show_not_login]");
73+
> echo do_shortcode("[firebase_show_not_login class="your-class-name"]YOUR HTML CODE[/firebase_show_not_login]");
7474

7575
= How can I hide or show data for a logged in user? =
7676

7777
You can put your data as an HTML code inside a shortcode
7878

79-
> echo do_shortcode("[firebase_show class='your-class-name']YOUR HTML CODE[/firebase_show]");
79+
> echo do_shortcode("[firebase_show class="your-class-name"]YOUR HTML CODE[/firebase_show]");
8080

8181
= How can I show realtime database for a logged in user? =
8282

8383
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.
8484

85-
> echo do_shortcode("[realtime class='your-class-name' collection_name='string' document_name='string']");
85+
> echo do_shortcode("[realtime class="your-class-name" collection_name="string" document_name="string"]");
8686

8787
= How can I log out?
8888

@@ -97,6 +97,10 @@ This is a shortcode for log out button.
9797

9898
== Changelog ==
9999

100+
= 0.8.0 =
101+
* Updated firebase packages to 8.2.5
102+
* Moved scripts to the end of body tag
103+
100104
= 0.7.0 =
101105
* Fixed add_options_page error
102106
* Preformated data before showing in dashboard

0 commit comments

Comments
 (0)