m_cache = $cache; if ($status != ExecPhp_STATUS_OKAY) return; add_filter('the_content', array(&$this, 'filter_user_content'), 1); add_filter('the_content_rss', array(&$this, 'filter_user_content'), 1); add_filter('the_excerpt', array(&$this, 'filter_user_content'), 1); add_filter('the_excerpt_rss', array(&$this, 'filter_user_content'), 1); add_filter('widget_text', array(&$this, 'filter_widget_content'), 1); } // --------------------------------------------------------------------------- // tools // --------------------------------------------------------------------------- function eval_php($content) { // to be compatible with older PHP4 installations // don't use fancy ob_XXX shortcut functions ob_start(); eval("?>$contentpost_author)) return $content; $poster = new WP_User($post->post_author); if (!$poster->has_cap(ExecPhp_CAPABILITY_EXECUTE_ARTICLES)) return $content; return $this->eval_php($content); } function filter_widget_content($content) { // check whether the admin has configured widget support $option =& $this->m_cache->get_option(); if (!$option->get_widget_support()) return $content; return $this->eval_php($content); } } ?>