private static function set( $type, $slug ) {

		global $pagenow;

		$data = self::$data[ $type ][ $slug ];

		do_action( 'wp_menu_pre_add_' . $type . '_page' );

		if ( 'menu' === $type ) {

			$page = add_menu_page(
				$data['title'],
				$data['name'],
				$data['capability'],
				$data['slug'],
				$data['function'],
				$data['icon_url'],
				$data['position']
			);

		} elseif ( 'submenu' === $type ) {

			$page = add_submenu_page(
				$data['parent'],
				$data['title'],
				$data['name'],
				$data['capability'],
				$data['slug'],
				$data['function']
			);
		}

		do_action( 'wp_menu_after_add_' . $type . '_page', 'load-' . $page );

		if ( ! $pagenow || 'admin.php' === $pagenow ) {
			self::set_action( $page, $data['styles'] );
			self::set_action( $page, $data['scripts'] );
		}
	}