# wp-parsely/3.24.3/src/rest-api/settings/class-endpoint-dashboard-widget-settings.php

Parse.ly, version 3.24.3. 66 lines.

- Page: https://pluginprobe.com/plugins/wp-parsely/3.24.3/code/src/rest-api/settings/class-endpoint-dashboard-widget-settings.php
- Raw: https://pluginprobe.com/plugins/wp-parsely/3.24.3/raw/src/rest-api/settings/class-endpoint-dashboard-widget-settings.php
- Modified: 2025-07-08T13:46:50+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-parsely/3.24.3/code/src/rest-api/settings/class-endpoint-dashboard-widget-settings.php#L10-L20`.

```php
<?php
/**
 * API Endpoint: Dashboard Widget Settings
 *
 * @package Parsely
 * @since   3.17.0
 */

declare(strict_types=1);

namespace Parsely\REST_API\Settings;

/**
 * Endpoint for saving and retrieving Content Intelligence Dashboard Widget
 * settings.
 *
 * @since 3.17.0
 *
 * @phpstan-import-type Subvalue_Spec from Base_Settings_Endpoint
 */
class Endpoint_Dashboard_Widget_Settings extends Base_Settings_Endpoint {
	/**
	 * Returns the endpoint's name.
	 *
	 * @since 3.17.0
	 *
	 * @return string
	 */
	public static function get_endpoint_name(): string {
		return 'dashboard-widget';
	}

	/**
	 * Returns the meta entry's key.
	 *
	 * @since 3.13.0
	 * @since 3.17.0 Moved from Dashboard_Widget_Settings_Endpoint.
	 *
	 * @return string The meta entry's key.
	 */
	protected function get_meta_key(): string {
		return 'parsely_content_helper_settings_dashboard_widget';
	}

	/**
	 * Returns the endpoint's subvalues specifications.
	 *
	 * @since 3.13.0
	 * @since 3.17.0 Moved from Dashboard_Widget_Settings_Endpoint.
	 *
	 * @return array<string, Subvalue_Spec>
	 */
	protected function get_subvalues_specs(): array {
		return array(
			'Metric' => array(
				'values'  => array( 'views', 'avg_engaged' ),
				'default' => 'views',
			),
			'Period' => array(
				'values'  => array( '10m', '1h', '2h', '4h', '24h', '7d', '30d' ),
				'default' => '7d',
			),
		);
	}
}

```
