| 1 | <?php
|
|---|
| 2 | /*
|
|---|
| 3 | Plugin Name: Fixes the Appearance Menu problem in version 3.0.1
|
|---|
| 4 | Description: Adds the role edit_theme_options to the administrator user role.
|
|---|
| 5 | Author: Tim Moore
|
|---|
| 6 | Version: 1.0
|
|---|
| 7 | Author URI: http://dreaminginbetween.com/
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | /*
|
|---|
| 11 | This program is free software; you can redistribute it and/or modify
|
|---|
| 12 | it under the terms of the GNU General Public License (v2) as published
|
|---|
| 13 | by the Free Software Foundation.
|
|---|
| 14 |
|
|---|
| 15 | This program is distributed in the hope that it will be useful,
|
|---|
| 16 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 18 | GNU General Public License for more details.
|
|---|
| 19 |
|
|---|
| 20 | You should have received a copy of the GNU General Public License
|
|---|
| 21 | along with this program; if not, write to the Free Software
|
|---|
| 22 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|---|
| 23 | */
|
|---|
| 24 |
|
|---|
| 25 | function wcs_fix_appearance_menu() {
|
|---|
| 26 | get_role( 'administrator' );
|
|---|
| 27 | global $wp_roles;
|
|---|
| 28 | $wp_roles->role_objects['administrator']->add_cap( 'edit_theme_options' );
|
|---|
| 29 | }
|
|---|
| 30 |
|
|---|
| 31 | add_action( 'admin_init', 'wcs_fix_appearance_menu', 9999 );
|
|---|
| 32 | ?>
|
|---|