public/wordpress/wp-content/plugins/wp-courseware/includes/functions/students.php
/**
 * Get Student Account Menu Items.
 *
 * @since 4.3.0
 *
 * @return array The array of menu items.
 */
Get Student Account Menu Items.

@return array The array of menu items.
Get Student Account Menu Items . @return array The array of menu items .
function wpcw_get_student_account_menu_items() {
	$endpoints = array(
		'courses'        => wpcw_get_setting( 'student_courses_endpoint' ),
		'orders'         => wpcw_get_setting( 'student_orders_endpoint' ),
		'subscriptions'  => wpcw_get_setting( 'student_subscriptions_endpoint' ),
		'edit-account'   => wpcw_get_setting( 'student_edit_account_endpoint' ),
		'student-logout' => wpcw_get_setting( 'student_logout_endpoint' ),
	);
	$menu_items = array(
		'dashboard'      => esc_html__( 'Dashboard', 'wp-courseware' ),
		'courses'        => esc_html__( 'Courses', 'wp-courseware' ),
		'orders'         => esc_html__( 'Orders', 'wp-courseware' ),
		'subscriptions'  => esc_html__( 'Subscriptions', 'wp-courseware' ),
		'edit-account'   => esc_html__( 'Account', 'wp-courseware' ),
		'student-logout' => esc_html__( 'Logout', 'wp-courseware' ),
	);
	foreach ( $endpoints as $endpoint_id => $endpoint ) {
		if ( empty( $endpoint ) ) {
			unset( $menu_items[ $endpoint_id ] );
		}
	}
	return apply_filters( 'wpcw_student_account_menu_items', $menu_items );
}
function wpcw_get_student_account_menu_items ( ) { $ endpoints = array ( 'courses' => wpcw_get_setting ( 'student_courses_endpoint' ) , 'orders' => wpcw_get_setting ( 'student_orders_endpoint' ) , 'subscriptions' => wpcw_get_setting ( 'student_subscriptions_endpoint' ) , 'edit-account' => wpcw_get_setting ( 'student_edit_account_endpoint' ) , 'student-logout' => wpcw_get_setting ( 'student_logout_endpoint' ) , ) ; $ menu_items = array ( 'dashboard' => esc_html__ ( 'Dashboard' , 'wp-courseware' ) , 'courses' => esc_html__ ( 'Courses' , 'wp-courseware' ) , 'orders' => esc_html__ ( 'Orders' , 'wp-courseware' ) , 'subscriptions' => esc_html__ ( 'Subscriptions' , 'wp-courseware' ) , 'edit-account' => esc_html__ ( 'Account' , 'wp-courseware' ) , 'student-logout' => esc_html__ ( 'Logout' , 'wp-courseware' ) , ) ; foreach ( $ endpoints as $ endpoint_id => $ endpoint ) { if ( empty ( $ endpoint ) ) { unset ( $ menu_items [ $ endpoint_id ] ) ; } } return apply_filters ( 'wpcw_student_account_menu_items' , $ menu_items ) ; }
Get Student Account Menu Items.
Get Student Account Menu Items .
// Remove missing endpoints. /**
	 * Action: Student Account Menu Items.
	 *
	 * @since 4.3.0
	 *
	 * @param array $menu_items The student account menu items.
	 */