Make WordPress Core


Ignore:
Timestamp:
03/25/2008 12:22:37 AM (17 years ago)
Author:
ryan
Message:

Reture true from got_mod_rewrite if we can't determine if the module is loaded. Add got_rewrite filter. Props andy. fixes #6278

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions.php

    r7478 r7508  
    17261726 *
    17271727 * @param string $mod e.g. mod_rewrite
     1728 * @param bool $default The default return value if the module is not found
    17281729 * @return bool
    17291730 */
    1730 function apache_mod_loaded($mod) {
     1731function apache_mod_loaded($mod, $default = false) {
    17311732    global $is_apache;
    17321733
     
    17381739        if ( in_array($mod, $mods) )
    17391740            return true;
    1740     } else {
     1741    } elseif ( function_exists('phpinfo') ) {
    17411742            ob_start();
    17421743            phpinfo(8);
     
    17451746                return true;
    17461747    }
    1747     return false;
     1748    return $default;
    17481749}
    17491750
Note: See TracChangeset for help on using the changeset viewer.