{"id":3390,"date":"2016-11-10T05:56:52","date_gmt":"2016-11-10T05:56:52","guid":{"rendered":"http:\/\/musilda.cz\/?p=3390"},"modified":"2016-11-10T05:56:52","modified_gmt":"2016-11-10T05:56:52","slug":"atributy-resource-hints-ve-wordpress-4-7","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/atributy-resource-hints-ve-wordpress-4-7\/","title":{"rendered":"Atributy pro resource hints ve WordPress 4.7"},"content":{"rendered":"

Spr\u00e1vu resource hints podporuje WordPress ji\u017e od verze 4.6, ale v nov\u00e9 verzi je tato funkce roz\u0161\u00ed\u0159ena i na pr\u00e1ci s jejich atributy.<\/p>\n

V p\u0159\u00edpad\u011b, \u017ee nev\u00edte, co jsou resource hints, doporu\u010duji \u010dl\u00e1nek od Tom\u00e1\u0161e Matonohy<\/a>. Z jeho data plyne, \u017ee hints nen\u00ed \u017e\u00e1dn\u00e1 novinka a v html k\u00f3du str\u00e1nek, jste se mohli setkat s podobn\u00fdm z\u00e1pisem:<\/p>\n

<link rel=\"dns-prefetch\" href=\"\/\/example.com\">\n<link rel=\"dns-prefetch\" href=\"\/\/ajax.googleapis.com\"><\/pre>\n

Ve WordPress 4.6 byl dopln\u011bn nov\u00fd filtr wp_resource_hints, jen\u017e umo\u017e\u0148ova spr\u00e1vu v\u0161ech hints pomoc\u00ed tohoto filtru. Do t\u00e9 doby bylo t\u0159eba zapisovat do hlavi\u010dky „na tvrdo“.<\/p>\n

Filtr wp_resource_hints p\u0159ij\u00edmal jen url zdroje.<\/p>\n

Od verze 4.7 p\u0159ij\u00edm\u00e1 pole, obsahuj\u00edc\u00ed:<\/p>\n