Skip to content

Instantly share code, notes, and snippets.

View mattisbusycom's full-sized avatar

Matthew M Kaufman mattisbusycom

View GitHub Profile
anonymous
anonymous / Multi-Toggle-Navigation.markdown
Created March 11, 2015 21:58
Multi-Toggle Navigation

Multi-Toggle Navigation

The multi-toggle is basically just nested accordions. The user taps on the parent category to reveal children categories underneath. Once enough screen real estate becomes available, they convert to the usual multi-level dropdown we’re used to seeing.

A Pen by Brad Frost on CodePen.

License.

@jreinke
jreinke / disable_flat_catalog_category.php
Last active November 8, 2015 03:40
Magento: Disable flat catalog category on the fly
<?php
/** @var $collection Mage_Catalog_Model_Resource_Category_Collection */
$collection = Mage::getModel('catalog/category', array('disable_flat' => true))->getCollection();
// ... custom stuff
@jasontipton
jasontipton / attributes.phtml
Created November 17, 2014 04:18
Adding 'hproduct' Microformat - Magento 1.9 Community Edition
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
@drogers98
drogers98 / what it is view
Created October 24, 2014 13:55
EBS Headless D7 Article View (what it is)
$view = new view();
$view->name = 'what_it_is';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'What it is';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
@hughgrigg
hughgrigg / magento-remove-invalid-fk-option-entity-int-rows.sql
Created October 22, 2014 15:20
Removing invalid rows from Magento eav_attribute_option and catalog_product_entity_int
# Delete option rows pointing to non-existent attributes
DELETE `option`
FROM `eav_attribute_option` AS `option`
LEFT JOIN `eav_attribute`
ON `eav_attribute`.`attribute_id` = `option`.`attribute_id`
WHERE `eav_attribute`.`attribute_id` IS NULL;
# Delete product attribute int rows pointing to non-existent attributes
DELETE `entity_int`
FROM `catalog_product_entity_int` AS `entity_int`
@taleeb35
taleeb35 / AutoComplete.php
Last active August 20, 2017 09:50
Auto Complete Search in Cakephp
//Controller Action
public function find() {
if ($this->request->is('ajax')) {
$this->autoRender = false;
$country_name = $this->request->query('term');
$results = $this->Country->find('all', array(
'conditions' => array('Country.name LIKE ' => '%' . $country_name . '%')
anonymous
anonymous / jsbin.xisaluyi.html
Created July 24, 2014 15:57
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-git2.js"></script>
<script src="http://www2.mattisbusy.com/bower_components/jquery/dist/jquery.min.js"></script>
<script src="http://www2.mattisbusy.com/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="http://www2.mattisbusy.com/bower_components/todc-bootstrap/dist/js/bootstrap.min.js"></script>
<link href="http://www2.mattisbusy.com/bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />

Integrating WP API into Core

Plan for integrating WP API into core

This document describes the process of integrating the WordPress JSON REST API ("API project") into the WordPress core codebase ("core").

Motivation

Accessing data remotely is a common goal for many WordPress users and developers. The ability to access and update data remotely is used by desktop publishing software, mobile applications, and in-browser applications. These

@adamcapriola
adamcapriola / page_discourse-sso.php
Last active March 24, 2020 14:21
WordPress Page Template for SSO with Discourse
<?php
/**
* Template Name: Discourse SSO
* Author: Adam Capriola
* Version: 1.1
* Author URI: https://meta.discourse.org/users/AdamCapriola/activity
* Adapted From: https://github.com/ArmedGuy/discourse_sso_php
* Uses: https://meta.discourse.org/t/official-single-sign-on-for-discourse/13045
*
*/