Skip to content

Instantly share code, notes, and snippets.

@dovy
dovy / field.php
Last active December 27, 2015 19:09
<?php
array(
'id'=>'text',
'type' => 'text',
'title' => __('Test Compiler', 'redux-framework-demo'),
'subtitle' => __('This is to test the compiler hook.', 'redux-framework-demo'),
'desc' => __('Each time this field is set, a flag is set. On save, that flag initates a compiler hook!', 'redux-framework-demo'),
'compiler' => true,
'default' => 'Test Compiler'
),
@dovy
dovy / filters.md
Last active December 28, 2015 03:49
  • Sections
  • apply_filters('redux-sections',$sections);
  • apply_filters('redux/options/'.$this->args['opt_name'].'/sections',$sections);
  • Local (Internationalization)
  • apply_filters( 'redux/textdomain/'.$this->args['opt_name'], get_locale(), $domain );
  • Wordpress Data
  • apply_filters( 'redux/options/'.$this->args['opt_name'].'/wordpress_data/'.$type.'/', $data );
  • apply_filters( 'redux/options/'.$this->args['opt_name'].'/data/'.$type, $data );
  • Font Icons
  • apply_filters('redux-font-icons',array());
<?php
global $pagenow;
if ($pagenow !== "post.php" || $pagenow !== "post-new.php") {
return;
}
@dovy
dovy / SMOF2Redux.php
Last active December 28, 2015 23:19
Add the following file somewhere within your theme. It will create a demo panel with your SMOF data as well as a SMOF2Redux Export menu item, to grab a functioning Redux configuration file.
<?php
if( !class_exists( 'SMOFtoRedux' ) ) {
class SMOFtoRedux {
public function __construct( ) {
add_action('init', array($this, 'addPanel'), 100);
add_action( 'admin_menu', array($this, 'addExportMenu') );
<?
array(
'id'=>'typographyTest',
'type' => 'typography',
'title' => __('Typography', 'redux-framework-demo'),
'font-style'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare
'font-weight'=>false, // Includes font-style and weight. Can use font-style or font-weight to declare
'subsets'=>false, // Only appears if google is true and subsets not set to false
'font-size'=>false,
'font-family'=>false,
<?php
if ( !class_exists( "ReduxFramework" ) ) {
return;
}
if ( !class_exists( "Redux_Framework_redux_converter_cf5486bd5852b65564baf7c" ) ) {
class Redux_Framework_redux_converter_cf5486bd5852b65564baf7c {
public function __construct( ) {
// Your base config file for Redux
<?
if ( !class_exists( "ReduxFramework" ) ) {
return;
}
if ( !class_exists( "SMOF2Redux_{{opt_name}}_{{uuid}}" ) ) {
class SMOF2Redux_{{opt_name}}_{{uuid}} {
public function __construct( ) {
// Your base config file for Redux
add_action( 'redux/loaded', array($this, 'addPanel') );
Azeri - Azərbaycan Dili (az_AZ)
آذربایجان دیلی - آذری (azb_AZB)
Azerbaijani (Turkey) - Azərbaycan Türkcəsi (az_TR)
Afrikaans - Afrikaans (af)
Albanian - Shqip (sq_AL)
Arabic – عربي (ar)
Aragonese - Aragonés (an)
Assamese - অসমীয়া (as)
Bangla - Bengali (bn_BD)
Basque - Euskara (eu)
@dovy
dovy / list.js
Last active January 2, 2016 18:29
'use strict';
angular.module('rootSnapApp')
.constant('ListCtrlResolver', {
ancestry: function(familysearch) {
return familysearch.getCurrentUserPersonId().then(function(id) {
return familysearch.getAncestry(id, {personDetails: true}).then(function(response) {
return response.getPersons();
});
});
<?php
$boxSections = array();
$boxSections[] = array(
'title' => __('Home Settings', 'redux-framework-demo'),
'header' => __('Welcome to the Simple Options Framework Demo', 'redux-framework-demo'),
'desc' => __('Redux Framework was created with the developer in mind. It allows for any theme developer to have an advanced theme panel with most of the features a developer would need. For more information check out the Github repo at: <a href="https://github.com/ReduxFramework/Redux-Framework">https://github.com/ReduxFramework/Redux-Framework</a>', 'redux-framework-demo'),
'icon_class' => 'icon-large',
'icon' => 'el-icon-home',
// 'submenu' => false, // Setting submenu to false on a given section will hide it from the WordPress sidebar menu!
'fields' => array(