דלג על הניווט

Open

Topic Tags: Compatibility

Overview of the issue

If you remove the wpml_manage_media_translation capability with Publishpress Capabilities plugin, you will notice that users are still able to access the WPML Media Translation section.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your theme's function.php file.
  • Add the following code:
    // WPML Workaround for compsupp-7344
    function wpml_compsupp7344_disable_wpml_media_translation_menu() {
        // Check if the current user lacks the required capability
        if (! current_user_can('wpml_manage_media_translation')) {
            // Remove the WPML Media Translation menu
    		remove_submenu_page( 'tm/menu/main.php', 'wpml-media' );
        }
    }
    
    add_action('admin_init', 'wpml_compsupp7344_disable_wpml_media_translation_menu');
    

השאר תגובה

אנא הישאר בנושא והיה מכבד כלפי אחרים. אם אתה זקוק לעזרה בנושאים שאינם קשורים לפוסט זה, השתמש בפורום התמיכה שלנו כדי להתחיל צ'אט או לשלוח כרטיס.

אתה יכול להשתמש בתגים אלה:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>