# css-javascript-toolbox/6.0.6/framework/events/observers/wordpress-hook.observer.php

CSS &amp; JavaScript Toolbox, version 6.0.6. 66 lines.

- Page: https://pluginprobe.com/plugins/css-javascript-toolbox/6.0.6/code/framework/events/observers/wordpress-hook.observer.php
- Raw: https://pluginprobe.com/plugins/css-javascript-toolbox/6.0.6/raw/framework/events/observers/wordpress-hook.observer.php
- Modified: 2013-03-17T20:09:52+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/6.0.6/code/framework/events/observers/wordpress-hook.observer.php#L10-L20`.

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


//Import dependencies.
require_once 'observer.observer.php';

/**
* 
*/
abstract class CJTWordpressHookObserver extends CJTObserver {
	
	/**
	* put your comment there...
	* 
	* @var mixed
	*/
	protected $priority;
	
	/**
	* 
	*/
	const PRIORITY = 10;
	
	/**
	* put your comment there...
	* 
	* @param mixed $priority
	* @return CJTWordpressHookObserver
	*/
	public function __construct($name = null, $filter = null, $priority = self::PRIORITY) {
		// Initialize parent!
		parent::__construct($name, $filter);
		// Initialize vars!
		$this->priority = $priority;	
	}
	
	/**
	* put your comment there...
	* 
	* @param mixed $subject
	* @param mixed $callback
	* @return CJTObserver
	*/
	protected function init($subject, $callback, $param) {
		// Initialize parent!
		$return = parent::init($subject, $callback, $param);
		// Cache callback key!
		$this->key = self::getObserverKey($this->subject->getHookName(), $this->callback, $this->priority);
		return $return;
	}
	
	/**
	* put your comment there...
	* 
	* @param mixed $name
	* @param mixed $callback
	* @param mixed $priority
	*/
	public static function getObserverKey($name, $callback, $priority = self::PRIORITY) {
		return _wp_filter_build_unique_id($name, $callback, $priority);
	}
	
} // End class
```
