Last active
February 26, 2018 12:04
-
-
Save hideokamoto/21e59c1760d2694308cc19cc76ec0d4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: admin tracker | |
* Plugin URI: https://wp-kyoto.net | |
* Description: tracker | |
* Version: 0.0.1 | |
* Author: Hidetaka Okamoto | |
* Author URI: https://wp-kyoto.net | |
* License: GPLv2+ | |
* | |
* @since 0.0.1 | |
*/ | |
function insert_logrocket_script() { | |
wp_enqueue_script( 'logRocket', 'https://cdn.logrocket.com/LogRocket.min.js', array(), '1.0.0' ); | |
} | |
add_action( 'admin_enqueue_scripts', 'insert_logrocket_script' ); | |
function insert_logrocket_code() { | |
?> | |
<!-- [Logrocket code] --> | |
<script>window.LogRocket && window.LogRocket.init('PJID/PROJECT_NAME');</script> | |
<!-- [/Logrocket code] --> | |
<?php | |
} | |
add_action('admin_head', 'insert_logrocket_code'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment