protected function prepare_panels() {
		if ( ! $this instanceof Has_Panel ) {
			return;
		}

		// Prepare panels.
		$this->panels = wp_list_sort( $this->panels(), [
			'priority'        => 'ASC',
			'instance_number' => 'ASC',
		], 'ASC', true );

		$panels = [];

		foreach ( $this->panels() as $panel ) {
			if ( ! $panel->check_capabilities() ) {
				continue;
			}

			$panel->sections = wp_list_sort( $panel->sections, [
				'priority'        => 'ASC',
				'instance_number' => 'ASC',
			], 'ASC', true );

			$panels[ $panel->id ] = $panel;
		}

		// Set the panels.
		$this->panels = $panels;
	}