reduxframework / redux-framework Goto Github PK
View Code? Open in Web Editor NEWRedux is a simple, truly extensible options framework for WordPress themes and plugins!
Home Page: http://redux.io
License: Other
Redux is a simple, truly extensible options framework for WordPress themes and plugins!
Home Page: http://redux.io
License: Other
Custom feature allowing users to specify certain fields to go on posts. Similar in nature to www.advancedcustomfields.com/, but fully supported in the panel and customizer as well.
Some empty select fields are generating a php error with wp-debug enabled. Appears to be caused by a typo in the code, currently_() should be__(). On this line:
https://github.com/ReduxFramework/ReduxFramework/blob/master/inc/fields/select/field_select.php#L123
foreach( $this->sections as $k => $section ) {
echo '<div id="' . $k . '_section_group' . '" class="redux-group-tab">';
if ( !empty( $section['sections'] ) ) {
$tabs = "";
When transparency is selected, the compiler doesn't update to the new value. It keeps the old hex value.
Received this notice when installing redux on fresh wp install and theme activation.
Notice: Undefined variable: defaults in ...framework.php on line 211
It's been 5 days now that I'm working with the STABLE release. as I read the Dev release installation, I don't know what you mean about the cloning with git and even the installation of Dev release.
From your page: http://reduxframework.com/docs/getting-started/
this code does not show the options menu.
if(!class_exists('ReduxFramework')){
require_once(dirname(FILE) . '/ReduxFramework/framework.php');
}
and in the main page https://github.com/ReduxFramework/ReduxFramework
you mention about the installation and setting up the framework. I don't even understand the unzip of file. Is that in Ubuntu OS or Linux OS?
calling this option require_once('path/to/copied/options.php'); is for the STABLE release. The DEV release framework doesn't have the options.php file.
I'm confused to migrate to the DEV version. or just continue with STABLE version.
sorry about this post, I just don't understand the flow of setting up the framework for DEV release.
There are several functions referencing twenty_eleven
in this file. For example: https://github.com/ReduxFramework/ReduxFramework/blob/master/sample/sample-config.php#L1107
Do these need to be changed when the opt_name
is changed? https://github.com/ReduxFramework/ReduxFramework/blob/master/sample/sample-config.php#L213
Can you gitignore this file or is it serving a purpose?
https://github.com/ReduxFramework/ReduxFramework/blob/master/codekit-config.json
The framework is nice. Been checking the functionality in the admin side and it looks great same as HNP Framework that I'm using. The problem with this, there's no guide on how to use in front-end. Guidelines on how to use it in front-end should be implemented. Like, how to use the radio option, multi-check, upload, fonts and especially with if else state.
What's nice if there's an if else statement guide; is to display the field entry if there is an entry, and if it's empy, it should not display or else, display another content as default.
Not all front-end developer is good in PHP like me. Hope this will be implemented like what Advanced Custom Fields doing. Lots of sample guidelines for front-end development. Thanks for the framework. Good job.
$render = '';
$render = new $field_class( $field, $value, $this );
the first line can be deleted
Everywhere there is color that makes sense (color and gradient) have a checkbox for transparency.
public function admin_footer_text( $footer_text ) {
return $this->args['footer_credit'];
}
The $footer_text
parameter is ignored. Is that correct?
I noticed that the field descriptions alternate between italic and standard font seemingly random. Not sure if this is done by design or simply an oversight.
For instance these field types have an italic description:
Text Input Field
Textarea Field
Layout Manager Field
While, these field types have a standard description:
Multi Text
Checkbox Field
Multi Check Field
Select Field
$google
$styles
$res
$hasGoogle
(in several places)
I do not see how they are used. Only assignments.
Need an extension to allow integration of the EDD Software Licensing component directly into a panel created with Redux.
$folds = array();
if( !is_null( $this->sections ) && is_null( $this->options_defaults ) ) {
...
return $folds;
}
// and else - nothing is returned?
Presets are not working for me. Here is what I have found while testing base options found in the current repo.
The presets array shows this in Dev Mode Tab:
id: "presets"
type: "image_select"
presets: true
title: "Preset"
subtitle: "This allows you to set a json string or array to override multiple preferences in your theme."
default: 0
desc: "This allows you to set a json string or array to override multiple preferences in your theme."
-options: {
-1: {
alt: "Preset 1"
img: http://localhost/wp-multi/theme/wp-content/themes/theme/framework/admin/options-framework/sample/presets/preset1.png
-presets: {
switch-on: 1
switch-off: 1
switch-custom: 1
}
}
-2: {
alt: "Preset 2"
img: http://localhost/wp-multi/theme/wp-content/themes/theme/framework/admin/options-framework/sample/presets/preset2.png
presets: "{"slider1":"1", "slider2":"0", "switch-on":"0"}"
}
}
As you can see, this is exactly as it is in the sample-config.php
Here is what I see under options_defaults
in Dev Mode Tab for the preset and the fields in the preset array:
switch-on: 1
switch-off: 0
switch-custom: 0
presets: 0
Here is what I see this under options
:
switch-on: "1"
switch-off: ""
switch-custom: ""
presets: 0
Now, when I select the preset option 1, here is what I see under options
:
switch-on: "1"
switch-off: ""
switch-custom: ""
presets: "1"
So, preset option 1 is set, but the switch values never changed.
Originally requested here: evertiro/historical-redux2#56
Because if it is used somehow, there is something strange with the
$sortlists = $this->value;
assignment.
$this->value
defaults to empty string in constructor, and I do not see any sings of validating if it's an array, before being used in foreach()....
NOTE: Carried over from pre-3.x repo - original issue posted by @availium
I know this shouldn't be core functionality, which is why I'm requesting it as an add-on. Couldn't think of any other way to ask.
So as to not reinvent the wheel, does anyone have, or is willing to share their, slider option fields? I'm thinking (or am hopeful) someone's done this with the FlexSlider2 Slider already.
Thanks!
@dovy it appears this field broke over the last few days. The Select for units is showing "1" instead of px,%, em. I also don't see the units in the output.
The th variable is setting an undefined notice when in WP debug mode.
This is due to the initial variable define being placed inside of an if statement that isn't being called all the time. If you move the following on line 824...
$th = '';
...to above and outside the current if statement scope, the error is resolved (move to around line 819). There is probably a better way to write all of this but I'm not sure exactly how it would be done.
The compiler fails to run using image_select fields.
Example:
array(
'id'=>'layout',
'type' => 'image_select',
'title' => __('Main Layout', 'redux-framework'),
'subtitle' => __('Select main content and sidebar alignment. Choose between 1, 2 or 3 column layout.', 'redux-framework'),
'options' => array(
'1' => array('alt' => '1 Column', 'img' => REDUX_URL.'assets/img/1col.png'),
'2' => array('alt' => '2 Column Left', 'img' => REDUX_URL.'assets/img/2cl.png'),
'3' => array('alt' => '2 Column Right', 'img' => REDUX_URL.'assets/img/2cr.png'),
'4' => array('alt' => '3 Column Middle', 'img' => REDUX_URL.'assets/img/3cm.png'),
'5' => array('alt' => '3 Column Left', 'img' => REDUX_URL.'assets/img/3cl.png'),
'6' => array('alt' => '3 Column Right', 'img' => REDUX_URL.'assets/img/3cr.png')
),
'default' => '2',
'compiler' => 'true',
),
Committed with docs found here:
http://reduxframework.com/docs/customize-css/
Hi, first - amazing work !
I worked with SMOF till now, but my knowledge not help me to get here on Redux saved data.
On the option admin i can saved the data and it really saved it, but i cant to display it on the site.
/**
* Set up Admin
*/
if(!class_exists('ReduxFramework')){
require_once(dirname(__FILE__) . '/admin/framework.php');
}
require_once(dirname(__FILE__).'/admin/options.php');
$args['opt_name'] = 'data';
array(
'id'=>'logo_image',
'type' => 'media',
'title' => __('Logo image', 'redux-framework'),
'subtitle' => __('Upload any media using the Wordpress native uploader', 'redux-framework'),
),
array(
'id'=>'text',
'type' => 'textarea',
'title' => __('Text', 'redux-framework'),
'subtitle' => __('Paste your Google Analytics (or other) tracking code here. This will be added into the footer template of your theme.', 'redux-framework'),
'validate' => 'js',
'desc' => 'Validate that it\'s javascript!',
),
public function __construct( $sections = array(), $args = array(), $extra_tabs = array() ) {
// Create defaults array
$defaults = array();
$defaults['opt_name'] = ''; // Must be defined by theme/plugin
$defaults['google_api_key'] = ''; // Must be defined to add google fonts to the typography module
$defaults['last_tab'] = '0';
$defaults['menu_icon'] = REDUX_URL . 'assets/img/menu_icon.png';
if (defined('MP6')) {
$defaults['menu_icon'] = '';
}
$defaults['menu_title'] = __( 'Options', 'redux-framework' );
$defaults['page_icon'] = 'icon-themes';
$defaults['page_title'] = __( 'Options', 'redux-framework' );
$defaults['page_slug'] = '_options';
$defaults['page_cap'] = 'manage_options';
$defaults['page_type'] = 'menu';
$defaults['page_parent'] = 'themes.php';
$defaults['page_position'] = null;
$defaults['allow_sub_menu'] = true;
$defaults['show_import_export'] = true;
$defaults['dev_mode'] = true;
$defaults['system_info'] = true;
$defaults['admin_stylesheet'] = 'standard';
$defaults['footer_credit'] = __( '<span id="footer-thankyou">Options panel created using <a href="' . $this->framework_url . '" target="_blank">Redux Framework</a> v' . $this->framework_version . '</span>', 'redux-framework' );
$defaults['help_tabs'] = array();
$defaults['help_sidebar'] = __( '', 'redux-framework' );
$defaults['theme_mods'] = false;
$defaults['theme_mods_expand'] = false;
$defaults['transient'] = false;
$defaults['global_variable'] = '';
$defaults['transient_time'] = 60 * MINUTE_IN_SECONDS;
<?php global $data; ?>
< img src="<?php echo $data['logo_image'] ?>" /><?php echo $data['text'] ?>
what i forgot to do ? what am i doing wrong?
- header( 'Cache-Control: no-store, no-cache, must-revalidate' );
- header( 'Cache-Control: post-check=0, pre-check=0', false );
- header( 'Pragma: no-cache' );
all lines start with '-' character
When working locally (Win7 with xampp) the export "download" and "copy link" options do not do anything.
This is related to: SimpleRain/SimpleOptions#34
On a dedicated apache webserver the options seem to work fine.
This issue started to occur in SimpleOptions >=0.5.0. Prior versions worked fine locally.
Can you think of any reason this may no longer work? It's a shame. I typically work locally and then want to copy the settings to the webserver.
I should note, the "copy link" feature generates a url, but when you load the url it's simply a blank page. The "copy" option seems to work fine.
In the process. Requires a change in the way we set names and IDs for each field type.
When using a non-google font, the style does not save.
Example, set font to "courier, monospace" with a style of "bold 700".
You should notice "bold 700" is reset to empty on save.
Convert the Select2 field to do this:
http://zeus.feralhosting.com/mrbriz/select2_3_2/Select2.htm
Then there's no need for the sorter. Just do multi-select. It will be much easier and obvious to users (i think).
Hy everybody i'm starting using redux for a new client theme. So i'm using roots as the basis and copied this into functions.php
if(!class_exists('ReduxFramework')){
require_once(dirname(FILE) . '/options/framework.php');
}
require_once(dirname(FILE).'/options/sample/sample-config.php');
Everything is fine see the values ecetera. Now i want to retrieve the value from slider1. I defined opt_name with roots_opt. So i could acces via global var $roots_opt['slider1'] the value???
$defaults = array(
'family'=>'',
'height'=>'',
'style'=>'',
'script'=>'',
'color'=>'',
'height'=>'',
'size'=>'',
);
height is duplicate
Hy everybody i think it would be great to extend the typography with those options. Because over the parameter style returns chubby values like 900-italic. But those you cant use for style etc. Would be better to split the size like 900 into font-weight and the styles like italic, italic, italic+bold... ๐
function render(){
$cb_enabled = $cb_disabled = '';//no errors, please
$val = intval($this->value);
//Get selected
if ( (int) $this->value == 1 ){
$cb_enabled = ' selected';
$cb_disabled = '';
}else {
$cb_enabled = '';
$cb_disabled = ' selected';
}
$cb_enabled/disabled are defined in if-else, so do not need initial assignment (or remove the else part)
$val - do not see any reference to it later
Want to build a "panel" builder if you will. Complete with preview and everything. Allowing users to see how it would look if they did it this way, then export with the proper PHP.
This would be a premium feature.
How to code the Posts Multiple Select in front-end?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.