Support » Plugin: qTranslate » How to remove admin language menus?

  • Resolved brasofilo

    (@brasofilo)


    Previously on Lost… I mean, previously I used to hack the plugin to do this, but there are smoother ways.

    Like creating a Must Use plugin and using a couple of lines to remove qT menu hook.

    <?php
    /**
     * Plugin Name: Remove qTranslate Admin Flags
     * Plugin URI: http://wordpress.org/support/topic/how-to-remove-admin-language-menus
     * Version: 1.0
     * Author: Rodolfo Buaiz
     * Author URI: http://www.rodbuaiz.com
     * License: GPLv2 or later
     */
    add_action( 'plugins_loaded', function() {
    	remove_action( 'admin_menu', 'qtrans_adminMenu' );
    }, 15 );

    This is PHP 5.3 callback style.

    It can be this way too:

    add_action( 'plugins_loaded', 'b5f_remove_qt_admin_menus', 15 );
    function b5f_remove_qt_admin_menus() {
    	remove_action( 'admin_menu', 'qtrans_adminMenu' );
    }

    http://wordpress.org/extend/plugins/qtranslate/

  • The topic ‘How to remove admin language menus?’ is closed to new replies.