Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LBDesign Button Shortcode
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
plugins
LBDesign Button Shortcode
Commits
834a5264
Commit
834a5264
authored
8 years ago
by
Lauren
Browse files
Options
Downloads
Patches
Plain Diff
Localized plugin url variable for use in javascript file. Hooked to admin_head.
parent
3fbfa025
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lbdesign-button-shortcode.php
+17
-0
17 additions, 0 deletions
lbdesign-button-shortcode.php
with
17 additions
and
0 deletions
lbdesign-button-shortcode.php
+
17
−
0
View file @
834a5264
...
...
@@ -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'
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment