Skip to content

Instantly share code, notes, and snippets.

(function () {
fetch('/level/1', {
credentials: 'same-origin'
}).then(function (response) {
return response.text();
}).then(function (response) {
$('#password').val(response.match(/Password:\s+([\d\-]+)/)[1]);
});
})();
@joshmcrty
joshmcrty / WordPress Apply Content Filter
Created July 18, 2013 18:44
Apply the WordPress content filters to a string of HTML from a custom field within the WordPress loop. The enables oEmbed, wp_texturize, etc.
<?php $my_custom_content = get_post_meta( $post->ID, 'my_custom_content_meta_key', true ); ?>
<?php if ( '' != $my_custom_content ) : ?>
<?php echo apply_filters( 'the_content', html_entity_decode( $my_custom_content ) ) ?>
<?php endif; ?>