Skip to content

Commit

Permalink
Remove $populate_capabilities changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wpscholar committed Oct 28, 2024
1 parent eb09f4e commit 4f8dbcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions includes/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,11 @@ public static function runtime() {
/**
* Establish the brand to apply to the Onboarding experience.
*
* @param bool $populate_capabilities Optional. Determines whether capabilities should be populated
* for the selected brand. Defaults to true.
*
* @return array The configuration array of the current brand. If the specified brand is not found,
* returns the default brand configuration.
*/
public static function current_brand( $populate_capabilities = true ) {
$brands = Brands::get_brands( $populate_capabilities );
public static function current_brand() {
$brands = Brands::get_brands();

return array_key_exists( NFD_ONBOARDING_PLUGIN_BRAND, $brands ) ?
$brands[ NFD_ONBOARDING_PLUGIN_BRAND ] :
Expand Down
7 changes: 2 additions & 5 deletions includes/Flows/Flows.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,13 @@ public static function get_default_flow() {
/**
* Retrieve all the known onboarding flows.
*
* @param bool $populate_capabilities Optional. Determines whether capabilities should be populated
* for the current brand. Defaults to true.
*
* @return array Associative array of onboarding flows. A value of true for each key indicates that the
* flow has been approved. A value of null indicates the flow has not been approved or has
* been temporarily disabled. If no enabled flows are found, default flows are provided with
* a value of false.
*/
public static function get_flows( $populate_capabilities = true ) {
$current_brand = Data::current_brand( $populate_capabilities );
public static function get_flows() {
$current_brand = Data::current_brand();
return isset( $current_brand['config']['enabled_flows'] )
? $current_brand['config']['enabled_flows'] : array(
'wp-setup' => false,
Expand Down

0 comments on commit 4f8dbcc

Please sign in to comment.