_className = 'redactorView'; //sets all of the plugin urls so it can reach out to other places $this->_createURLs( $file ); //sets the plugin version for backwards compat checks $this->_version = $version; } /** * Helper function on whether SCRIPT_DEBUG is set * * Returns whether or not SCRIPT_DEBUG is set or not * * @static * @since 0.0.1 * @return boolean */ static function is_script_debug(){ return defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG; } /** * Helper function on whether WP_DEBUG is set * * Returns whether or not WP_DEBUG is set. * * @static * @since 0.0.1 * @return boolean */ static function is_wordpress_debug(){ return defined( 'WP_DEBUG' ) && WP_DEBUG; } /** * Create and initializes paths for the plugin * * Stores all of the paths that the plugin will use to access the world * * @access private * @since 0.0.1 * @return void */ private function _createURLs( $file ) { $this->_file = $file; $this->_dir = dirname($file); $this->_assets_dir = trailingslashit( $this->_dir ); $this->_assets_url = esc_url( trailingslashit( plugins_url( '', $this->_file ) ) ); $this->_languages_dir = trailingslashit( $this->_dir ) . 'languages'; } /** * Not allowed * * The plugin is a singleton so don't allow cloning. * * @access private * @since 0.0.1 * @return void */ final private function __clone() {} /** * Wraps the redacted string in to a that formats it correctly for displaying * to the user. * @param string $style * @param string $who * @param string $when * @param string $str * @return string */ public function redactStringToHTML($style, $who, $when, $str){ return sprintf("%s", $style, $who, $when, $str); } }