WordPress.org

Making WordPress.org

Opened 4 years ago

Closed 4 years ago

#1177 closed defect (fixed)

Switching to wporg-developer theme causes PHP warning

Reported by: DJPaul Owned by: coffee2code
Milestone: Priority: normal
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 4 years ago.

Download all attachments as: .zip

Change History (2)

@DJPaul
4 years ago

#1 @coffee2code
4 years ago

  • Owner set to coffee2code
  • Resolution set to fixed
  • Status changed from new to 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.