News for hackers. Stuff that matters.
Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by ck2 on Wednesday February 24, 2016 @11:37AM (#11168015)
WordPress is schizophrenic

Oh hey let's load up your webpages with all this cr*p by default, tons of javascript, css, external files, fonts, headers, footers useless markup.

Oh hey, let's use this plugin to strip all that out.

How about not putting it in there in the first place.

Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by CM30 on Wednesday February 24, 2016 @02:53PM (#11169683)
A large portion of said code comes from themes and plugins. Especially the latter, which seem to use (abuse) wp_enqueue_script and wp_enqueue_style like it's going out of fashion.

A significant amount of WordPress related overhead would disappear if developers would keep resources to a minimum and provide a way to turn them off without writing additional code. Or if there was some built in system that tried to bundle together the CSS and JS files.

Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by krapp on Wednesday February 24, 2016 @11:45AM (#11168093)
I would say in that case, the administrator who didn't properly configure their theme and plugins is "schizophrenic."
Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by currysausage on Wednesday February 24, 2016 @12:42PM (#11168581)
Most administrators are lazy. If you write software for thousands or millions of users, sane defaults are a must. I find it useful to keep Saint-Exupéry in mind: "It seems that perfection is attained not when there is nothing more to add, but when there is nothing more to remove."

Let's look at the first lines of WordPress's default template:

  <!DOCTYPE html>
  <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">
  <head profile="http://gmpg.org/xfn/11">
Why bother with xmlns if it's not well-formed XML anyway?

Why dir and lang if you don't really know what language the content is in? We now have the funny situation that most non-English pages wrongly declare lang="en-US" because W3C evangelists told template authors that lang is really important, rendering the attribute completely useless.

What the heck is profile="http://gmpg.org/xfn/11" supposed to do?

Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by nissehulth on Wednesday February 24, 2016 @01:22PM (#11168916)
What "default template" would that be?

As for the "lang" attribute, it is set to the language chosen when WordPress was installed.

Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by currysausage on Wednesday February 24, 2016 @02:30PM (#11169491)
Oops, sorry, I was looking at the HTML of the theme previewer instead of the theme itself. With regard to WordPress, only my "XHTML friends network" point remains valid. Concerning web development in general, I have seen way too much cargo cult boilerplate, too many hardcoded lang attributes, etc.
Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by nissehulth on Wednesday February 24, 2016 @05:23PM (#11170723)
Yeah, the value of "XFN" is debatable. But it's usually written as a link element that doesn't really break anything.
Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by josefresco on Wednesday February 24, 2016 @02:07PM (#11169276)
First 3 lines of Twenty Sixteen are:

<!DOCTYPE html> <html lang="en" class="no-js"> <head>

I checked back to Twenty Fourteen and didn't see the lines you referenced. Regardless, it's a silly argument, the default themes are "reference" themes, meant to show off all the features WordPress offers and of course don't represent all WP themes.

Re:WordPress Sites Now Support Google’s AMP to Make Mobile P... by cphoover on Wednesday February 24, 2016 @11:44AM (#11168078)
lol