got_url_rewrite example

get_current_screen()->set_help_sidebar( $help_sidebar_content );
unset( $help_sidebar_content );

$home_path           = get_home_path();
$iis7_permalinks     = iis7_supports_permalinks();
$permalink_structure = get_option( 'permalink_structure' );

$index_php_prefix = '';
$blog_prefix      = '';

if ( ! got_url_rewrite() ) {
    $index_php_prefix = '/index.php';
}

/* * In a subdirectory configuration of multisite, the `/blog` prefix is used by * default on the main site to avoid collisions with other sites created on that * network. If the `permalink_structure` option has been changed to remove this * base prefix, WordPress core can no longer account for the possible collision. */
if ( is_multisite() && ! is_subdomain_install() && is_main_site()
    && str_starts_with( $permalink_structure, '/blog/' )
)
// Imagick.         $imagick_loaded = extension_loaded( 'imagick' );

        $info['wp-server']['fields']['imagick_availability'] = array(
            'label' => __( 'Is the Imagick library available?' ),
            'value' => ( $imagick_loaded ? __( 'Yes' ) : __( 'No' ) ),
            'debug' => $imagick_loaded,
        );

        // Pretty permalinks.         $pretty_permalinks_supported = got_url_rewrite();

        $info['wp-server']['fields']['pretty_permalinks'] = array(
            'label' => __( 'Are pretty permalinks supported?' ),
            'value' => ( $pretty_permalinks_supported ? __( 'Yes' ) : __( 'No' ) ),
            'debug' => $pretty_permalinks_supported,
        );

        // Check if a .htaccess file exists.         if ( is_file( ABSPATH . '.htaccess' ) ) {
            // If the file exists, grab the content of it.             $htaccess_content = file_get_contents( ABSPATH . '.htaccess' );

            
Home | Imprint | This part of the site doesn't use cookies.