Skip to content

Instantly share code, notes, and snippets.

@wpmark
Created January 6, 2015 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpmark/d8fe841d81cb5547baa4 to your computer and use it in GitHub Desktop.
Save wpmark/d8fe841d81cb5547baa4 to your computer and use it in GitHub Desktop.
Add options with the of_options Options Framework Filter
/**
* function spts_site_options()
* sets the options which appear on the theme options page under
* appearance in the dashboard.
* for a detailed list of all the example options that can be used here see
* https://github.com/devinsays/options-framework-plugin/blob/master/options-check/options.php
* @param (array) $options an array of options to filter
* @filtered $of_options
* @return (array) $options to new array of options to use
*/
function spts_site_options( $options ) {
/*************************************************************
* basic options/settings tab
*************************************************************/
/* add the tab heading */
$options[] = array(
'name' => __( 'Basic Settings', 'senpar' ),
'type' => 'heading'
);
/* return our new options array of options settings */
return $options;
}
add_filter( 'of_options', 'spts_site_options', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment