Skip to content

Commit

Permalink
Merge pull request #186 from newfold-labs/enhance/PRESS2-686-pull-plu…
Browse files Browse the repository at this point in the history
…gin-url-from-container

Pull Plugin URL from container instead of the constant
  • Loading branch information
arunshenoy99 authored Mar 6, 2023
2 parents 77c5dcf + 36d63ed commit eaedd52
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@
* @return void
*/
function nfd_wp_module_onboarding_register() {
// wp-module-onboarding
// wp-module-onboarding
register(
array(
'name' => 'onboarding',
'label' => __('Onboarding', 'wp-module-onboarding' ),
'callback' => function ( Container $container ) {
'name' => 'onboarding',
'label' => __( 'Onboarding', 'wp-module-onboarding' ),
'callback' => function ( Container $container ) {

// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.1.2' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_DIR' ) && defined('NFD_ONBOARDING_VERSION') ) {
define( 'NFD_ONBOARDING_BUILD_DIR', __DIR__ . '/build/' . NFD_ONBOARDING_VERSION );
}
if ( ! defined( 'NFD_MODULE_DATA_EVENTS_API' ) ) {
define( 'NFD_MODULE_DATA_EVENTS_API', '/newfold-data/v1/events' );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_URL' && defined('NFD_ONBOARDING_VERSION') ) ) {
define( 'NFD_ONBOARDING_BUILD_URL', BLUEHOST_PLUGIN_URL . '/vendor/newfold-labs/wp-module-onboarding/build/' . NFD_ONBOARDING_VERSION );
}
// Instantiate Onboarding Module Application
// Set Global Constants
if ( ! defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_VERSION', '1.1.2' );
}
if ( ! defined( 'NFD_ONBOARDING_DIR' ) ) {
define( 'NFD_ONBOARDING_DIR', __DIR__ );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_DIR' ) && defined( 'NFD_ONBOARDING_VERSION' ) ) {
define( 'NFD_ONBOARDING_BUILD_DIR', __DIR__ . '/build/' . NFD_ONBOARDING_VERSION );
}
if ( ! defined( 'NFD_MODULE_DATA_EVENTS_API' ) ) {
define( 'NFD_MODULE_DATA_EVENTS_API', '/newfold-data/v1/events' );
}
if ( ! defined( 'NFD_ONBOARDING_BUILD_URL' && defined( 'NFD_ONBOARDING_VERSION' ) ) ) {
define( 'NFD_ONBOARDING_BUILD_URL', $container->plugin()->url . '/vendor/newfold-labs/wp-module-onboarding/build/' . NFD_ONBOARDING_VERSION );
}
// Instantiate Onboarding Module Application
new Application( $container );
},
'isActive' => true,
'isHidden' => true,

'isActive' => true,
'isHidden' => true,
)
);
}
Expand Down

0 comments on commit eaedd52

Please sign in to comment.