public/wordpress/wp-content/plugins/wp-courseware/includes/legacy/setup.php
/**
 * Hide items from the menu we don't want, but still want access to.
 *
 * @since 4.1.0
 */
Hide items from the menu we don't want, but still want access to.
Hide items from the menu we don ' t want but still want access to .
function WPCW_menu_MainMenu_cleanUnwantedEntries() {
	global $submenu;
	$quizCount = WPCW_quizzes_getCoursesNeedingAttentionCount();
	if ( $quizCount > 0 ) {
		if ( isset( $submenu[ WPCW_PLUGIN_ID ] ) ) {
			$submenu[ WPCW_PLUGIN_ID ][0][0] .= sprintf( '<span class="update-plugins count-%d"><span class="update-count">%s</span></span>', $quizCount, $quizCount );
		}
	}
	WPCW_menu_removeSubmenuItem( WPCW_PLUGIN_ID, 'WPCW_showPage_CourseOrdering' );
	WPCW_menu_removeSubmenuItem( WPCW_PLUGIN_ID, 'WPCW_showPage_ConvertPage' );
	WPCW_menu_removeSubmenuItem( WPCW_PLUGIN_ID, 'WPCW_showPage_GradeBook' );
	WPCW_menu_removeSubmenuItem( 'admin.php', 'WPCW_showPage_UserCourseAccess' );
	WPCW_menu_removeSubmenuItem( 'admin.php', 'WPCW_showPage_UserProgess' );
	WPCW_menu_removeSubmenuItem( 'admin.php', 'WPCW_showPage_UserProgess_quizAnswers' );
	WPCW_menu_removeSubmenuItem( 'admin.php', 'WPCW_showPage_UserCourseAccess' );
	WPCW_menu_removeSubmenuItem( 'profile.php', 'WPCW_showPage_UserProgess' );
	WPCW_menu_removeSubmenuItem( 'profile.php', 'WPCW_showPage_UserProgess_quizAnswers' );
}
function WPCW_menu_MainMenu_cleanUnwantedEntries ( ) { global $ submenu ; $ quizCount = WPCW_quizzes_getCoursesNeedingAttentionCount ( ) ; if ( $ quizCount > 0 ) { if ( isset ( $ submenu [ WPCW_PLUGIN_ID ] ) ) { $ submenu [ WPCW_PLUGIN_ID ] [ 0 ] [ 0 ] .= sprintf ( '<span class="update-plugins count-%d"><span class="update-count">%s</span></span>' , $ quizCount , $ quizCount ) ; } } WPCW_menu_removeSubmenuItem ( WPCW_PLUGIN_ID , 'WPCW_showPage_CourseOrdering' ) ; WPCW_menu_removeSubmenuItem ( WPCW_PLUGIN_ID , 'WPCW_showPage_ConvertPage' ) ; WPCW_menu_removeSubmenuItem ( WPCW_PLUGIN_ID , 'WPCW_showPage_GradeBook' ) ; WPCW_menu_removeSubmenuItem ( 'admin.php' , 'WPCW_showPage_UserCourseAccess' ) ; WPCW_menu_removeSubmenuItem ( 'admin.php' , 'WPCW_showPage_UserProgess' ) ; WPCW_menu_removeSubmenuItem ( 'admin.php' , 'WPCW_showPage_UserProgess_quizAnswers' ) ; WPCW_menu_removeSubmenuItem ( 'admin.php' , 'WPCW_showPage_UserCourseAccess' ) ; WPCW_menu_removeSubmenuItem ( 'profile.php' , 'WPCW_showPage_UserProgess' ) ; WPCW_menu_removeSubmenuItem ( 'profile.php' , 'WPCW_showPage_UserProgess_quizAnswers' ) ; }
Hide items from the menu we don't want, but still want access to.
Hide items from the menu we don ' t want but still want access to .
// Rename the Training Courses page to include a count of quizzes that need attention. // Hide context pages //WPCW_menu_removeSubmenuItem(WPCW_PLUGIN_ID, 'WPCW_showPage_ModifyQuestion'); // Hide User Menus // Hide from single profile menus