Skip to content

Instantly share code, notes, and snippets.

@dalenguyen
Last active March 20, 2020 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalenguyen/3b3700ef9349dbc91590c3cf13859bdc to your computer and use it in GitHub Desktop.
Save dalenguyen/3b3700ef9349dbc91590c3cf13859bdc to your computer and use it in GitHub Desktop.
(Integrate Firebase PRO): Add custom Firebase JavaScript to WordPress
// functions.php
// Custom JavaScript for Firebase
function custom_firebase_scripts_function()
{
wp_enqueue_script('custom_firebase', get_template_directory_uri() . '/js/custom-firebase.js', array('firebase_app', 'firebase_auth', 'firebase_database', 'firebase_firestore', 'firebase'));
}
add_action('wp_enqueue_scripts', 'custom_firebase_scripts_function');
@rsoares21
Copy link

looks like something is wrong in 'custom_firebaes' part

@dalenguyen
Copy link
Author

Thanks @rsoares21, I guess it's a typo. But it doesn't really affect anything if you have the correct path to custom-firebase.js file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment