Making WordPress.org

Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#7780 closed enhancement (reported-upstream)

Documentation Update: Missing one important param

Reported by: pyrobd's profile pyrobd Owned by:
Milestone: Priority: normal
Component: Developer Hub Keywords:
Cc:

Description

I am not sure if this is the right place, https://developer.wordpress.org/reference/functions/register_activation_hook/
Here in the call back function we have a parameter $network_wide, it should be mentioned in the param options.

Change History (3)

#1 @dd32
5 months ago

  • Component changed from General to Developer Hub
  • Resolution set to reported-upstream
  • Status changed from new to closed

Hi @pyrobd and welcome to Meta Trac!

Meta.trac is for reporting bugs on WordPress.org, and is not intended to be used for documentation updates.

However, I'll forward this report onto the appropriate teams for action.

The parameters listed on the linked page are specifically for the register_activation_hook function, which only has 2 parameters.

However, as you note, when the callback passed as a parameter is called, it does have an additional $network_wide parameter passed. That parameter is documented where the callback is triggered from, the activate_{$plugin} hook.

A note on the documentation: The majority of the docs are extracted directly from the PHPDoc block for the function, and as such, updates to those sections of the code should be made via https://core.trac.wordpress.org/ as it's a change to the WordPress code itself.

The More Information section is however freeform text that any Docs team contributors can edit, and as such, I've edited it to make the link to the above action far more clear than it currently was, by adding this at the top:

For more information on what will be passed to your $callback, please see the activate_{$plugin} hook.

I'm marking this as reported upstream as I'll mention it to the Docs team on Slack, although the above text change may have 'fixed' it.

This ticket was mentioned in Slack in #docs by dd32. View the logs.


5 months ago

#3 @milana_cap
5 months ago

Thank you, @pyrobd, for reporting this, and thank you, @dd32, for fixing and informing the Docs team.

Yes, I would consider the issue to be fixed.

Note: See TracTickets for help on using tickets.