Exemple #1
0
        echo select_html('category', $parent[1]);
        ?>
								</select>
								</div>
								<div style="float: right; width: 50%;">
									<label><?php 
        _e('Select subcategory', OP_SN);
        ?>
</label>
									<p><?php 
        _e('Select subcategory to nest this content under', OP_SN);
        ?>
</p>
									<select name="op[content][subcategory]" id="op_subcategory_id">
									<?php 
        echo select_html('subcategory', $parent[2]);
        ?>
								</select>
								</div>
								<div style="clear: both;"></div>
								<label><?php 
        _e('Content naming', OP_SN);
        ?>
</label>
								<p><?php 
        _e('Enter the title for the content', OP_SN);
        ?>
</p>
								<input id="opContentName" type="text" name="op[content][name]"
									value="<?php 
        echo $post->post_title;
function select_hour($datetime, $options = array())
{
    $selected = get_class($datetime) == 'SDateTime' ? $datetime->hour : $datetime;
    $hourOptions = numerical_options(0, 23, $selected);
    if (!isset($options['field_name'])) {
        $options['field_name'] = 'hour';
    }
    return select_html($options['field_name'], $hourOptions, $options);
}