framework_url() . 'css/shortcode-generator.css' ); wp_enqueue_style( 'addons_espania-shortcode-generator' ); } } /* * Add new button to the tinyMCE editor. */ function filter_mce_buttons( $buttons ) { array_push( $buttons, 'addons_espania_shortcodes_button' ); return $buttons; } /* * Add functionality to the tinyMCE editor as an external plugin. */ function filter_mce_external_plugins( $plugin_array ) { $plugin_array['addons_espania_shortcodes_button'] = $this->framework_url() . 'editor_plugin.js'; return $plugin_array; } /* * Get url of curreny dir */ function framework_url() { return trailingslashit( plugin_dir_url( __FILE__ ) . '/' ); } } /* * INSTANTIATE CLASS */ $Addons_Espania_Shortcode_Generator = new Addons_Espania_Shortcode_Generator(); ?>