Skip to content

Commit

Permalink
disable rest api via constant
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasplevy committed Aug 15, 2019
1 parent 0feaeed commit f3e9ae4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lifterlms-rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
*
* @package LifterLMS_REST_API/Main
*
* @since 1.0.0
* @version 1.0.0
* @since 1.0.0-beta.1
* @version 1.0.0-beta.1
*
* Plugin Name: LifterLMS REST API
* Plugin URI: https://lifterlms.com/
* Description: REST API feature plugin for the LifterLMS Core.
* Version: 1.0.0-beta.1
* Version: 1.0.0-beta.1-beta.1
* Author: LifterLMS
* Author URI: https://lifterlms.com/
* Text Domain: lifterlms
Expand All @@ -22,6 +22,11 @@

defined( 'ABSPATH' ) || exit;

// Don't load the REST API.
if ( defined( 'LLMS_REST_DISABLE' ) && LLMS_REST_DISABLE ) {
return;
}

// @todo handle this better.
if ( version_compare( phpversion(), '7.1', '<' ) ) {
return;
Expand Down Expand Up @@ -53,7 +58,7 @@
/**
* Main Plugin Instance
*
* @since 1.0.0
* @since 1.0.0-beta.1
*
* @return LLMS_REST_API
*/
Expand Down

0 comments on commit f3e9ae4

Please sign in to comment.