# css-javascript-toolbox/8.0.2/access.points/dashboardmetabox.accesspoint.php

CSS &amp; JavaScript Toolbox, version 8.0.2. 57 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.2/code/access.points/dashboardmetabox.accesspoint.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.2/raw/access.points/dashboardmetabox.accesspoint.php
- Modified: 2014-10-17T21:39:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/css-javascript-toolbox/8.0.2/code/access.points/dashboardmetabox.accesspoint.php#L10-L20`.

```php
<?php
/**
* 
*/

// Disallow direct access.
defined('ABSPATH') or die("Access denied");

/**
* 
*/
class CJTDashboardMetaboxAccessPoint extends CJTAccessPoint {
	
	/**
	* put your comment there...
	* 
	*/
	public function __construct() {
		// Initialize Access Point base!
		parent::__construct();
		// Set access point name!
		$this->name = 'dashboard-metabox';
	}

	/**
	* put your comment there...
	* 
	*/
	public function createMetabox() {
		if (CJTPlugin::getInstance()->isInstalled()) {
			wp_add_dashboard_widget('cjt-statistics', cssJSToolbox::getText('CSS & Javascript Toolbox'), array($this, 'route'));	
		}
	}

	/**
	* put your comment there...
	* 
	*/
	protected function doListen() {
		add_action('wp_dashboard_setup', array(&$this, 'createMetabox'), 10, 0);
	}
	
	/**
	* put your comment there...
	* 
	*/
	public function route($loadView = false, $request = null) {
		// Load Auto Upgrade controller!
		$this->controllerName = 'default';
		parent::route($loadView, $request)
		// Set action name to autoUpgrade
		->setAction('dashboardMetabox')
		// fire action to enable automatic upgrade!
		->_doAction();
	}
	
} // End class.
```
