Plugin Directory

Changeset 737396


Ignore:
Timestamp:
07/07/2013 03:45:21 PM (13 years ago)
Author:
Jesper800
Message:

Releasing version 0.4.1.3

Location:
developer-mode/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • developer-mode/trunk/developer-mode.php

    r735377 r737396  
    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.1.1
     5Version: 0.4.1.3
    66Author: Jesper van Engelen
    77Author URI: http://www.jepps.nl
     
    1010
    1111// Plugin information
    12 define('JWDM_VERSION', '0.4.1.1');
     12define('JWDM_VERSION', '0.4.1.3');
    1313
    1414// Paths
  • developer-mode/trunk/lib/admin.php

    r688320 r737396  
    121121        $options = get_option('jwdm_options');
    122122       
    123         if ($options['prevent_developeruser_edit'] && isset($roles['developer'])) {
     123        if ( !empty( $options['prevent_developeruser_edit'] ) && isset( $roles['developer'] ) ) {
    124124            $user = wp_get_current_user();
    125125           
     
    142142        $options = get_option('jwdm_options');
    143143       
    144         if (!$options['prevent_developeruser_edit']) {
     144        if ( empty( $options['prevent_developeruser_edit'] ) ) {
    145145            return $allcaps;
    146146        }
     
    154154       
    155155        // Make sure the requested capability and the user ID are set
    156         if (!$args[0] || !in_array($args[0], array('edit_user', 'delete_user')) || !$args[1] || !$args[2]) {
     156        if ( empty( $args[0] ) || !in_array($args[0], array('edit_user', 'delete_user')) || empty( $args[1] ) || empty( $args[2] ) ) {
    157157            return $allcaps;
    158158        }
  • developer-mode/trunk/lib/adminmenupage/options.php

    r688320 r737396  
    6767        $options = get_option('jwdm_options');
    6868    ?>
    69         <input type="checkbox" name="jwdm_options[prevent_developeruser_edit]" value="1" <?php checked($options['prevent_developeruser_edit']); ?> />
     69        <input type="checkbox" name="jwdm_options[prevent_developeruser_edit]" value="1" <?php checked( !empty( $options['prevent_developeruser_edit'] ) ); ?> />
    7070        <span class="description">
    7171            <?php _e('By checking this box, you can prevent anyone that does not have the developer role from creating, editing or deleting users with the developer role.', 'developermode'); ?>
     
    8383        $options = get_option('jwdm_options');
    8484    ?>
    85         <input type="checkbox" name="jwdm_options[disable_core_update]" value="1" <?php checked($options['disable_core_update']); ?> />
     85        <input type="checkbox" name="jwdm_options[disable_core_update]" value="1" <?php checked( !empty( $options['disable_core_update'] ) ); ?> />
    8686    <?php
    8787    }
     
    9494        $options = get_option('jwdm_options');
    9595    ?>
    96         <input type="checkbox" name="jwdm_options[disable_plugin_update]" value="1" <?php checked($options['disable_plugin_update']); ?> />
     96        <input type="checkbox" name="jwdm_options[disable_plugin_update]" value="1" <?php checked( !empty( $options['disable_plugin_update'] ) ); ?> />
    9797    <?php
    9898    }
     
    105105        $options = get_option('jwdm_options');
    106106    ?>
    107         <input type="checkbox" name="jwdm_options[disable_theme_update]" value="1" <?php checked($options['disable_theme_update']); ?> />
     107        <input type="checkbox" name="jwdm_options[disable_theme_update]" value="1" <?php checked( !empty( $options['disable_theme_update'] ) ); ?> />
    108108    <?php
    109109    }
     
    116116        $options = get_option('jwdm_options');
    117117    ?>
    118         <input type="checkbox" name="jwdm_options[disable_adminbar_frontend]" value="1" <?php checked($options['disable_adminbar_frontend']); ?> />
     118        <input type="checkbox" name="jwdm_options[disable_adminbar_frontend]" value="1" <?php checked( !empty( $options['disable_adminbar_frontend'] ) ); ?> />
    119119    <?php
    120120    }
  • developer-mode/trunk/lib/functions.php

    r704696 r737396  
    3434        $options = get_option('jwdm_options');
    3535       
    36         if (!current_user_can('view_developer_content') && $options['disable_adminbar_frontend']) {
     36        if ( !current_user_can( 'view_developer_content' ) && !empty( $options['disable_adminbar_frontend'] ) ) {
    3737            show_admin_bar(false);
    3838        }
  • developer-mode/trunk/lib/roles.php

    r735377 r737396  
    7272    public function filter_user_has_cap($capabilities, $cap, $name)
    7373    {
    74         $options['general'] = get_option('jwdm_options');
    75        
    7674        if ( empty( $capabilities['developer_updates'] ) ) {
     75            if ( !empty( $capabilities['update_core'] ) || !empty( $capabilities['update_plugins'] ) || !empty( $capabilities['update_themes'] ) ) {
     76                $options['general'] = get_option('jwdm_options');
     77            }
     78           
    7779            if ( !empty( $options['general']['disable_core_update'] ) && !empty( $capabilities['update_core'] ) ) {
    7880                $capabilities['update_core'] = false;
  • developer-mode/trunk/readme.txt

    r735377 r737396  
    77Requires at least: 3.1
    88Tested up to: 3.5.1
    9 Stable tag: 0.4.1.1
     9Stable tag: 0.4.1.3
    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.3 =
     58
     59* Minor bug fixes
     60
     61= 0.4.1.2 =
     62
     63* Minor bug fixes
     64
    5765= 0.4.1.1 =
    5866
Note: See TracChangeset for help on using the changeset viewer.