[wp-trac] [WordPress Trac] #18563: Disallowing editing of .php plugin files blocks access to allowable extensions
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 1 04:12:30 UTC 2011
#18563: Disallowing editing of .php plugin files blocks access to allowable
extensions
----------------------------+-----------------------------
Reporter: trepmal | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: 2.8
Severity: minor | Keywords:
----------------------------+-----------------------------
By using the editable_extensions filter, a user can disallow the editing
of php files (more accurately: files with a php extension...)
{{{
add_filter( 'editable_extensions', 'disallow_php_file_editing' );
function disallow_php_file_editing( $editable_extensions ) {
unset( $editable_extensions[0] );
return $editable_extensions;
}
}}}
However, the file selected when first clicking on the Editor link in the
menu is always a php file, so the user is given the "Files of this type
are not editable" wp_die() message without being presented with a chance
to select a file with a different/allowable extension.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18563>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list