Skip to content

Instantly share code, notes, and snippets.

Redux Shortcodes

A useful class which wraps a few core WordPress functions that, we think, should be inherit in WordPress. So instead, we made a class. Here's a brief overview of the features.

[bloginfo data=""]

Get any data available to the bloginfo() function. A full list of options is found: http://codex.wordpress.org/Function_Reference/bloginfo

[themeinfo data=""]

Get any of the values of the wp_get_theme function. A full list of options is found: http://codex.wordpress.org/Function_Reference/wp_get_theme

<?php
/*
* The page core options for the Shoestrap theme
*/
if ( !function_exists( 'shoestrap_module_coulourlovers_options' ) ) :
function shoestrap_module_coulourlovers_options( $sections ) {
// Page Options
@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 {