[ XREF Home ] [ Index ]

PHP Cross Reference of WordPress Trunk

Provided by Yoast

title

Body

[close]

/wp-content/themes/twentyeleven/inc/ -> theme-options.php (summary)

Twenty Eleven Theme Options

File Size: 361 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 13 functions

  twentyeleven_admin_enqueue_scripts()
  twentyeleven_theme_options_init()
  twentyeleven_option_page_capability()
  twentyeleven_theme_options_add_page()
  twentyeleven_color_schemes()
  twentyeleven_layouts()
  twentyeleven_get_default_theme_options()
  twentyeleven_get_theme_options()
  theme_options_render_page()
  twentyeleven_theme_options_validate()
  twentyeleven_enqueue_color_scheme()
  twentyeleven_print_link_color_style()
  twentyeleven_layout_classes()

Functions
Functions that are not part of a class:

twentyeleven_admin_enqueue_scripts( $hook_suffix )   X-Ref
Properly enqueue styles and scripts for our theme options page.

This function is attached to the admin_enqueue_scripts action hook.

param: string $hook_suffix The action passes the current page to the function. We don't

twentyeleven_theme_options_init()   X-Ref
Register the form setting for our twentyeleven_options array.

This function is attached to the admin_init action hook.

This call to register_setting() registers a validation callback, twentyeleven_theme_options_validate(),
which is used when the option is saved, to ensure that our option values are complete, properly
formatted, and safe.

We also use this function to add our theme option if it doesn't already exist.


twentyeleven_option_page_capability( $capability )   X-Ref
Change the capability required to save the 'twentyeleven_options' options group.

param: string $capability The capability used for the page, which is manage_options by default.
return: string The capability to actually use.

twentyeleven_theme_options_add_page()   X-Ref
Add our theme options page to the admin menu.

This function is attached to the admin_menu action hook.


twentyeleven_color_schemes()   X-Ref
Returns an array of color schemes registered for Twenty Eleven.


twentyeleven_layouts()   X-Ref
Returns an array of layout options registered for Twenty Eleven.


twentyeleven_get_default_theme_options()   X-Ref
Returns the default options for Twenty Eleven.


twentyeleven_get_theme_options()   X-Ref
Returns the options array for Twenty Eleven.


theme_options_render_page()   X-Ref
Returns the options array for Twenty Eleven.


twentyeleven_theme_options_validate( $input )   X-Ref
Sanitize and validate form input. Accepts an array, return a sanitized array.


twentyeleven_enqueue_color_scheme()   X-Ref
Enqueue the styles for the current color scheme.


twentyeleven_print_link_color_style()   X-Ref
Add a style block to the theme for the current link color.

This function is attached to the wp_head action hook.


twentyeleven_layout_classes( $existing_classes )   X-Ref
Adds Twenty Eleven layout classes to the array of body classes.




Generated: Wed Jun 1 08:30:02 2011 Cross-referenced by PHPXref 0.7
Provided by Yoast and awesome WordPress Hosting