constants(); $this->hooks(); } /** * Define the constants * * @since 0.5 */ function constants() { define( 'ACFS_VERSION', '0.5'); define( 'ACFS_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); define( 'ACFS_INCLUDES_URL', trailingslashit( ACFS_URL . 'includes' ) ); define( 'ACFS_IMAGES_URL', trailingslashit( ACFS_URL . 'images' ) ); define( 'ACFS_JS_URL', trailingslashit( ACFS_INCLUDES_URL . 'js' ) ); define( 'ACFS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'ACFS_INCLUDES_DIR', trailingslashit( ACFS_DIR . 'includes' ) ); } /** * Run the necessary functions and pull in the necessary supporting files * * @since 0.5 */ function hooks() { add_action( 'wp_enqueue_scripts', 'load_scripts' ); add_action( 'init', 'register_shortcodes' ); add_action( 'widgets_init', 'create_widget' ); add_action( 'wp_dashboard_setup', 'register_dashboard_widget' ); add_action( 'wp_footer', 'print_scripts' ); require_once( ACFS_INCLUDES_DIR . 'functions.php' ); require_once( ACFS_INCLUDES_DIR . 'widget.php' ); if( is_admin() ) require_once( ACFS_INCLUDES_DIR . 'admin.php' ); } } new Arconix_FlexSlider; ?>