Opened 11 years ago
Last modified 6 weeks ago
#28855 assigned defect (bug)
Commented add_actions and unused functions in wp-admin/includes/theme-install.php
Reported by: | michalzuber | Owned by: | chriscct7 |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Themes | Keywords: | needs-refresh has-patch dev-feedback |
Focuses: | administration | Cc: |
Description
Only install_themes_upload()
is used inwp-admin/theme-install.php:134
mike@mike:~/Sites/wordpress-svn$ grep -r '// add_action' src/ src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_dashboard', 'install_themes_dashboard'); src/wp-admin/includes/theme-install.php:147:// add_action('install_themes_upload', 'install_themes_upload', 10, 0); src/wp-admin/includes/theme-install.php:179:// add_action('install_themes_search', 'display_themes'); src/wp-admin/includes/theme-install.php:180:// add_action('install_themes_featured', 'display_themes'); src/wp-admin/includes/theme-install.php:181:// add_action('install_themes_new', 'display_themes'); src/wp-admin/includes/theme-install.php:182:// add_action('install_themes_updated', 'display_themes'); mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_dashboard src src/wp-admin/includes/theme-install.php:96:function install_themes_dashboard() { src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_dashboard', 'install_themes_dashboard'); mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_upload src src/wp-admin/includes/theme-install.php:137:function install_themes_upload() { src/wp-admin/includes/theme-install.php:147:// add_action('install_themes_upload', 'install_themes_upload', 10, 0); src/wp-admin/theme-install.php:134: <?php install_themes_upload(); ?> mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_search src src/wp-admin/includes/theme-install.php:179:// add_action('install_themes_search', 'display_themes'); mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_featured src src/wp-admin/includes/theme-install.php:180:// add_action('install_themes_featured', 'display_themes'); mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_new src src/wp-admin/includes/theme-install.php:181:// add_action('install_themes_new', 'display_themes'); mike@mike:~/Sites/wordpress-svn$ grep -r install_themes_updated src src/wp-admin/includes/theme-install.php:182:// add_action('install_themes_updated', 'display_themes');
display_themes
is used only in the same file wp-admin/includes/theme-install.php
, but in the commented add_actions. Should that function be deprecated?
mike@mike:~/Sites/wordpress-svn$ grep -r display_themes src src/wp-admin/includes/theme-install.php:122:function display_themes() { src/wp-admin/includes/theme-install.php:132:// add_action('install_themes_search', 'display_themes'); src/wp-admin/includes/theme-install.php:133:// add_action('install_themes_featured', 'display_themes'); src/wp-admin/includes/theme-install.php:134:// add_action('install_themes_new', 'display_themes'); src/wp-admin/includes/theme-install.php:135:// add_action('install_themes_updated', 'display_themes');
Attachments (1)
Change History (5)
#1
@
11 years ago
- Component changed from General to Themes
- Focuses administration added
- Version changed from trunk to 3.9
#3
@
9 years ago
- Keywords needs-refresh has-patch added
- Owner set to chriscct7
- Status changed from new to assigned
#4
@
6 weeks ago
- Keywords dev-feedback added
The commented out //add_action
were removed in https://core.trac.wordpress.org/ticket/32529
display_themes
does seem to be unused. Do you know anything more about this function @SergeyBiryukov ?
Note: See
TracTickets for help on using
tickets.
Removed commented add_action lines