GithubHelp home page GithubHelp logo

Comments (4)

kprovance avatar kprovance commented on June 11, 2024

Don't use redux/options/{opt_name}/reset

For 'Reset All', use redux/validate/{opt_name}/defaults
For 'Reset Section', use redux/validate/{opt_name}/defaults_section

Those are the two I used with Social Profiles when needed to manipulate data via the reset buttons.

from redux-framework.

mbtocalli avatar mbtocalli commented on June 11, 2024

Hi Kevin, thanks a lot for you reply

I used this code on functions.php of my child theme, using the filter hooks you suggested:

function child_update_redux_option_manually() {
    $opt_name = 'redux_mytheme';
    Redux::set_option($opt_name, 'global-container', 'container-fluid');
}
add_filter('redux/validate/redux_mytheme/defaults', 'child_update_redux_option_manually');

When i click on "Reset All", the 'global-container' field keeps showing the value defined in the parent theme instead of the one defined by Redux::set_option

I'm doing something wrong?

from redux-framework.

kprovance avatar kprovance commented on June 11, 2024

I used the exact same hook in my theme's child theme, and it worked fine.

image
image
image

I couldn't speculate why it's not working in your case, as I do not have access to the parent theme, nor do I know how the original author used Redux. Such a thing does not fall under free support, debugging someone else's code. Sorry.

from redux-framework.

mbtocalli avatar mbtocalli commented on June 11, 2024

Kevin, is good to know the code should be working.
I'm on a Wordpress Multisite install, maybe that is affecting somehow. I will try it on a single install environment and will let you know. Thanks for you support, really really appreciate 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.