WordPress.org

Make WordPress Core

Changeset 14088


Ignore:
Timestamp:
04/14/10 17:22:11 (4 years ago)
Author:
ryan
Message:

Introduce DISALLOW_FILE_MOD for disabling all ops that modify core, theme, or plugins files. see #13000

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/capabilities.php

    r13956 r14088  
    994994        } 
    995995        // Fall through if not DISALLOW_FILE_EDIT. 
    996     case 'unfiltered_html': 
    997996    case 'update_plugins': 
    998997    case 'delete_plugins': 
     
    10021001    case 'install_themes': 
    10031002    case 'update_core': 
     1003        // Disallow anything that creates, deletes, or edits core, plugin, or theme files. 
     1004        // Files in uploads are excepted. 
     1005        if ( defined('DISALLOW_FILE_MODS') && DISALLOW_FILE_MODS ) { 
     1006            $caps[] = 'do_not_allow'; 
     1007            break; 
     1008        } 
     1009        // Fall through if not DISALLOW_FILE_MODS. 
     1010    case 'unfiltered_html': 
    10041011    case 'delete_user': 
    10051012    case 'delete_users': 
Note: See TracChangeset for help on using the changeset viewer.