Created
March 14, 2013 20:53
-
-
Save blobaugh/5165142 to your computer and use it in GitHub Desktop.
Original options.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Grab the original options.php file | |
require_once( WOT_PLUGIN_DIR . '3rd-party/options.php' ); | |
add_filter( 'wot_options_page', 'wot_theme_add_options' ); | |
/** | |
* Add any custom fields that are required to the options framework | |
* | |
* See this page for a list of available elements | |
* | |
* @param Array $options - Any existing options in the framework | |
* @return Array | |
*/ | |
function wot_theme_add_options( $options ) { | |
/** | |
* THESE FIELDS ARE PROVIDED FOR REFERENCE ONLY. PLEASE REMOVE AND REPLACE | |
* WITH YOUR PROJECT OPTIONS | |
*/ | |
$options[] = array( | |
'name' => __('Basic Settings', 'options_check'), | |
'type' => 'heading'); | |
/** | |
* For $settings options see: | |
* http://codex.wordpress.org/Function_Reference/wp_editor | |
* | |
* 'media_buttons' are not supported as there is no post to attach items to | |
* 'textarea_name' is set by the 'id' you choose | |
*/ | |
$wp_editor_settings = array( | |
'wpautop' => true, // Default | |
'textarea_rows' => 5, | |
'tinymce' => array( 'plugins' => 'wordpress' ) | |
); | |
$options[] = array( | |
'name' => __('Default Text Editor', 'options_check'), | |
'desc' => sprintf( __( 'You can also pass settings to the editor. Read more about wp_editor in <a href="%1$s" target="_blank">the WordPress codex</a>', 'options_check' ), 'http://codex.wordpress.org/Function_Reference/wp_editor' ), | |
'id' => 'example_editor', | |
'type' => 'editor', | |
'settings' => $wp_editor_settings ); | |
return $options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment