✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.191
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/sections/user-interface-20260907211851/tasks//get-tasks-route.php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Task_List\User_Interface\Tasks;

use Exception;
use WP_REST_Response;
use Yoast\WP\SEO\Conditionals\Task_List_Enabled_Conditional;
use Yoast\WP\SEO\Helpers\Capability_Helper;
use Yoast\WP\SEO\Main;
use Yoast\WP\SEO\Routes\Route_Interface;
use Yoast\WP\SEO\Task_List\Application\Tasks_Repository;
use Yoast\WP\SEO\Tracking\Application\Action_Tracker;

/**
 * Get tasks route.
 */
final class Get_Tasks_Route implements Route_Interface {

	/**
	 * The namespace of the route.
	 *
	 * @var string
	 */
	public const ROUTE_NAMESPACE = Main::API_V1_NAMESPACE;

	/**
	 * The prefix of the route.
	 *
	 * @var string
	 */
	public const ROUTE_NAME = '/get_tasks';

	/**
	 * The task repository.
	 *
	 * @var Tasks_Repository
	 */
	private $tasks_repository;

	/**
	 * Holds the capability helper instance.
	 *
	 * @var Capability_Helper
	 */
	private $capability_helper;

	/**
	 * Holds the action tracker instance.
	 *
	 * @var Action_Tracker
	 */
	private $action_tracker;

	/**
	 * Returns the needed conditionals.
	 *
	 * @return array<string> The conditionals that must be met to load this.
	 */
	public static function get_conditionals(): array {
		return [
			Task_List_Enabled_Conditional::class,
		];
	}

	/**
	 * The constructor.
	 *
	 * @param Tasks_Repository  $tasks_repository  The repository for all tasks.
	 * @param Capability_Helper $capability_helper The capability helper.
	 * @param Action_Tracker    $action_tracker    The action tracker.
	 */
	public function __construct(
		Tasks_Repository $tasks_repository,
		Capability_Helper $capability_helper,
		Action_Tracker $action_tracker
	) {
		$this->tasks_repository  = $tasks_repository;
		$this->capability_helper = $capability_helper;
		$this->action_tracker    = $action_tracker;
	}

	/**
	 * Registers routes for scores.
	 *
	 * @return void
	 */
	public function register_routes() {
		\register_rest_route(
			self::ROUTE_NAMESPACE,
			self::ROUTE_NAME,
			[
				[
					'methods'             => 'GET',
					'callback'            => [ $this, 'get_tasks' ],
					'permission_callback' => [ $this, 'permission_manage_options' ],
					'args'                => [
						'options' => [
							'type'       => 'object',
							'required'   => false,
							'properties' => [
								'filter' => [
									'type'              => 'string',
									'required'          => false,
									'sanitize_callback' => 'sanitize_text_field',
								],
								'limit' => [
									'type'              => 'int',
									'required'          => false,
									'sanitize_callback' => 'absint',
								],
							],
						],
					],
				],
			],
		);
	}

	/**
	 * Gets tasks with their information.
	 *
	 * @return WP_REST_Response The success or failure response.
	 */
	public function get_tasks(): WP_REST_Response {
		try {
			$this->action_tracker->track_version_for_performed_action( 'task_list_first_opened_on' );

			$tasks_data = $this->tasks_repository->get_tasks_data();
		} catch ( Exception $exception ) {
			return new WP_REST_Response(
				[
					'success' => false,
					'error'   => $exception->getMessage(),
				],
				$exception->getCode(),
			);
		}

		return new WP_REST_Response(
			[
				'success' => true,
				'tasks'   => $tasks_data,
			],
			200,
		);
	}

	/**
	 * Permission callback.
	 *
	 * @return bool True when user has the 'wpseo_manage_options' capability.
	 */
	public function permission_manage_options() {
		return $this->capability_helper->current_user_can( 'wpseo_manage_options' );
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
21 Sep 2026 6.29 AM
docteuh / users
0755
complete-task-route.php
3.918 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
get-tasks-route.php
3.521 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103006-20260829114738-20260905193350.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103038-20260829114745-20260901130639.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103054-20260829114739-20260901130749.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103225-20260829230601-20260901151404.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103225-20260829230601-20260901204524.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103225-20260831111900-20260901114837.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103225-20260831111900-20260901204506.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260827192224-20260829103225-20260831111900-20260902111100.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830003632-20260830003701-20260830003856-20260830004225-20260903023808.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830003632-20260830003701-20260830003856-20260830025111-20260902205828.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829102432-20260830004210-20260830004246-20260830005248-20260830162520-20260902222816.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829102432-20260830004210-20260830004246-20260830005922-20260830051300-20260902205822.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF