{"id":16589,"date":"2012-01-24T04:42:14","date_gmt":"2012-01-24T04:42:14","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-options\/"},"modified":"2012-02-14T02:13:26","modified_gmt":"2012-02-14T02:13:26","slug":"custom-options","status":"closed","type":"plugin","link":"https:\/\/tw.wordpress.org\/plugins\/custom-options\/","author":7823043,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.2","stable_tag":"trunk","tested":"3.3.2","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"Custom Options","header_author":"Jacob Guite-St-Pierre","header_description":"","assets_banners_color":"","last_updated":"2012-02-14 02:13:26","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/jacobgsp.com\/wordpress\/","header_author_uri":"http:\/\/jacobgsp.com","rating":1,"author_block_rating":0,"active_installs":90,"downloads":3256,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":"1","2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1538987","resolution":"1","location":"plugin"}},"screenshots":{"1":"Administration view"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[2218,1253],"plugin_category":[],"plugin_contributors":[86413],"plugin_business_model":[],"class_list":["post-16589","plugin","type-plugin","status-closed","hentry","plugin_tags-options","plugin_tags-settings","plugin_contributors-jacobgsp","plugin_committers-jacobgsp"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/custom-options.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/custom-options\/trunk\/screenshot-1.png?rev=1538987","caption":"Administration view"}],"raw_content":"<!--section=description-->\n<p>Allows you to create custom options that you can easily update via the <code>Options<\/code> administration panel and also allows you to use mentioned options in your theme using a simple PHP function:<\/p>\n\n<pre><code>get_custom_option ( $slug [, $default_value, $field ] )\n<\/code><\/pre>\n\n<p>By default, only Administrators can change Custom Options, however you can use the filter <code>gsp_custom_options_capability<\/code> to change that. For example, if you wish to allow Editors to use Custom Options you can add this to your functions.php file:<\/p>\n\n<pre><code>function custom_options_capability ($capability) {\n    return 'publish_pages';\n}\nadd_filter ( 'gsp_custom_options_capability', 'custom_options_capability' );\n<\/code><\/pre>\n\n<p>Very simple, yet efficient.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the folder <code>custom-options<\/code> to the <code>\/wp-content\/plugins\/<\/code> directory<\/li>\n<li>Activate the plugin through the <code>Plugins<\/code> menu in WordPress<\/li>\n<li>Update the plugin through the <code>Options<\/code> menu in WordPress<\/li>\n<li>Use Custom Options in your theme through the PHP function <code>get_custom_option( $slug, $default_value )<\/code><\/li>\n<li>Don't forget to precede the function by an <code>echo<\/code> if you want to output it<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt>What's the difference between Custom Options and your old plugin Custom Configs\/Settings?<\/dt>\n<dd><p>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.<\/p><\/dd>\n<dt>Is Custom Options backward compatible with Custom Configs\/Settings?<\/dt>\n<dd><p>No.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2<\/h4>\n\n<ul>\n<li>Added the filter <code>gsp_custom_options_capability<\/code> to customize what capability has access to Custom Options.<\/li>\n<\/ul>\n\n<h4>1.1<\/h4>\n\n<ul>\n<li>Added the field parameter. The function can now receive a new optional parameter: $field which defaults to <code>value<\/code> and if set to <code>label<\/code> will display the title of label of the custom option. As requested by <code>Jam Tin<\/code> on the forums.<\/li>\n<\/ul>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>First stable version<\/li>\n<\/ul>","raw_excerpt":"Quickly create, manage and use custom options in your themes!","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/16589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=16589"}],"author":[{"embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/jacobgsp"}],"wp:attachment":[{"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=16589"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=16589"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=16589"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=16589"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=16589"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tw.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=16589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}