Skip to content
Snippets Groups Projects
Commit 834a5264 authored by Lauren's avatar Lauren
Browse files

Localized plugin url variable for use in javascript file. Hooked to admin_head.

parent 3fbfa025
No related branches found
No related tags found
No related merge requests found
......@@ -72,3 +72,20 @@ function lbdesign_register_buttons( $buttons ) {
return $buttons;
}
/**
* Localize Script
*/
function lbdbs_admin_head() {
$plugin_url = plugins_url( '/', __FILE__ );
?>
<!-- TinyMCE Shortcode Plugin -->
<script type='text/javascript'>
var lbdbs_plugin = {
'url': '<?php echo $plugin_url; ?>',
};
</script>
<!-- TinyMCE Shortcode Plugin -->
<?php
}
add_action( "admin_head", 'lbdbs_admin_head' );
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment