WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WP_Rewrite::wp_rewrite_rules() public WP 1.5.0

Retrieves the rewrite rules.

The difference between this method and WP_Rewrite::rewrite_rules() is that this method stores the rewrite rules in the 'rewrite_rules' option and retrieves it. This prevents having to process all of the permalinks to get the rewrite rules in the form of caching.

Это метод класса: WP_Rewrite{}

Хуков нет.

Возвращает

Строку[]. Array of rewrite rules keyed by their regex pattern.

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

$WP_Rewrite = new WP_Rewrite();
$WP_Rewrite->wp_rewrite_rules();

Список изменений

С версии 1.5.0 Введена.

Код WP_Rewrite::wp_rewrite_rules() WP 5.5.1

wp-includes/class-wp-rewrite.php
<?php
public function wp_rewrite_rules() {
	$this->rules = get_option( 'rewrite_rules' );
	if ( empty( $this->rules ) ) {
		$this->matches = 'matches';
		$this->rewrite_rules();
		if ( ! did_action( 'wp_loaded' ) ) {
			add_action( 'wp_loaded', array( $this, 'flush_rules' ) );
			return $this->rules;
		}
		update_option( 'rewrite_rules', $this->rules );
	}

	return $this->rules;
}