WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9155 closed defect (bug) (invalid)

wp-includes/update.php drunken looking add_action()s

Reported by: jidanni Owned by:
Milestone: Priority: lowest
Severity: trivial Version: 2.7
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

Odd looking code in wp-includes/update.php:

#files, and non existent too?!
add_action( 'load-plugins.php', 'wp_update_plugins' );
add_action( 'load-update.php', 'wp_update_plugins' );
#add_action(A,A); means what?
add_action( 'wp_update_plugins', 'wp_update_plugins' );
add_action( 'wp_update_themes', 'wp_update_themes' );

Change History (4)

comment:1 DD325 years ago

  • Milestone 2.8 deleted
  • Resolution set to invalid
  • Status changed from new to closed

WordPress hooks and filters may have any name.

WordPress has a hook that runs on every page, "load-(admin page name)"

The fact a hook exists with the same name as the function doesnt matter either, the same happens in a few other locations too.

In the latter, Its mearly, hook the function wp_update_plugins' to the 'wp_update_plugins' hook (Which is called by wp-cron amongst others)

comment:2 DD325 years ago

WordPress has a hook that runs on every page, "load-(admin page name)"

Correction:

WordPress has a hook that runs on every admin page, "load-(current admin page name)"

comment:3 jidanni5 years ago

Well OK but I would call hooks '...-hook' else there will be no end to confusion...

comment:4 jidanni5 years ago

  • Cc jidanni@… added
Note: See TracTickets for help on using tickets.