ctfw-widgets.php
public static function init() {

		// bail if the CTFW_Widget class is loaded elsewhere
		if( class_exists( 'CTFW_Widget' ) ){
			return;
		}

		$pluginDir = untrailingslashit( plugin_dir_path( __FILE__ ) );
		$pluginURL = untrailingslashit( plugin_dir_url( __FILE__ ) );

		define( 'CTFW_WIDGETS_INC_DIR', $pluginDir . '/includes' );
		define( 'CTFW_WIDGETS_CLASS_DIR', CTFW_WIDGETS_INC_DIR . '/classes' );
		define( 'CTFW_WIDGETS_ADMIN_DIR', CTFW_WIDGETS_INC_DIR . '/admin' );
		define( 'CTFW_WIDGETS_WIDGET_TEMPLATE_DIR', CTFW_WIDGETS_INC_DIR . '/widget-templates' );
		define( 'CTFW_WIDGETS_JS_DIR', CTFW_WIDGETS_INC_DIR . '/js' );
		define( 'CTFW_WIDGETS_CSS_DIR', CTFW_WIDGETS_INC_DIR . '/css' );
		define( 'CTFW_WIDGETS_DIR_URL', $pluginURL );
		define( 'CTFW_WIDGETS_JS_DIR_URL', $pluginURL . '/js' );
		define( 'CTFW_WIDGETS_CSS_DIR_URL', $pluginURL . '/css' );
		define( 'CTFW_WIDGETS_VERSION', 1.0 );

        add_action( 'plugins_loaded', array( __CLASS__, 'setup') );

    }
public static function init() {

		// bail if the CTFW_Widget class is loaded elsewhere
		if( class_exists( 'CTFW_Widget' ) ){
			return;
		}

		$pluginDir = untrailingslashit( plugin_dir_path( __FILE__ ) );
		$pluginURL = untrailingslashit( plugin_dir_url( __FILE__ ) );

		define( 'CTFW_WIDGETS_INC_DIR', $pluginDir . '/includes' );
		define( 'CTFW_WIDGETS_CLASS_DIR', CTFW_WIDGETS_INC_DIR . '/classes' );
		define( 'CTFW_WIDGETS_ADMIN_DIR', CTFW_WIDGETS_INC_DIR . '/admin' );
		define( 'CTFW_WIDGETS_WIDGET_TEMPLATE_DIR', CTFW_WIDGETS_INC_DIR . '/widget-templates' );
		define( 'CTFW_WIDGETS_JS_DIR', CTFW_WIDGETS_INC_DIR . '/js' );
		define( 'CTFW_WIDGETS_CSS_DIR', CTFW_WIDGETS_INC_DIR . '/css' );
		define( 'CTFW_WIDGETS_DIR_URL', $pluginURL );
		define( 'CTFW_WIDGETS_JS_DIR_URL', $pluginURL . '/js' );
		define( 'CTFW_WIDGETS_CSS_DIR_URL', $pluginURL . '/css' );
		define( 'CTFW_WIDGETS_VERSION', 1.0 );

        add_action( 'plugins_loaded', array( __CLASS__, 'setup') );

    }
public static function init ( ) { // bail if the CTFW_Widget class is loaded elsewhere if ( class_exists ( 'CTFW_Widget' ) ) { return ; } $ pluginDir = untrailingslashit ( plugin_dir_path ( __FILE__ ) ) ; $ pluginURL = untrailingslashit ( plugin_dir_url ( __FILE__ ) ) ; define ( 'CTFW_WIDGETS_INC_DIR' , $ pluginDir . '/includes' ) ; define ( 'CTFW_WIDGETS_CLASS_DIR' , CTFW_WIDGETS_INC_DIR . '/classes' ) ; define ( 'CTFW_WIDGETS_ADMIN_DIR' , CTFW_WIDGETS_INC_DIR . '/admin' ) ; define ( 'CTFW_WIDGETS_WIDGET_TEMPLATE_DIR' , CTFW_WIDGETS_INC_DIR . '/widget-templates' ) ; define ( 'CTFW_WIDGETS_JS_DIR' , CTFW_WIDGETS_INC_DIR . '/js' ) ; define ( 'CTFW_WIDGETS_CSS_DIR' , CTFW_WIDGETS_INC_DIR . '/css' ) ; define ( 'CTFW_WIDGETS_DIR_URL' , $ pluginURL ) ; define ( 'CTFW_WIDGETS_JS_DIR_URL' , $ pluginURL . '/js' ) ; define ( 'CTFW_WIDGETS_CSS_DIR_URL' , $ pluginURL . '/css' ) ; define ( 'CTFW_WIDGETS_VERSION' , 1.0 ) ; add_action ( 'plugins_loaded' , array ( __CLASS__ , 'setup' ) ) ; }
define plugin directory
define plugin directory