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
<?php | |
/** | |
* Displays metabox content | |
* | |
* Displays metabox content based on the metabox array, usually set in the | |
* theme's functions.php file. | |
* | |
* @since 1.0 | |
* @param array $post The current post object. |
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
<?php | |
class THTK_Form_Input { | |
// Sets default form element properties | |
public $defaults = array( | |
'id' => '', // Unique ID for this option | |
'class' => '', // Optional CSS classes for input | |
'title' => '', // The content to display as the input title/label | |
'value' => '', // The option value |
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
/** | |
* Defines metabox arrays | |
*/ | |
function thtk_example_metaboxes() { | |
// Defines $prefix. Should begin with an underscore unless you want fields to be doubled in the Custom Fields editor. | |
$prefix = '_example_'; | |
// Defines metabox array. | |
$meta_boxes[] = array( |
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
/** | |
* Gets the metaboxes array from the theme | |
* | |
* Provides a filter that is used by the theme to pass the metabox details | |
* array to the Theme Toolkit for processing. | |
* | |
* @since 1.0 | |
* @param array $thtk_metaboxes Array of metaboxes (empty by default). | |
* @return array Metaboxes array, usually defined in the theme's functions.php file. | |
*/ |