WP_Rewrite::using_permalinks()publicWP 1.5.0

Determines whether permalinks are being used.

This can be either rewrite module or permalink in the HTTP query string.

Method of the class: WP_Rewrite{}

No Hooks.

Return

true|false. True, if permalinks are enabled.

Usage

global $wp_rewrite;
$wp_rewrite->using_permalinks();

Changelog

Since 1.5.0 Introduced.

WP_Rewrite::using_permalinks() code WP 6.5.2

public function using_permalinks() {
	return ! empty( $this->permalink_structure );
}