Skip to content

Commit

Permalink
rename the function to reduce redundant naming
Browse files Browse the repository at this point in the history
  • Loading branch information
arunshenoy99 committed Apr 28, 2023
1 parent 7b46fe9 commit 7b1e224
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions includes/RestApi/SiteClassificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ public function register_routes() {
$this->rest_base,
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'get_site_classification' ),
'callback' => array( $this, 'get' ),
'permission_callback' => array( Permissions::class, 'rest_is_authorized_admin' ),
)
);
}

/**
* Fetch the Site Classification data using the data module helper.
* Get site classification data.
*
* @return array
*/
public function get_site_classification() {
public function get() {
if ( ! class_exists( 'NewfoldLabs\WP\Module\Data\SiteClassification' ) ) {
return array();
}
Expand Down

0 comments on commit 7b1e224

Please sign in to comment.