iis7_supports_permalinks

The timeline below displays how wordpress function iis7_supports_permalinks has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.5

/**
 * Checks if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the website. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument', false) && isset($_SERVER['IIS_UrlRewriteModule']) && 'cgi-fcgi' === PHP_SAPI;
    }
    /**
     * Filters whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 6.1

/**
 * Checks if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument', false) && isset($_SERVER['IIS_UrlRewriteModule']) && 'cgi-fcgi' === PHP_SAPI;
    }
    /**
     * Filters whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 5.5

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument', false) && isset($_SERVER['IIS_UrlRewriteModule']) && 'cgi-fcgi' === PHP_SAPI;
    }
    /**
     * Filters whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 4.6

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument', false) && isset($_SERVER['IIS_UrlRewriteModule']) && PHP_SAPI == 'cgi-fcgi';
    }
    /**
     * Filters whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 4.4

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument', false) && isset($_SERVER['IIS_UrlRewriteModule']) && PHP_SAPI == 'cgi-fcgi';
    }
    /**
     * Filter whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 4.3

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @global bool $is_iis7
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && PHP_SAPI == 'cgi-fcgi';
    }
    /**
     * Filter whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 4.2

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && PHP_SAPI == 'cgi-fcgi';
    }
    /**
     * Filter whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 4.0

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @return bool Whether IIS7 supports permalinks.
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && php_sapi_name() == 'cgi-fcgi';
    }
    /**
     * Filter whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 3.9

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @return bool
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && php_sapi_name() == 'cgi-fcgi';
    }
    /**
     * Filter whether IIS 7+ supports pretty permalinks.
     *
     * @since 2.8.0
     *
     * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
     */
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}

WordPress Version: 3.7

/**
 * Check if IIS 7+ supports pretty permalinks.
 *
 * @since 2.8.0
 *
 * @return bool
 */
function iis7_supports_permalinks()
{
    global $is_iis7;
    $supports_permalinks = false;
    if ($is_iis7) {
        /* First we check if the DOMDocument class exists. If it does not exist, then we cannot
         * easily update the xml configuration file, hence we just bail out and tell user that
         * pretty permalinks cannot be used.
         *
         * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the web site. When
         * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
         * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
         * via ISAPI then pretty permalinks will not work.
         */
        $supports_permalinks = class_exists('DOMDocument') && isset($_SERVER['IIS_UrlRewriteModule']) && php_sapi_name() == 'cgi-fcgi';
    }
    return apply_filters('iis7_supports_permalinks', $supports_permalinks);
}