How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php].
Like this image:
Output: If I click the icon it automatically writes [plugin]
to the post content like this:
How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php].
Like this image:
Output: If I click the icon it automatically writes [plugin]
to the post content like this:
You must be logged in to post a comment.
To add our button to the TinyMCE editor we need to do several things:
Steps #1 and #2
In these steps we register our TinyMCE plug-in which will live inside a javascript file at
'path/to/shortcode.js'
(seewpse72394_register_tinymce_plugin()
below)Step #3
Now we need to create our TinyMCE plug-in. This will go in a file
'path/to/shortcode.js'
(as specified in the early steps).There’s too much to put the whole answer here so checkout this guide: http://wp.smashingmagazine.com/2012/05/01/wordpress-shortcodes-complete-guide/
You have to create a Javascript file that takes action from the button you register through WordPress that inserts the TinyMCE button into the editor.