get_masterslider_names( true ) )); } /** * * @param array $locs * @return array */ public function add_tinymce_lang( $locs ) { $locs['msp_shortcodes_button'] = MSWP_AVERTA_ADMIN_URL . '/assets/js/editor_lang.php'; return $locs; } /** * Register the shortcode button. * * @param array $buttons * @return array */ public function register_shortcode_button( $buttons ) { array_push( $buttons, '|', 'msp_shortcodes_button' ); return $buttons; } /** * Add the shortcode button to TinyMCE * * @param array $plugin_array * @return array */ public function add_shortcode_tinymce_plugin( $plugin_array ) { $wp_version = get_bloginfo( 'version' ); /* Deprecated in WP version 4.2 if ( version_compare( $wp_version, '3.9', '>=' ) ) { $plugin_array['msp_shortcodes_button'] = MSWP_AVERTA_ADMIN_URL . '/assets/js/mce-plugin.js'; }*/ $plugin_array['msp_shortcodes_button'] = MSWP_AVERTA_ADMIN_URL . '/assets/js/mce-plugin.js'; return $plugin_array; } /** * Force TinyMCE to refresh. * * @param int $ver * @return int */ public function refresh_mce( $ver ) { $ver += 3; return $ver; } } new MSP_Admin_Editor();