got_mod_rewrite

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

WordPress Version: 5.3

/**
 * Misc WordPress Administration API.
 *
 * @package WordPress
 * @subpackage Administration
 */
/**
 * Returns whether the server is running Apache with the mod_rewrite module loaded.
 *
 * @since 2.0.0
 *
 * @return bool Whether the server is running Apache with the mod_rewrite module loaded.
 */
function got_mod_rewrite()
{
    $got_rewrite = apache_mod_loaded('mod_rewrite', true);
    /**
     * Filters whether Apache and mod_rewrite are present.
     *
     * This filter was previously used to force URL rewriting for other servers,
     * like nginx. Use the {@see 'got_url_rewrite'} filter in got_url_rewrite() instead.
     *
     * @since 2.5.0
     *
     * @see got_url_rewrite()
     *
     * @param bool $got_rewrite Whether Apache and mod_rewrite are present.
     */
    return apply_filters('got_rewrite', $got_rewrite);
}

WordPress Version: 4.6

/**
 * Misc WordPress Administration API.
 *
 * @package WordPress
 * @subpackage Administration
 */
/**
 * Returns whether the server is running Apache with the mod_rewrite module loaded.
 *
 * @since 2.0.0
 *
 * @return bool
 */
function got_mod_rewrite()
{
    $got_rewrite = apache_mod_loaded('mod_rewrite', true);
    /**
     * Filters whether Apache and mod_rewrite are present.
     *
     * This filter was previously used to force URL rewriting for other servers,
     * like nginx. Use the {@see 'got_url_rewrite'} filter in got_url_rewrite() instead.
     *
     * @since 2.5.0
     *
     * @see got_url_rewrite()
     *
     * @param bool $got_rewrite Whether Apache and mod_rewrite are present.
     */
    return apply_filters('got_rewrite', $got_rewrite);
}

WordPress Version: 4.0

/**
 * Misc WordPress Administration API.
 *
 * @package WordPress
 * @subpackage Administration
 */
/**
 * Returns whether the server is running Apache with the mod_rewrite module loaded.
 *
 * @since 2.0.0
 *
 * @return bool
 */
function got_mod_rewrite()
{
    $got_rewrite = apache_mod_loaded('mod_rewrite', true);
    /**
     * Filter whether Apache and mod_rewrite are present.
     *
     * This filter was previously used to force URL rewriting for other servers,
     * like nginx. Use the got_url_rewrite filter in got_url_rewrite() instead.
     *
     * @since 2.5.0
     *
     * @see got_url_rewrite()
     *
     * @param bool $got_rewrite Whether Apache and mod_rewrite are present.
     */
    return apply_filters('got_rewrite', $got_rewrite);
}

WordPress Version: 3.7

/**
 * Misc WordPress Administration API.
 *
 * @package WordPress
 * @subpackage Administration
 */
/**
 * Returns whether the server is running Apache with the mod_rewrite module loaded.
 *
 * @since 2.0.0
 *
 * @return bool
 */
function got_mod_rewrite()
{
    $got_rewrite = apache_mod_loaded('mod_rewrite', true);
    /**
     * Filter whether Apache and mod_rewrite are present.
     *
     * This filter was previously used to force URL rewriting for other servers,
     * like nginx. Use the got_url_rewrite filter in got_url_rewrite() instead.
     *
     * @see got_url_rewrite()
     *
     * @since 2.5.0
     * @param bool $got_rewrite Whether Apache and mod_rewrite are present.
     */
    return apply_filters('got_rewrite', $got_rewrite);
}