get_links() Uses single quotes in HTML. Yuck!
-
As the title says, whoever wrote get_links() should be reprimanded:
if ('' != $title) {
$title = " title='$title'";
}
This definitely needs to be updated in the next build of WP–there’s no reason to use single quotes like this and it’s not exactly semantically correct.
Obvious fix:
if ('' != $title) {
$title = ' title="' . $title . '"';
}
By the way–it’s worth pointing out that using double quotes is SLOWER than using single quotes (I don’t want to get in to exactly why, but put simply: PHP has to look for variables to parse in double quote strings but it doesn’t in single quotes). In the WP source there are thousands of instances of pointless use of double quotes seemingly for no reason except laziness. While I understand this is due to the fact that WP is a work in progress and has come a long way, it’s probably time to start paying more attention to things like this.
When you have 22 queries on a page and countless plugins, speed begins to matter. Instances like the one above can be fixed will help WP become a better product in the end.
That said, WP is excellent and you’re all doing great work.
- The topic ‘get_links() Uses single quotes in HTML. Yuck!’ is closed to new replies.