Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#9155 closed defect (bug) (invalid)

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

Reported by: jidanni's profile 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)

#1 @DD32
16 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)

#2 @DD32
16 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)"

#3 @jidanni
16 years ago

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

#4 @jidanni
16 years ago

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