plugin_path() . '/assets/js/admin/editor-lang.php'; return $arr; } /** * Register the shortcode button. * * @param array $buttons * @return array */ public function register_shortcode_button( $buttons ) { array_push( $buttons, 'sp_shortcodes_button' ); return $buttons; } /** * Add the shortcode button to TinyMCE * * @param array $plugin_array * @return array */ public function add_shortcode_tinymce_plugin( $plugin_array ) { $plugin_array['sp_shortcodes_button'] = SP()->plugin_url() . '/assets/js/admin/editor.js'; return $plugin_array; } /** * Force TinyMCE to refresh. * * @param int $ver * @return int */ public function refresh_mce( $ver ) { $ver += 3; return $ver; } } new SP_Admin_Editor();