This file contains hidden or 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
class THTK_Form_Input { | |
// Sets default form element properties | |
public $defaults = array( | |
'id' => '', // Unique element ID. | |
'class' => '', // Optional. CSS class names. | |
'title' => '', // Text to display as the input title/label. | |
'value' => '', // Optional. The value of the input field. | |
'desc' => '', // Optional. Description of form element. | |
'size' => 'default', // The size of the input (small, default, large; default: default). |
This file contains hidden or 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
/** | |
* Adds a meta box to the post editing screen | |
*/ | |
function example_custom_meta() { | |
add_meta_box( 'example_meta', 'Example Title', 'example_meta_callback', 'post' ); | |
} // end example_custom_meta() | |
add_action( 'add_meta_boxes', 'example_custom_meta' ); | |
This file contains hidden or 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
/** | |
* This assumes that the default search form is being used within an element | |
* with an ID of "Masthead" and that there is a menu with an ID of | |
* "site-navigation" that is toggled off when the search form is toggled on. | |
*/ | |
jQuery( document ).ready(function( $ ) { | |
// Handles the focus of the search field in the header. | |
$( "#masthead .search-field" ).focus(function() { |