E4H
Typekit
<div class="col"> | |
test | |
</div> |
E4H
Typekit
//= require libs/get_elements_by_class_name_polyfill.js | |
"use strict"; | |
var CodePenEmbed = { | |
width: "100%", | |
init: function() { | |
this.showCodePenEmbeds(); | |
this.listenToParentPostMessages(); |
function myprefix_kses_allowed_tags($input){ | |
return array_merge( $input, array( | |
// paragraphs | |
'p' => array( | |
'style' => array() | |
), | |
'span' => array( | |
'style' => array() | |
), | |
'div' => array( |
This is a sample sentence to test Markdown in the comments of a WordPress blog with Jetpack Markdown enabled for comments.
<h1 id="test">This is a code block</h1>
<head>
<script>alert("Anything goes in here");</script>
<meta>because it just should just be escaped anyway</meta>
</head>
Howdy! We use CodeMirror as our editor on CodePen. We also use the Emmet add on for it. We love it. The users love it. It's also very very big at 831k (before compression and stuff).
I've been wanting to optimize it for a while, I've just struggled with it the few times I've tried, and think maybe one of you smart people might be able to do the job more efficiently.
Here's what our custom version of Emmet.js would be like:
This is a WORK IN PROGRESS intended for fleshing out and feedback
It's very common for people to be unhappy with how a WordPress plugin adds front end resources to their site. If a plugin needs CSS, the plugin will add a <link>
element to that CSS. If the plugin needs JavaScript, it will add a <script>
to that JavaScript.
Plugins do this because it works. It's damn important for a WordPress plugin to work, even in adverse conditions. They rightfully want good ratings and little customer support.
But this comes at the cost of additional HTTP requests. In optimizing front end performance of a site, reducing the number of HTTP requests is a huge thing. Front end developers want to decide and control how front end resources are being handled, and WordPress plugins don't typically make this easy on them.
// Figure Inserting | |
function html5_insert_image($html, $id, $caption, $title, $align, $url) { | |
$html5 = "<figure id='post-$id media-$id' class='align-$align'>"; | |
$html5 .= "<img src='$url' alt='$title' />"; | |
if ($caption) { | |
$html5 .= "<figcaption>$caption</figcaption>"; | |
} | |
$html5 .= "</figure>"; | |
return $html5; | |
} |
A Pen by Chris Coyier on CodePen.
hi.
<div>hi</div>