Created
April 26, 2016 18:52
-
-
Save seedprod/6a29559ba80ae9fe1a666b7041f7e7d2 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 | |
add_action('in_admin_footer', 'my_admin_footer_function'); | |
function my_admin_footer_function() { | |
$user = wp_get_current_user(); | |
//var_dump($user ); | |
?> | |
<script>!function(e,o,n){window.HSCW=o,window.HS=n,n.beacon=n.beacon||{};var t=n.beacon;t.userConfig={},t.readyQueue=[],t.config=function(e){this.userConfig=e},t.ready=function(e){this.readyQueue.push(e)},o.config={docs:{enabled:!0,baseUrl:"//seedprod.helpscoutdocs.com/"},contact:{enabled:!0,formId:"6a6faeef-b966-11e5-9e75-0a7d6919297d"}};var r=e.getElementsByTagName("script")[0],c=e.createElement("script");c.type="text/javascript",c.async=!0,c.src="https://djtflbt20bdde.cloudfront.net/",r.parentNode.insertBefore(c,r)}(document,window.HSCW||{},window.HS||{});</script> | |
<script> | |
HS.beacon.config({ | |
modal: false, | |
color: '#337ab7', | |
icon: 'question', | |
// topics: [ | |
// { val: 'need-help', label: 'Need help with the product' }, | |
// { val: 'bug', label: 'I think I found a bug'} | |
// ], | |
attachment: true, | |
}); | |
HS.beacon.ready(function() { | |
HS.beacon.identify({ | |
username: '<?php echo $user->user_login ?>', | |
email: '<?php echo $user->user_email ?>', | |
}); | |
}); | |
jQuery(document).on( 'click', '#setting-error-seed_cspv5_api_nag .notice-dismiss', function() { | |
location.href = location.href.replace("&firstrun=1", ""); | |
}); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment