Skip to content

Instantly share code, notes, and snippets.

View cleancoded's full-sized avatar

James cleancoded

View GitHub Profile
@cleancoded
cleancoded / ajax-reg.js
Last active October 26, 2017 02:43 — forked from csknk/ajax-reg.js
Facade type function and related classes to control programmatic user-generation on the WordPress front-end. Forms are submitted with Ajax, with a working PHP fallback.
/**
* This file is enqueued by means of wp_enqueue_script() - variables are passed
* in from PHP by means of wp_localize_script()
*
*/
/* TM: We use an anonymous function to invoke the JavaScript. Also refactored for proper
* WordPress coding standards.
*/
(function( $ ) {
<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) {
exit;
}
/**
* Archive Template
*
@cleancoded
cleancoded / index.html
Last active January 4, 2019 19:25
WAF Daily Time Entries Email
Timesheet: <b>January 4, 2019</b>
<br/><br/>
<table>
<thead>
<tr>
<th>Project</th>
<th>Task</th>
<th>Hours</th>
</tr>
</thead>
@cleancoded
cleancoded / woocommerce-stripe-change-form-style.css
Created March 30, 2019 11:07
[Stripe] Change the style of the Stripe Form for WooCommerce.
/* General iframe Background */
iframe {
background: #fff;
}
/* Update Credit Card Field */
#stripe-card-element {
background: #ffffff !important;
padding: 10px 5px !important;
margin: 5px 0px !important;
@cleancoded
cleancoded / mediavine-Test.md
Created August 9, 2019 15:40
Mediavine -Test

Mediavine -Test

  1. Given an API route for retrieving a specific record, do the following:
    1. Get the id param
    2. Return a 404 if the record isn't found
    3. Return a response with the record if it is found

Route format:

php