Ticket #4292 (closed defect (bug): fixed)

Opened 5 years ago

Last modified 5 years ago

wp_widgets_add_menu() checks for edit_themes instead of switch_themes

Reported by: Denis-de-Bernardy Owned by: rob1n
Priority: normal Milestone: 2.2.1
Component: Administration Version: 2.2
Severity: trivial Keywords:
Cc:

Description


Change History

IMO it should be edit_themes. Technically you're editing the theme, not switching the theme. Or am I missing something else?

Ah.

  • Owner changed from anonymous to rob1n
  • Status changed from new to assigned
  • Status changed from assigned to closed
  • Resolution set to fixed

(In [5492]) Check for switch_themes, not edit_themes. Props Denis de Bernardy. fixes #4292

  • Status changed from closed to reopened
  • Resolution fixed deleted

you've missed the first few lines of wp-admin/widgets.php

should be:

if ( ! current_user_can('switch_themes') )
	wp_die( __( 'Cheatin’ uh?' ));
  • Status changed from reopened to closed
  • Resolution set to fixed

(In [5496]) Doh. fixes #4292

Note: See TracTickets for help on using tickets.