basedir) { // check to see if we can override the .htaccess file in the WP root if (get_option('lp_opt_install_type') == 'root') { return $lightpress_rewrite_helper->buildHtaccess(); } else { return $rules . "\n# LightPress is in 'testing' mode, please check the LightPress admin console\n# for LP .htaccess rules\n"; } } else { return $rules; } } add_filter('mod_rewrite_rules', 'lpadmin_rewrite_rules'); /***** LP Tagging *****/ require_once 'wp-plugin/LightPressTagging.php'; $lightpress_tag_helper =& new LightPressTagging(); /***** LP Cache Refresh *****/ if (get_option('lp_opt_cache_actions_enabled') == '1') { $ret = include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'FileCache.php'); if ($ret) { $lp_cache_args = get_option('lp_opt_cache_args'); if (!is_array($lp_cache_args)) { if (is_string($lp_cache_args) && !empty($lp_cache_args)) $lp_cache_args = @unserialize($lp_cache_args); if (!is_array($lp_cache_args)) { trigger_error('non-array cache arguments in lightpress.php ' . __LINE__ . ' ' . var_export($lp_cache_args, true), E_USER_WARNING); $lp_cache_args = array(); } } $lp_cache =& new LightPressCache($lp_cache_args); if (get_option('lp_opt_cache_actions_all_pages') == '1') { add_action('publish_post', array(&$lp_cache, 'clearCache'), 99); //add_action('edit_post', array(&$lp_cache, 'clearCache'), 99); add_action('comment_post', array(&$lp_cache, 'clearCache'), 99); add_action('edit_comment', array(&$lp_cache, 'clearCache'), 99); add_action('delete_comment', array(&$lp_cache, 'clearCache'), 99); } else { add_action('publish_post', array(&$lp_cache, 'clearCachePost'), 99); //add_action('edit_post', array(&$lp_cache, 'clearCachePost'), 99); add_action('comment_post', array(&$lp_cache, 'clearCacheComment'), 99); add_action('edit_comment', array(&$lp_cache, 'clearCacheComment'), 99); add_action('delete_comment', array(&$lp_cache, 'clearCacheComment'), 99); } } } ?>