Custom Options
Quickly create, manage and use custom options in your themes!
Plugin info
Maintenance & Compatibility
Maintenance score
Possibly abandoned • Last updated 5070 days ago • 1 reviews
Is Custom Options abandoned?
Possibly abandoned (last update 5070 days ago).
Compatibility
Similar & Alternatives
Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.
Description
Allows you to create custom options that you can easily update via the Options administration panel and also allows you to use mentioned options in your theme using a simple PHP function:
get_custom_option ( $slug [, $default_value, $field ] )
By default, only Administrators can change Custom Options, however you can use the filter gsp_custom_options_capability to change that. For example, if you wish to allow Editors to use Custom Options you can add this to your functions.php file:
function custom_options_capability ($capability) {
return 'publish_pages';
}
add_filter ( 'gsp_custom_options_capability', 'custom_options_capability' );
Very simple, yet efficient.
Installation
- Upload the folder
custom-optionsto the/wp-content/plugins/directory - Activate the plugin through the
Pluginsmenu in WordPress - Update the plugin through the
Optionsmenu in WordPress - Use Custom Options in your theme through the PHP function
get_custom_option( $slug, $default_value ) - Don’t forget to precede the function by an
echoif you want to output it
Frequently Asked Questions
What’s the difference between Custom Options and your old plugin Custom Configs/Settings?
From a user’s point of view, nothing. However, from a developer’s point of view, this new plugin is somewhat cleaner. Options are now saved in a serialized array in the WordPress options table.
Is Custom Options backward compatible with Custom Configs/Settings?
No.
Review feed
Changelog
1.2
- Added the filter
gsp_custom_options_capabilityto customize what capability has access to Custom Options.
1.1
- Added the field parameter. The function can now receive a new optional parameter: $field which defaults to
valueand if set tolabelwill display the title of label of the custom option. As requested byJam Tinon the forums.
1.0
- First stable version
