WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#13602 closed enhancement (duplicate)

register_activation_hook for themes too.

Reported by: 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)

comment:1 dd324 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.

comment:2 F J Kaiser4 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?

comment:3 scribu3 years ago

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