public function reset_capabilities()
 {
     self::$CAPABILITIES = NULL;
     foreach (self::$OTHER_CAPABILITIES as $key => $value) {
         self::$OTHER_CAPABILITIES[$key] = array();
     }
 }
 * Author URI: http://wpfront.com
 * License: GPL v3 
 * Text Domain: wpfront-user-role-editor
 */
/*
 WPFront User Role Editor Plugin
 Copyright (C) 2014, WPFront.com
 Website: wpfront.com
 Contact: syam@wpfront.com

 WPFront User Role Editor Plugin is distributed under the GNU General Public License, Version 3,
 June 2007. Copyright (C) 2007 Free Software Foundation, Inc., 51 Franklin
 St, Fifth Floor, Boston, MA 02110, USA

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
if (!defined('ABSPATH')) {
    exit;
}
require_once plugin_dir_path(__FILE__) . "classes/class-wpfront-user-role-editor.php";
WPFront_User_Role_Editor::Instanciate(__FILE__);
 /**
  * Calls the API and, if successfull, returns the object delivered by the API.
  *
  * @uses get_bloginfo()
  * @uses wp_remote_post()
  * @uses is_wp_error()
  *
  * @param string  $_action The requested action.
  * @param array   $_data   Parameters for the API action.
  * @return false||object
  */
 protected function api_request($_action, $_data)
 {
     global $wp_version;
     $data = array_merge($this->api_data, $_data);
     if ($data['slug'] != $this->slug) {
         return;
     }
     if (empty($data['license'])) {
         return;
     }
     if ($this->api_url == home_url()) {
         return false;
         // Don't allow a plugin to ping itself
     }
     $api_params = array('edd_action' => 'get_version', 'license' => $data['license'], 'item_name' => isset($data['item_name']) ? $data['item_name'] : false, 'item_id' => isset($data['item_id']) ? $data['item_id'] : false, 'slug' => $this->slug, 'author' => $data['author'], 'url' => home_url());
     $api_params['plugin_version'] = $this->version;
     foreach ($api_params as $key => $value) {
         $api_params[$key] = urlencode($value);
     }
     $request = WPFront_User_Role_Editor::wp_remote_get(add_query_arg($api_params, $this->api_url), array('timeout' => 15, 'sslverify' => false, 'body' => $api_params));
     if (!is_wp_error($request)) {
         $request = json_decode(wp_remote_retrieve_body($request));
     }
     if ($request && isset($request->sections)) {
         $request->sections = maybe_unserialize($request->sections);
     } else {
         $request = false;
     }
     return $request;
 }
 private function remote_get($action, $license)
 {
     if ($this->product === NULL) {
         return NULL;
     }
     $api_params = array('edd_action' => $action, 'license' => urlencode($license), 'item_name' => urlencode($this->product), 'url' => urlencode(home_url()), 'plugin_version' => WPFront_User_Role_Editor::VERSION);
     $response = WPFront_User_Role_Editor::wp_remote_get(add_query_arg($api_params, self::$store_url));
     if (is_wp_error($response)) {
         $this->error = $this->__('ERROR') . ': ' . $this->__('Unable to contact wpfront.com') . '<br />' . $this->__('Details') . ': ' . $response->get_error_message();
         return NULL;
     }
     $result = json_decode(wp_remote_retrieve_body($response));
     if (!is_object($result)) {
         $this->error = $this->__('ERROR') . ': ' . $this->__('Unable to parse response');
         return NULL;
     }
     return $result;
 }
 public function action_links($links, $file)
 {
     if ($this->objGoPro->has_license()) {
         return parent::action_links($links, $file);
     }
     return $links;
 }