Comments (19)
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.
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.
@teamcrisis Easy fix. I'm on it.
from redux-framework.
@teamcrisis Told you it was easy. New fix is in the repo. ba16903
from redux-framework.
@dovy I'm still seeing two issues:
- style dropdown is not showing the selection, although the selected item is being save. For example, I selected Bold, saved, but dropdown displays nothing.
- When I do an option reset, the defaults in options.php are not set. Everything defaults to empty fields.
from redux-framework.
@teamcrisis
With 1, is that for Google Fonts or non?
2. I'll get on it.
from redux-framework.
@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.
@dovy it appears to be only for non-google fonts
from redux-framework.
@dovy, hmm...I'm using the sample included with v3. So this is wrong then?
from redux-framework.
@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.
@teamcrisis OOPS. I see the issue. There was legacy redux code in there! Please use my example above.
from redux-framework.
@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.
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.
@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.
@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.
@teamcrisis You have skype or gchat or something?
info AT simplerain DOT com
from redux-framework.
@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.
@dovy I sent you gchat (hangouts) message at that email
from redux-framework.
@teamcrisis Heh, now i'm waiting for you to authorise it.
from redux-framework.
Related Issues (20)
- Problems with $args used as array and string in class Redux_WordPress_Data when you call a callback
- How to update ROOM HEADER SLIDER images? HOT 2
- I cannot change some elements on my PREMIEX theme, as pictures or sliders HOT 2
- Error in contact form HOT 1
- File Permission Issues We were unable to modify required files. Please ensure that /home/fitmaple/moccotheme.com/www/wp-content//uploads/ has the proper read-write permissions, or modify your wp-config.php file to contain your FTP login credentials as outlined here.. HOT 2
- Push Metabox field dynamically HOT 2
- Multilingual social media profiles HOT 1
- Check for object before assigning
- cannot click on pages HOT 1
- Can't change the home screen logo and colours of the theme HOT 1
- Unable to add variable products from woocommerce to my cart
- v4.4.10 - Undefined Variable $return in class-redux-filesystem.php
- Thecappa Theme - Animations can't be turned off HOT 1
- 4.4.10 Redux Upgrade - Fatal error HOT 1
- How to set default values for typography field with Redux::set_option? HOT 1
- change redux default values on child theme HOT 4
- Warning count display Nan on left side for color menu HOT 1
- Attribute not working with text field HOT 4
- WordPress Backend is buggy HOT 6
- Backend is buggy- No Field ID is set HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-framework.