Comments (3)
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.
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.
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)
- Register Setting validation not working. HOT 1
- Duplicated update_post_meta in multi-instances of the boilerplate
- checkbox default 'on' not working HOT 2
- proposal for a universal uninstall script to clean up after plugin is deleted HOT 2
- build-plugin script should rename settings base prefix HOT 1
- Installer error: "fatal: Too many arguments." HOT 2
- PHP-codesniffer says: use a nonce on the tabbed settings. HOT 2
- Implement namespaces and autoloading
- Fatal Error: Cannot access private property $admin in class-wordpress-plugin-template-settings.php on line 367 HOT 1
- Sanitize tabs HOT 3
- How to display html on external pages of the site? HOT 2
- How to display html on external pages of the site? HOT 5
- Options prefix should be set at install script HOT 1
- Dynamically populate multi-select? HOT 1
- Test develop branch HOT 13
- Wordpress guidelines compliance issues HOT 2
- Allow people to use this repo as a template repository HOT 3
- Settings
- Custom Post Type $args, Taxonomy $args HOT 1
- Validation callback example
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 wordpress-plugin-template.