constants(); $this->hooks(); $this->includes(); } /** * Define plugin constants * * @since 1.1.0 */ function constants() { define( 'ACS_VERSION', '1.1.0' ); define( 'ACS_URL', trailingslashit( plugin_dir_url( __FILE__ ) ) ); define( 'ACS_INCLUDES_URL', trailingslashit( ACS_URL . 'includes' ) ); define( 'ACS_CSS_URL', trailingslashit( ACS_INCLUDES_URL . 'css' ) ); define( 'ACS_IMAGES_URL', trailingslashit( ACS_URL . 'images' ) ); define( 'ACS_ADMIN_IMAGES_URL', trailingslashit( ACS_IMAGES_URL . 'admin' ) ); define( 'ACS_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) ); define( 'ACS_INCLUDES_DIR', trailingslashit( ACS_DIR . 'includes' ) ); } /** * Load necessary functions * * @since 1.1.0 */ function hooks() { add_action( 'init', 'acs_register_shortcodes' ); add_action( 'add_meta_boxes', 'acs_add_custom_meta_box' ); add_action( 'wp_enqueue_scripts', 'acs_load_scripts' ); add_action( 'wp_dashboard_setup', 'acs_register_shortcode_dash_widget' ); add_action( 'admin_enqueue_scripts', 'acs_admin_css' ); add_filter( 'widget_text', 'do_shortcode' ); } /** * Load necessary plugin files * * @since 1.1.0 */ function includes() { require_once( ACS_INCLUDES_DIR . 'shortcodes.php' ); require_once( ACS_INCLUDES_DIR . 'functions.php' ); if( is_admin() ) require_once( ACS_INCLUDES_DIR . 'admin.php' ); } } new Arconix_Shortcodes; ?>