Dashboard::dashboard_permalinks( $permalinks )


Source

File: classes/Dashboard.php

	public function dashboard_permalinks( $permalinks ) {
		if ( dozent_count( $permalinks ) ) {
			foreach ( $permalinks as $group_key => $menu_group ) {

				$enable_dozent_earning = (bool) dozent_get_option( 'enable_dozent_earning' );
				if ( ! $enable_dozent_earning ) {
					if ( ! empty( $permalinks[ $group_key ]['earning'] ) ) {
						unset( $permalinks[ $group_key ]['earning'] );
					}

					if ( ! empty( $permalinks[ $group_key ]['withdraw'] ) ) {
						unset( $permalinks[ $group_key ]['withdraw'] );
					}
				}
			}
		}

		return $permalinks;
	}