Plugin Directory

Changeset 704695


Ignore:
Timestamp:
04/27/2013 02:15:01 PM (13 years ago)
Author:
Jesper800
Message:

Releasing version 0.4.1

Location:
developer-mode/tags/0.4.1
Files:
3 deleted
12 copied

Legend:

Unmodified
Added
Removed
  • developer-mode/tags/0.4.1/developer-mode.php

    r688320 r704695  
    33Plugin Name: Developer Mode
    44Description: Limit access to the WordPress admin panel for your clients. Block functionality like updating plugins and viewing menu items for administrators, while keeping all these options for the developer users. The developer mode plugin automatically adds a developer user role, allowing you to keep in control of the entire system while making sure your clients can only use what they need.
    5 Version: 0.4
     5Version: 0.4.1
    66Author: Jesper van Engelen
    77Author URI: http://www.jepps.nl
     
    1010
    1111// Plugin information
    12 define('JWDM_VERSION', '0.4');
     12define('JWDM_VERSION', '0.4.1');
    1313
    1414// Paths
  • developer-mode/tags/0.4.1/lib/functions.php

    r649573 r704695  
    11<?php
     2/**
     3 * Handle plugin updates
     4 */
     5function jwdm_handle_update()
     6{
     7    $db_version = get_option('jwdm_version');
     8   
     9    if (!$db_version || version_compare($db_version, '0.4.1') < 0) {
     10        $role = get_role('developer');
     11        $role->add_cap('administrator', true);
     12       
     13        $developerusers_query = new WP_User_Query(array('role' => 'developer'));
     14       
     15        foreach ($developerusers_query->results as $index => $user) {
     16            clean_user_cache($user);
     17        }
     18    }
     19   
     20    if ($db_version != JWDM_VERSION) {
     21        update_option('jwdm_version', JWDM_VERSION);
     22    }
     23}
     24
     25// Actions
     26add_action('init', 'jwdm_handle_update');
     27
    228if (!function_exists('jwdm_maybe_disable_adminbar_frontend')) {
    329    /**
  • developer-mode/tags/0.4.1/lib/roles.php

    r672668 r704695  
    4949            $role_developer->add_cap('developer_updates', true);
    5050            $role_developer->add_cap('view_developer_content', true);
     51            $role_developer->add_cap('administrator', true);
    5152        }
    5253        else if (JWDM_Helper_Roles::role_exists('administrator')) {
    5354            $role_admin = get_role('administrator');
    5455            $role_developer = get_role('developer');
    55            
    56             $newcaps = array();
    5756           
    5857            foreach ($role_admin->capabilities as $index => $cap) {
  • developer-mode/tags/0.4.1/readme.txt

    r688320 r704695  
    77Requires at least: 3.1
    88Tested up to: 3.5.1
    9 Stable tag: 0.4
     9Stable tag: 0.4.1
    1010
    1111Limit access to the WordPress admin panel for your clients. Block functionality like updating plugins and viewing menu items for administrators, while keeping all these options for the developer users. The developer mode plugin automatically adds a developer user role, allowing you to keep in control of the entire system while making sure your clients can only use what they need.
     
    5555== Changelog ==
    5656
     57= 0.4.1 =
     58
     59* Added the administrator capability to the developer on install and on update to ensure that plugins with out-dated capability handling will not break with the Developer Mode plugin
     60
    5761= 0.4 =
    5862
Note: See TracChangeset for help on using the changeset viewer.