Skip to content

Commit

Permalink
Merge pull request #37 from newfold-labs/press-3-131-set-brand-properly
Browse files Browse the repository at this point in the history
get brand from container
  • Loading branch information
amartya-dev authored Jan 10, 2024
2 parents c083479 + 6506994 commit 91d6267
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ function () {
}

new HelpCenter( $container );

// Define the brand
if ( ! defined( 'NFD_HELPCENTER_PLUGIN_BRAND' ) ) {
define( 'NFD_HELPCENTER_PLUGIN_BRAND', $container->plugin()->brand );
}
},
'isActive' => true,
'isHidden' => true,
Expand Down
2 changes: 1 addition & 1 deletion includes/CapabilityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function get_capability() {
* @return \WP_REST_Response|\WP_Error
*/
public function get_brand() {
$brand = get_option( 'mm_brand', 'false' );
$brand = NFD_HELPCENTER_PLUGIN_BRAND;
if ( ! $brand ) {
return new \WP_Error(
'rest_not_found',
Expand Down

0 comments on commit 91d6267

Please sign in to comment.