constants(); $this->hooks(); } /** * Define the constants * * @since 0.5 */ function constants() { define( 'ACFS_VERSION', '0.5.3'); 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() { /* Set up a prefix to minimize conflicts */ $prefix = 'acfs_'; add_action( 'wp_enqueue_scripts', $prefix . 'load_scripts' ); add_action( 'init', $prefix . 'register_shortcodes' ); add_action( 'widgets_init', $prefix . 'create_widget' ); add_action( 'wp_dashboard_setup', $prefix . 'register_dashboard_widget' ); add_action( 'wp_footer', $prefix . '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; ?>