GithubHelp home page GithubHelp logo

Comments (19)

teamcrisis avatar teamcrisis commented on May 22, 2024

To provide more information:

On fresh install of wp and using default redux settings I could do this:

<?php $options = get_option('mytheme'); ?>
<?php echo $options['body-font']['font-family']; ?>

And I could echo out the value (I think it was Arial)

However, after making a typography change and saving, nothing gets saved and I now get:

Notice: Undefined index: font-family

Doing an options reset doesn't help. I still get the same notice

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

After doing an option reset, this is what I see in the Dev Mode tab:

body-font: {
family: ""
google: "1"
style: ""
script: ""
size: ""
height: ""
color: "#dd9933"
}

This is what is in the options.php:

array(
    'id'=>'body-font',
    'type' => 'typography',
    'title' => __('Body Font', 'redux-framework'),
    'subtitle' => __('Specify the body font properties.', 'redux-framework'),
    'default' => array(
        'color'=>'#dd9933',
        'font-size'=>30,
        'font-family'=>'Arial, Helvetica, sans-serif',
        'font-weight'=>'Normal',
        ),
    ),

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Easy fix. I'm on it.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Told you it was easy. New fix is in the repo. ba16903

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy I'm still seeing two issues:

  1. style dropdown is not showing the selection, although the selected item is being save. For example, I selected Bold, saved, but dropdown displays nothing.
  2. When I do an option reset, the defaults in options.php are not set. Everything defaults to empty fields.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis
With 1, is that for Google Fonts or non?
2. I'll get on it.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Ahh, this is due to lack of documentation.

Here's how you properly define the default array for typography.

<?php 
array(
    'id'=>'typography',
    'type' => 'typography', 
    'title' => __('Typography', 'redux-framework'),
    'subtitle'=> __('Typography option with each property can be called individually.', 'redux-framework'),
    'default'=> array(
        'color'=>"#333", 
        'style'=>'700', 
        'family'=>'Courier, monospace', 
        'size'=>33, 
        'height'=>'40'),
    ),

Can you give that a try? Style is a combo of font-weight and font-style to save on space. I dropped the font- for redundancy sake. Guess I should finish the typography documentation huh? I also am updating the sample config.

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy it appears to be only for non-google fonts

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy, hmm...I'm using the sample included with v3. So this is wrong then?

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Get the latest pull from the repo and test it now. I think I may have resolved both issues. Please confirm.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis OOPS. I see the issue. There was legacy redux code in there! Please use my example above.

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy yep used your code, The values in the dropdown still don't show upon option reset but at least proper default values now are set.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

Umm, can you use my code exactly as above? Please note, normal = 400.

http://preview.simplerain.com/qdya

I can't duplicate it.

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy when I use your code exactly as it is, it works as expected.

Why is it when I change to this: 'id'=>'body-font' it breaks?

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Ahhhh, then the problem is not at all related to typography, but in the defaults init. I see.

Change the id, then run a reset defaults and let me know if it works. I think I now know what to fix.

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis You have skype or gchat or something?

info AT simplerain DOT com

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy ok, pulled latest master, used your typography code but changed the id. Reset the defaults and fields are blank., so it's not working when id is changed.

from redux-framework.

teamcrisis avatar teamcrisis commented on May 22, 2024

@dovy I sent you gchat (hangouts) message at that email

from redux-framework.

dovy avatar dovy commented on May 22, 2024

@teamcrisis Heh, now i'm waiting for you to authorise it.

from redux-framework.

Related Issues (20)

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.