Yoast\WP\SEO\Conditionals

AI_Editor_Conditional::is_elementor_editorprivateYoast 1.0

Returns true when the page is the Elementor editor.

Метод класса: AI_Editor_Conditional{}

Хуков нет.

Возвращает

true|false. true when the page is the Elementor editor.

Использование

// private - только в коде основоного (родительского) класса
$result = $this->is_elementor_editor();

Код AI_Editor_Conditional::is_elementor_editor() Yoast 27.8

private function is_elementor_editor() {
	if ( $this->current_page_helper->get_current_admin_page() !== 'post.php' ) {
		return false;
	}

	// phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information.
	if ( isset( $_GET['action'] ) && \is_string( $_GET['action'] ) ) {
		// phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only strictly comparing.
		if ( \wp_unslash( $_GET['action'] ) === 'elementor' ) {
			return true;
		}
	}

	return false;
}