Skip to content

Instantly share code, notes, and snippets.

View postmeta
[
{
"meta_id":6,
"post_id":10,
"meta_key":"_wp_page_template",
"meta_value":"default"
},
{
"meta_id":512,
"post_id":10,
View Dashboard layout PUT Request
{
size: 'desktop',
widgets:
[
{
"w": 14,
"h": 24,
"x": 0,
"y": 0,
"i": "are_dashboard",
View Full Widget Layout
{
lg: [
{ i: 'are_dashboard',
x: 0,
y: 0,
w: 14,
h: 24
},
{ i: 'combined_are',
View Dashboard Layouts
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:
View Redux Form Examples
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 Apr 15, 2016 — forked from jjmu15/has_class.js
has class function - vanilla JS. Check if element has specified class
View has_class.js
// 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 Feb 4, 2016
WP SQL for pulling meta_data as "Key" -> "Value" pairs
View meta_data_query.php
// 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
View index.html
<!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 Aug 29, 2015
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// 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 Jun 14, 2014
Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
$allColors: (
"red": #cc4432,
"green": #60a539,
"blue": #008CBA
);