Giter Site home page Giter Site logo

Comments (3)

geotonics avatar geotonics commented on June 24, 2024

WordPress_Plugin_Template_Settings has settings which are automatically added to the settings array by the settings_fields() function, These settings are only examples. You will need to edit that function to create the setting fields that will work for your plugin.

from wordpress-plugin-template.

nine-2-five avatar nine-2-five commented on June 24, 2024

Yeah I created the new settings fields, and they save to db ok. But I don't know whether there's a simpler way than get_option('prefix_fieldnam') for each field.
Is it possible to get an array of all the settings at once?

from wordpress-plugin-template.

geotonics avatar geotonics commented on June 24, 2024

You can get all options with https://codex.wordpress.org/Function_Reference/wp_load_alloptions
but I don't know of any built in way to get all options for one plugin.
You could create your own function to limit the results to certain options by copying that function, renaming the copy, and modifying the query. .

from wordpress-plugin-template.

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.