Skip to content

Instantly share code, notes, and snippets.

View ThomasDK81's full-sized avatar

Thomas Blomberg Munkholm ThomasDK81

View GitHub Profile
@ThomasDK81
ThomasDK81 / functions.php
Created November 15, 2018 19:43 — forked from dariodev/functions.php
Programmatically Create a User in WordPress
<?php
// Programmatically Create a User in WordPress
add_action('init', 'prefix_add_user');
function prefix_add_user() {
$username = 'username123';
$password = 'pasword123';
$email = 'drew@example.com';
$user = get_user_by( 'email', $email );
if( ! $user ) {
@ThomasDK81
ThomasDK81 / posttype.php
Created October 23, 2018 07:45
Posttype and all labels and messages
add_action( 'init', 'register_post_type' );
/**
* Register sites
*
* @link http://codex.wordpress.org/Function_Reference/register_post_type
*/
function register_post_type() {
$sites_labels = array(
'name' => __( 'Hjemmesider', 'infoland-crm' ),
@ThomasDK81
ThomasDK81 / index.html
Created December 12, 2017 21:36 — forked from knownasilya/index.html
Google Maps Advanced Drawing
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {