Making WordPress.org

Opened 11 years ago

Closed 11 years ago

#1177 closed defect (bug) (fixed)

Switching to wporg-developer theme causes PHP warning

Reported by: DJPaul Owned by: coffee2code
Priority: normal Milestone:
Component: Developer Hub Keywords: has-patch
Cc:

Description

When switching *to* the wporg-developer theme, a PHP warning occurs:

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'DevHub\add_roles' not found or invalid function name in /srv/www/wordpress-develop/src/wp-includes/plugin.php on line

Patch attached which corrects the path to the function of that same name (I'm assuming that's what the original author intended, to set up the new role when the theme is activated).

Attachments (1)

1177.01.patch​ (557 bytes ) - added by DJPaul 11 years ago.

Download all attachments as: .zip

Change History (2)

#1 @coffee2code
11 years ago

  • Owner set to coffee2code
  • Resolution → fixed
  • Status new → closed

In 1821:

developer.wordpress.org: Handbook-related hooking changes that should have been included in r953.

  • Move hooking of 'after_switch_theme' from functions.php to inc/handbooks.php. Fixes warning since the hooked function was previously moved over.
  • Remove hooking 'wporg_action_links' in functions.php since that had already been moved over.

Props DJPaul.
Fixes #1177.

Note: See TracTickets for help on using tickets.