Make WordPress Core

Opened 13 years ago

Closed 12 years ago

#13602 closed enhancement (duplicate)

register_activation_hook for themes too.

Reported by: f-j-kaiser's profile F J Kaiser Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: Cc:

Description

After getting around the settings API i found out, that it's meant for plugins, but useable for themes too. The only thing, that doesn't work is register_acitvation_hook, because of the use of the plugin_basename()-function. You can find both functions in /wp-includes/plugin.php line 490 and line 547 to take a look.

Benefits for themes would be a) a much clearer structure possible in admin-option-page files and b) you could opt in default-options or check for different stuff if it's there.

Change History (3)

#1 @dd32
13 years ago

  • Milestone changed from 3.1 to Future Release

No patch & hasnt been decided as a 3.1 feature, Moving to Future Release pending.

#2 @F J Kaiser
13 years ago

  • Cc 24-7@… added

On the one hand it's an easy patch: deleting two single strings. But i think this should be discussed first:

  • is it necassary to make a second function for themes? and
  • how many plugins would break if the basename would be missing?

#3 @scribu
12 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.