function run() { $appname = NewRelicWrapper::get_wordpress_appname($this->_config, new W3_Config(true)); if ($this->_config->get_boolean('newrelic.use_php_function') || w3_is_network()) { $enable_xmit = $this->_config->get_boolean('newrelic.enable_xmit'); NewRelicWrapper::set_appname($appname, '', $enable_xmit); } if (defined('DOING_CRON') && DOING_CRON) { $this->background_task(); } add_action('init', array($this, 'init')); }
public function set_appname() { static $appname_set; if (!$appname_set && ($this->_config->get_boolean('newrelic.use_php_function') || w3_is_network())) { $appname_set = true; $appname = NewRelicWrapper::get_wordpress_appname($this->_config, new W3_Config(true)); $enable_xmit = $this->_config->get_boolean('newrelic.enable_xmit'); NewRelicWrapper::set_appname($appname, '', $enable_xmit); } }
public function set_appname() { static $appname_set; if (!$appname_set && ($this->_config->get_boolean(array('newrelic', 'use_php_function')) || Util_Environment::is_wpmu())) { $appname_set = true; $service = Dispatcher::component('Extension_NewRelic_Service'); $appname = $service->get_effective_appname(); $enable_xmit = $this->_config->get_boolean(array('newrelic', 'enable_xmit')); \NewRelicWrapper::set_appname($appname, '', $enable_xmit); } }