Skip to content

Instantly share code, notes, and snippets.

[
{
"meta_id":6,
"post_id":10,
"meta_key":"_wp_page_template",
"meta_value":"default"
},
{
"meta_id":512,
"post_id":10,
{
size: 'desktop',
widgets:
[
{
"w": 14,
"h": 24,
"x": 0,
"y": 0,
"i": "are_dashboard",
{
lg: [
{ i: 'are_dashboard',
x: 0,
y: 0,
w: 14,
h: 24
},
{ i: 'combined_are',
Mobile Settings Array:
[{"i":"are_dashboard","x":0,"y":0,"w":12,"h":20},{"i":"combined_are","x":0,"y":20,"w":6,"h":16},{"i":"combined_tt","x":6,"y":20,"w":6,"h":16},{"i":"reset","x":0,"y":36,"w":6,"h":3,"isResizable":false},{"i":"time","x":0,"y":56,"w":6,"h":10},{"i":"news","x":6,"y":46,"w":6,"h":20},{"i":"school_switch","x":12,"y":36,"w":6,"h":10},{"i":"bookmarks","x":0,"y":39,"w":6,"h":17}]
Tablet Settings Array:
[{"i":"are_dashboard","x":0,"y":0,"w":6,"h":20},{"i":"combined_are","x":6,"y":0,"w":3,"h":20},{"i":"combined_tt","x":9,"y":0,"w":3,"h":20},{"i":"reset","x":0,"y":20,"w":6,"h":3,"isResizable":false},{"i":"time","x":0,"y":40,"w":6,"h":10},{"i":"news","x":6,"y":30,"w":6,"h":20},{"i":"school_switch","x":6,"y":20,"w":6,"h":10},{"i":"bookmarks","x":0,"y":23,"w":6,"h":17}]
Desktop Settings Array:
import React, {Component} from 'react';
import {reduxForm, change} from 'redux-form';
var { connect } = require('react-redux');
var { fetchSchoolByID, saveSchool } = require('../../../reducers/school');
export const fields = [ 'TrustID', 'LEAID', 'SchoolTypeId', 'Name', 'HeadTeacher', 'Email', 'Telephone', 'ImagePath', 'Notes' ];
var form = reduxForm({
form: 'schoolDetails',
@robhadfield
robhadfield / has_class.js
Created April 15, 2016 12:32 — forked from jjmu15/has_class.js
has class function - vanilla JS. Check if element has specified class
// hasClass, takes two params: element and classname
function hasClass(el, cls) {
return el.className && new RegExp("(\\s|^)" + cls + "(\\s|$)").test(el.className);
}
/* use like below */
// Check if an element has class "foo"
if (hasClass(element, "foo")) {
@robhadfield
robhadfield / meta_data_query.php
Created February 4, 2016 17:09
WP SQL for pulling meta_data as "Key" -> "Value" pairs
// Example ID
$id = '1';
// DB connection and query
global $wpdb;
$rows = $wpdb->get_results(
"
SELECT $wpdb->postmeta.meta_key, $wpdb->postmeta.meta_value
FROM $wpdb->postmeta
WHERE
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.min.css">
@robhadfield
robhadfield / SassMeister-input.scss
Last active August 29, 2015 14:23
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
$icon_rweb : "rweb";
$icon_smiley : "smiley";
$icon_rafl : "rafl";
$icon_rcast : "rcst";
$icon_rmap : "rmap";
$icon_rpass : "rpass";
@robhadfield
robhadfield / SassMeister-input.scss
Created June 14, 2014 11:06
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$allColors: (
"red": #cc4432,
"green": #60a539,
"blue": #008CBA
);