Skip to content

Instantly share code, notes, and snippets.

View kprovance's full-sized avatar

Kevin Provance kprovance

View GitHub Profile
@kprovance
kprovance / new sample-config
Created March 28, 2015 01:34
new sample-config
<?php
/**
* ReduxFramework Sample Config File
* For full documentation, please visit: http://docs.reduxframework.com/
*/
if ( ! class_exists( "ReduxFramework" ) ) {
return;
}
@kprovance
kprovance / color scheme example
Created March 16, 2015 03:04
color scheme example
$this->sections[] = array(
'title' => __('Color Schemes', 'redux-framework-demo'),
'desc' => __('Color Scheme layout', 'redux-framework-demo'),
'icon' => 'el-icon-home',
'fields' => array(
array(
'id' => 'opt-color-scheme',
'type' => 'color_scheme',
'title' => 'Color Schemes',
@kprovance
kprovance / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
array (
'id' => 'opt-group',
'type' => 'group',
'title' => 'Group test',
'subtitle' => 'Group subtitle',
'subfields' => array (
array(
'id' => 'group-switch',
'type' => 'switch',
'title' => __('Section Show', 'redux-framework-demo'),
@kprovance
kprovance / Typography redesign
Created May 29, 2014 00:22
Typography redesign
@sodbileg @paulthecoder @wpexplorer @teamcrisis @corradomatt @dovy
In case you gents missed it, we redesigned the typography field to display font family dynamically in an effort to spare page load time. The reworking was...considerable. To date, I've been bug hunting on my own. I could use some assistance in experimenting with the field to ensure it's all working properly before it's pushed to wp.org.
So, how about it? I pulled your names from our issues board as devs who expressed an interest in a lighter typography field. The latest version of Redux from our repo contains the new code. Please give it a pull and let me know if you find anything hinky with it.
Thanks!
@kprovance
kprovance / contribution guidelines
Last active August 29, 2015 14:01
contribution guidelines
Use curly brackets for sections.
No open ended if/foreach loops, it's hard to read.
Example:
function myFunction() {
echo 'hi!';
}
Use spaces for in-line statements:
$var = get_data( array( 'redux' ) );
@kprovance
kprovance / arguments
Created April 28, 2014 17:30
arguments
admin_bar
allow_sub_menu
async_typography
compiler
customizer
default_mark
default_show
dev_mode
display_name
display_version
@kprovance
kprovance / color schemes
Created April 24, 2014 03:03
color schemes
1. Delete old version of color_schemes
2. Remove all references to color schemes in config file.
3. Delete any leftover JSON file(s) in uploads/redux_color_schemes.
4. Reset all to ensure any leftover DB entries are nuked.
5. Install new version
6. Use field array below (changes since last time)
array(
@kprovance
kprovance / logConsole
Created April 17, 2014 20:32
logConsole
function logConsole($name, $data = NULL, $jsEval = FALSE)
{
if (! $name) return false;
$isevaled = false;
$type = ($data || gettype($data)) ? 'Type: ' . gettype($data) : '';
if ($jsEval && (is_array($data) || is_object($data)))
{
$data = 'eval(' . preg_replace('#[\s\r\n\t\0\x0B]+#', '', json_encode($data)) . ')';
@kprovance
kprovance / Bare bones sample-config
Created April 17, 2014 00:48
Bare bones sample-config
<?php
/**
ReduxFramework Sample Config File
For full documentation, please visit: https://docs.reduxframework.com
* */
if (!class_exists('Redux_Framework_sample_config')) {
class Redux_Framework_sample_config {