Giter VIP home page Giter VIP logo

reduxframework / redux-framework Goto Github PK

View Code? Open in Web Editor NEW
1.7K 109.0 582.0 50.49 MB

Redux is a simple, truly extensible options framework for WordPress themes and plugins!

Home Page: http://redux.io

License: Other

CSS 11.52% JavaScript 15.47% PHP 67.07% SCSS 5.94%
redux-framework wordpress-plugin php wordpress-theme converter options option-framework metaboxes user-meta wordpress-admin

redux-framework's Issues

Better Info Boxes?

May think about implementing some of these. May be difficult as we use the options framework. Oy.

screen shot 2013-09-14 at 11 09 11 pm

framework.php : $tabs - never used?

            foreach( $this->sections as $k => $section ) {
                echo '<div id="' . $k . '_section_group' . '" class="redux-group-tab">';
                if ( !empty( $section['sections'] ) ) {
                    $tabs = "";

Notice: Undefined variable: defaults

Received this notice when installing redux on fresh wp install and theme activation.

Notice: Undefined variable: defaults in ...framework.php on line 211

ReduxFramework Stable release and Dev release

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.

Redux Guidelines?

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.

Inconsistency with Field Description Styles

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

Select Field Shows Default ID on Change

I noticed that when you change a select field and save the options, it displays the default ID beneath the subtitle, is this being done intentionally? Is there a way to turn this off?

You can see an example of what I am referring to in the image below:

select-default

EDD Licensing support

Need an extension to allow integration of the EDD Software Licensing component directly into a panel created with Redux.

Presets not working

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.

class ReduxFramework_sorter - is that used at all?

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()....

Add on request? Slider options

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!

Spacing field type broken

@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.

units

Undefined Variable Notice - framework.php line 876

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.

Compiler fails on image_select field

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',
    ),

Cant display saved data

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.

Functions.php

              /**
             * Set up Admin
             */

             if(!class_exists('ReduxFramework')){
             require_once(dirname(__FILE__) . '/admin/framework.php');
             }

             require_once(dirname(__FILE__).'/admin/options.php');

Options.php:

$args['opt_name'] = 'data';

On next of options.php:

        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!',
            ),

Framework.php:

       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;

header.php:

                  <?php global $data; ?>
                  < img src="<?php echo $data['logo_image'] ?>" /><?php echo $data['text'] ?> 

what i forgot to do ? what am i doing wrong?

Export options don't work locally

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.

Typography style not saving

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.

Returning Values

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???

Typography improvements italic bold etc.

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... ๐Ÿ‘

ReduxFramework_switch::render() - useless assignments ?

    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

Options Builder Plugin

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.