WordPress at Your Fingertips
function is not described

WP_Rewrite::using_index_permalinks() public WP 1.5.0

Determines whether permalinks are being used and rewrite module is not enabled.

Means that permalink links are enabled and index.php is in the URL.

{} It's a method of the class: WP_Rewrite{}

No Hooks.

Return

true|false. Whether permalink links are enabled and index.php is in the URL.

Usage

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

Changelog

Since 1.5.0 Introduced.

Code of WP_Rewrite::using_index_permalinks() WP 5.8

<?php
public function using_index_permalinks() {
	if ( empty( $this->permalink_structure ) ) {
		return false;
	}

	// If the index is not in the permalink, we're using mod_rewrite.
	return preg_match( '#^/*' . $this->index . '#', $this->permalink_structure );
}