Skip to content

Commit

Permalink
Remove unnecessary $service->can_register() check.
Browse files Browse the repository at this point in the history
Complete TODO: Classifai/Services/ServicesManager.php: remove this requirement (see: can_register).
ref: #260 (comment)
  • Loading branch information
rahulsprajapati committed Dec 9, 2021
1 parent c48e9ae commit 1117e23
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
4 changes: 1 addition & 3 deletions includes/Classifai/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ public function init_services() {
];

foreach ( $this->services as $service ) {
if ( $service->can_register() ) {
$service->register();
}
$service->register();
}
}

Expand Down
10 changes: 0 additions & 10 deletions includes/Classifai/Services/ServicesManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@ public function __construct( $services = [] ) {
$this->get_menu_title();
}

/**
* The admin_support items require this method.
*
* @todo remove this requirement.
* @return bool
*/
public function can_register() {
return true;
}

/**
* Register the actions required for the settings page.
*/
Expand Down

0 comments on commit 1117e23

Please sign in to comment.