# wordpress-seo/28.6/src/bulk-editor/infrastructure/nonces/nonce-repository.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.6. 20 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.6/code/src/bulk-editor/infrastructure/nonces/nonce-repository.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.6/raw/src/bulk-editor/infrastructure/nonces/nonce-repository.php
- Modified: 2026-07-07T11:18: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/wordpress-seo/28.6/code/src/bulk-editor/infrastructure/nonces/nonce-repository.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Bulk_Editor\Infrastructure\Nonces;

/**
 * Repository for WP nonces.
 */
class Nonce_Repository {

	/**
	 * Creates the nonce for a WP REST request.
	 *
	 * @return string
	 */
	public function get_rest_nonce(): string {
		return \wp_create_nonce( 'wp_rest' );
	}
}

```
