Skip to content

Instantly share code, notes, and snippets.

@dovy
dovy / 0_reuse_code.js
Created January 31, 2014 22:40
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
<?php
/**
* Examine a url and try to determine the post ID it represents.
*
* Checks are supposedly from the hosted site blog.
*
* @since 1.0.0
*
* @param string $url Permalink to check.
* @return int Post ID, or 0 on failure.
Testing
<?php
/**
* Redux Framework is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
*
* Redux Framework is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
echo '<tr><td>';
// If field has class set, add it
if (isset($field['class'])) {
$field['class'] .= " group";
} else {
$field['class'] = " group";
}
// If field has a title, set it
/* Admin color tweaks thanks to AJ Clarke (WPExplorer) */
#redux-header { background: #222222 }
#redux-header h2 { color: #fff; }
#redux-header .display_header span { color: #bbb; }
.redux-sidebar .redux-group-menu li.active { border-left: 3px solid #0074a2 }
.redux-container-image_select .redux-image-select-selected img { border-color: #0074a2 }
/*Light admin*/
.admin-color-light #redux-header .display_header span { color: #e6e6e6; }
.admin-color-light #redux-header { background: #888888; border-color: #04a4cc; }
.admin-color-light .redux-sidebar .redux-group-menu li.active { border-left: 3px solid #04a4cc }
@dovy
dovy / SassMeister-input.scss
Created April 3, 2014 01:03
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// Bourbon (v3.2.0.beta.1.a)
// ----
@import "bourbon/bourbon";
.background {
<?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 {

= 3.2.1 =

  • Fixed: Reset section, etc. Discovered an odd WordPress thing.
  • Fixed: Image_select size override.
  • Fixed: Customizer save not firing the compiler hook.
  • Fixed: Customizer not outputting CSS if output_tag is set to false.
  • Fixed: Small empty variable check. Undefined index in the defaults generating function.
  • Fixed: WP 3.9 update made editor field button look ugly.
  • Fixed: Save hook not firing when save_default set to false.
  • Fixed: Reset section anomalies. Maybe.
  • Fixed: Array of values in required not recognized.
<?php
if ( ! function_exists( "RdxIO_add_widgets" ) ):
function RdxIO_add_widgets( $widgets ) {
$widgets[] = array(
'id' => 'testWidget',
'title' => 'Test Widget Title',
'name' => 'WORK',
'desc' => 'This is the description',
'fields' => array(