WordPress.org

Make WordPress Core

Opened 13 months ago

Closed 3 weeks ago

Last modified 12 days ago

#37855 closed defect (bug) (invalid)

Clean WordPress Head - Group together related tags

Reported by: ramiy Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Bootstrap/Load Keywords: has-patch
Focuses: Cc:

Description

This is a request from the Israeli WordPress Community. I'm trying to make some of them get involved in WordPress core development.

Two WordPress users from the SEO industry, asked me to make the WordPress <head> cleaner. To update the site's source and group together the <meta> and <link rel="..."> tags.

Not the scripts and stylesheets! Other tags like: RSD, WLW, noindex, canonical, shortlink, icon and few others. All those functions echo some kind of <link rel="..."> tag. Changing those tags position in the head has no effect on the site itself.

Attachments (3)

37855.patch (3.9 KB) - added by ramiy 13 months ago.
Add $priority parameter to wp_head actions
37855.2.patch (4.2 KB) - added by ramiy 13 months ago.
re-order the wp_head actions to match the $priority parameter
37855-result.png (460.1 KB) - added by ramiy 13 months ago.

Download all attachments as: .zip

Change History (10)

#1 @ramiy
13 months ago

  • Severity changed from normal to minor

@ramiy
13 months ago

Add $priority parameter to wp_head actions

@ramiy
13 months ago

re-order the wp_head actions to match the $priority parameter

#2 @ramiy
13 months ago

  • Keywords has-patch added

Easy fix, playing with the default-filters.php.

@ramiy
13 months ago

#3 @GaryJ
13 months ago

@ramiy Your patch is going to break multiple plugins and themes that already unhook various items from wp_head, because the priority has changed.

#4 @jorbin
13 months ago

1) @GaryJ is correct.
2) Even if core changes the order, this will always be thrown off by plugins.
3) What is the actual benefit to this? Is it perceived readability?

This ticket was mentioned in Slack in #core by jorbin. View the logs.


12 months ago

#6 @ramiy
3 weeks ago

  • Resolution set to invalid
  • Status changed from new to closed

#7 @netweb
12 days ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.