LLMS_Admin_Menus::instructor_menu_hack()

Removes edit.php from the admin menu for instructors/asst instructors


Description Description

Note: The post screen is still technically accessible.

Posts will need to be submitted for review as the instructors only actually have the capability of a contributor with regards to posts but this hack will allow instructors to publish new lessons, quizzes, & questions.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.menus.php

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
* @since 3.13.0
 * @since 7.0.1 Added filterable early return allowing 3rd parties to modify
 *               the user roles affected by this hack.
 *
 * @link https://core.trac.wordpress.org/ticket/22895
 * @link https://core.trac.wordpress.org/ticket/16808
 *
 * @return void
 */
public function instructor_menu_hack() {
 
    /**
     * Filters the WP_User roles should receive the instructor admin menu hack.
     *
     * If you wish to provide explicit access to the `post` post type, to the
     * instrutor or instructor's assistant role, the role will need to be
     * removed from this array so they can access to the post type edit.php
     * screen.
     *
     * @see LLMS_Admin_Menus::instructor_menu_hack
     *
     * @since 7.0.1
     *


Top ↑

Changelog Changelog

Changelog
Version Description
7.0.1 Added filterable early return allowing 3rd parties to modify the user roles affected by this hack.
3.13.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.