diff --git a/classes/admin.php b/classes/admin.php index cf7b59b..b1295a1 100644 --- a/classes/admin.php +++ b/classes/admin.php @@ -16,11 +16,11 @@ public function __construct() { add_action( 'admin_notices', array( $this, 'admin_notices' ) ); // Add a button to the TinyMCE console - add_action( 'admin_head', array( &$this, 'register_shortcode_button' ) ); + add_action( 'edit_form_after_title', array( &$this, 'register_shortcode_button' ) ); } /** - * This method adds a button that helps the user insert a shortcode intstead of having to memorize it + * This method adds a button that helps the user insert a shortcode instead of having to memorize it * * @since 2.5.1 */ diff --git a/inc/js/shortcode.js b/inc/js/shortcode.js index d92176e..3dbbfa7 100644 --- a/inc/js/shortcode.js +++ b/inc/js/shortcode.js @@ -4,7 +4,7 @@ (function ($) { tinymce.PluginManager.add('simplemap_button', function(editor, url) { editor.addButton('simplemap_button', { - icon : 'simplemap', + icon : 'simplemap dashicons-before dashicons-location-alt', tooltip : simple_map_js_array.i10n['title_button'], onclick : function (e) { editor.windowManager.open( { diff --git a/inc/styles/shortcode.css b/inc/styles/shortcode.css index a560181..e67f893 100644 --- a/inc/styles/shortcode.css +++ b/inc/styles/shortcode.css @@ -1,3 +1,28 @@ i.mce-i-simplemap:before { content: "\f231"; +} + +.sm-mce-shortcode { + width: 94%; + margin: 2% 3%; +} + +.sm-mce-shortcode fieldset { + margin-bottom: 9px; +} + +.sm-mce-shortcode fieldset > *:first-child { + float: left; + display: block; + width: 25%; +} + +.sm-mce-shortcode fieldset > div { + float: left; + width: 75%; +} + +.sm-mce-shortcode fieldset > div > label { + float: left; + width: 25%; } \ No newline at end of file diff --git a/inc/templates/shortcode.php b/inc/templates/shortcode.php index 2c9ba80..22a7668 100644 --- a/inc/templates/shortcode.php +++ b/inc/templates/shortcode.php @@ -3,7 +3,7 @@ $tags = get_terms( array( 'taxonomy' => 'sm-tag', 'hide_empty' => false, 'fields' => 'id=>name' ) ); ?> -