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

WP_Rewrite::set_permalink_structure() public WP 1.5.0

Sets the main permalink structure for the site.

Will update the 'permalink_structure' option, if there is a difference between the current permalink structure and the parameter value. Calls WP_Rewrite::init() after the option is updated.

Fires the 'permalink_structure_changed' action once the init call has processed passing the old and new values

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

Хуки из метода
Возвращает

Null. Ничего.

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

$WP_Rewrite = new WP_Rewrite();
$WP_Rewrite->set_permalink_structure( $permalink_structure );
$permalink_structure(строка) (обязательный)
Permalink structure.

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

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

Код WP_Rewrite::set_permalink_structure() WP 5.5.1

wp-includes/class-wp-rewrite.php
<?php
public function set_permalink_structure( $permalink_structure ) {
	if ( $permalink_structure != $this->permalink_structure ) {
		$old_permalink_structure = $this->permalink_structure;
		update_option( 'permalink_structure', $permalink_structure );

		$this->init();

		/**
		 * Fires after the permalink structure is updated.
		 *
		 * @since 2.8.0
		 *
		 * @param string $old_permalink_structure The previous permalink structure.
		 * @param string $permalink_structure     The new permalink structure.
		 */
		do_action( 'permalink_structure_changed', $old_permalink_structure, $permalink_structure );
	}
}