Plugin Directory

Changeset 504586


Ignore:
Timestamp:
02/14/2012 02:13:26 AM (14 years ago)
Author:
jacobgsp
Message:
 
Location:
custom-options
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • custom-options/tags/1.2/custom-options.php

    r504565 r504586  
    33Plugin Name: Custom Options
    44Plugin 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.
     5Description: 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.
    66Version: 1.2
    77Author: Jacob Guite-St-Pierre
  • custom-options/trunk/custom-options.php

    r504565 r504586  
    33Plugin Name: Custom Options
    44Plugin 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.
     5Description: 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.
    66Version: 1.2
    77Author: Jacob Guite-St-Pierre
     
    7878        <div class="metabox-prefs">
    7979            <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 />
    8181                The <em>$default_value</em> parameter is optional, but will be used if the specified option cannot be found.<br />
    8282                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  
    1212Allows 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:
    1313
    14 `get_custom_option( $slug [, $default_value, $field ] )`
     14`get_custom_option ( $slug [, $default_value, $field ] )`
    1515
    1616By 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:
    1717
    18 `function custom_options_capability($capability) {
     18`function custom_options_capability ($capability) {
    1919    return 'publish_pages';
    2020}
    21 add_filter('gsp_custom_options_capability', 'custom_options_capability');`
     21add_filter ( 'gsp_custom_options_capability', 'custom_options_capability' );`
    2222
    2323Very simple, yet efficient.
Note: See TracChangeset for help on using the changeset viewer.