This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* ReduxFramework Sample Config File | |
* For full documentation, please visit: http://docs.reduxframework.com/ | |
*/ | |
if ( ! class_exists( "ReduxFramework" ) ) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
admin_bar | |
allow_sub_menu | |
async_typography | |
compiler | |
customizer | |
default_mark | |
default_show | |
dev_mode | |
display_name | |
display_version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) . ')'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 { |