This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var webpack = require('webpack'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var deepMerge = require('deep-merge'); | |
var ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
// BEGIN CONFIG TOOLS | |
// Set up config merging function. | |
var merge = deepMerge(function(target, source, key) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// assets/scripts/customizer.js | |
(function($) { | |
// Primary colour | |
wp.customize('primary_colour', function(value) { | |
value.bind(function(to) { | |
$('head').append('<style>.Primary-bg-c{background-color:'+ to +' !important;}</style>'); | |
$('head').append('<style>.Primary-c{color:'+ to +' !important;}</style>'); | |
$('head').append('<style>.Primary-c--hover:hover{color:'+ to +' !important;}</style>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('wp_ajax_register_user_front_end', 'register_user_front_end', 0); | |
add_action('wp_ajax_nopriv_register_user_front_end', 'register_user_front_end'); | |
function register_user_front_end() { | |
$new_user_name = stripcslashes($_POST['new_user_name']); | |
$new_user_email = stripcslashes($_POST['new_user_email']); | |
$new_user_password = $_POST['new_user_password']; | |
$user_nice_name = strtolower($_POST['new_user_email']); | |
$user_data = array( | |
'user_login' => $new_user_name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Simple Ajax Login Form | |
//Source: http://natko.com/wordpress-ajax-login-without-a-plugin-the-right-way/ | |
?> | |
//html | |
<form id="login" action="login" method="post"> | |
<h1>Site Login</h1> | |
<p class="status"></p> | |
<label for="username">Username</label> |