activate(); } /** * The code that runs during plugin deactivation. * This action is documented in includes/class-bnd-flex-order-delivery-deactivator.php */ function deactivate_bnd_flex_order_delivery() { require_once plugin_dir_path( __FILE__ ) . 'includes/class-bnd-flex-order-delivery-deactivator.php'; Bnd_Flex_Order_Delivery_Deactivator::deactivate(); } register_activation_hook( __FILE__, 'activate_bnd_flex_order_delivery' ); register_deactivation_hook( __FILE__, 'deactivate_bnd_flex_order_delivery' ); register_theme_directory( dirname( __FILE__ ) . '/themes' ); function buynowdepot_get_theme_url() { return BUYNOWDEPOT_PLUGIN_URL."templates/flexmenu"; } /** * Get an option * * Looks to see if the specified setting exists, returns default if not * * @since 1.0 * @global Array of all the plugin Options * @return mixed */ function buynowdepot_get_option( $key = '', $default = false ) { $bnd_options = (array)get_option( 'bnd_settings' ); $value = ! empty( $bnd_options[ $key ] ) ? $bnd_options[ $key ] : $default; return $value; } function buynowdepot_get_message($code, $params=null) { return Bnd_Flex_Order_Delivery_Container::instance()->get_message($code, $params); } /** * Begins execution of the plugin. * * Since everything within the plugin is registered via hooks, * then kicking off the plugin from this point in the file does * not affect the page life cycle. * * @since 1.0.0 */ function run_bnd_flex_order_delivery() { $plugin = new Bnd_Flex_Order_Delivery(); $plugin->run(); } run_bnd_flex_order_delivery();