Changeset 504586
- Timestamp:
- 02/14/2012 02:13:26 AM (14 years ago)
- Location:
- custom-options
- Files:
-
- 3 edited
-
tags/1.2/custom-options.php (modified) (1 diff)
-
trunk/custom-options.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
custom-options/tags/1.2/custom-options.php
r504565 r504586 3 3 Plugin Name: Custom Options 4 4 Plugin URI: http://jacobgsp.com/wordpress/ 5 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 ] )`. Very simple, yet efficient.5 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 ] )`. Very simple, yet efficient. 6 6 Version: 1.2 7 7 Author: Jacob Guite-St-Pierre -
custom-options/trunk/custom-options.php
r504565 r504586 3 3 Plugin Name: Custom Options 4 4 Plugin URI: http://jacobgsp.com/wordpress/ 5 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 ] )`. Very simple, yet efficient.5 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 ] )`. Very simple, yet efficient. 6 6 Version: 1.2 7 7 Author: Jacob Guite-St-Pierre … … 78 78 <div class="metabox-prefs"> 79 79 <p> 80 To use a Custom Option, use the function <em>string get_custom_option ( $slug [, $default_value, $field ] )</em> in your theme.<br />80 To use a Custom Option, use the function <em>string get_custom_option ( $slug [, $default_value, $field ] )</em> in your theme.<br /> 81 81 The <em>$default_value</em> parameter is optional, but will be used if the specified option cannot be found.<br /> 82 82 The <em>$field</em> parameter is optional, but if specified <em>label</em> it will return the option label.<br /> -
custom-options/trunk/readme.txt
r504568 r504586 12 12 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: 13 13 14 `get_custom_option ( $slug [, $default_value, $field ] )`14 `get_custom_option ( $slug [, $default_value, $field ] )` 15 15 16 16 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: 17 17 18 `function custom_options_capability ($capability) {18 `function custom_options_capability ($capability) { 19 19 return 'publish_pages'; 20 20 } 21 add_filter ('gsp_custom_options_capability', 'custom_options_capability');`21 add_filter ( 'gsp_custom_options_capability', 'custom_options_capability' );` 22 22 23 23 Very simple, yet efficient.
Note: See TracChangeset
for help on using the changeset viewer.