本文整理汇总了PHP中EEH_Form_Fields::prep_answer_options方法的典型用法代码示例。如果您正苦于以下问题:PHP EEH_Form_Fields::prep_answer_options方法的具体用法?PHP EEH_Form_Fields::prep_answer_options怎么用?PHP EEH_Form_Fields::prep_answer_options使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EEH_Form_Fields
的用法示例。
在下文中一共展示了EEH_Form_Fields::prep_answer_options方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: next_decade_two_digit_year_dropdown_options
/**
* generates a year dropdown selector with numbers for the next ten years
* @return object
*/
public static function next_decade_two_digit_year_dropdown_options()
{
$options = array();
$current_year = date('y');
$next_decade = $current_year + 10;
for ($x = $current_year; $x <= $next_decade; $x++) {
$yy = str_pad($x, 2, '0', STR_PAD_LEFT);
$options[(string) $yy] = (string) $yy;
}
return EEH_Form_Fields::prep_answer_options($options);
}
示例2: __
<?php
$values = EEH_Form_Fields::prep_answer_options(array(array('id' => 1, 'text' => __('Yes', 'event_espresso')), array('id' => 0, 'text' => __('No', 'event_espresso'))));
$description = EEH_Form_Fields::prep_answer_options(array(array('id' => 0, 'text' => __('none', 'event_espresso')), array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')), array('id' => 2, 'text' => __('full description', 'event_espresso'))));
add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
EE_Registry::instance()->load_helper('Event_View');
EE_Registry::instance()->load_helper('Form_Fields');
?>
<!--************************* Event Listings ****************************-->
<h2 class="ee-admin-settings-hdr">
<?php
_e('Event List Pages', 'event_espresso');
?>
<?php
//echo EEH_Template::get_help_tab_link('event_list_settings_info');
?>
</h2>
<table class="form-table">
<tbody>
<tr>
<th>
<label for="event_listings_url">
<?php
_e('Event Listings URL', 'event_espresso');
?>
<?php
echo EEH_Template::get_help_tab_link('event_listings_url_info');
?>
示例3: add_filter
<?php
add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
$values = EEH_Form_Fields::prep_answer_options(array(array('id' => 1, 'text' => __('Yes', 'event_espresso')), array('id' => 0, 'text' => __('No', 'event_espresso'))));
?>
<!--************************* Event Single ****************************-->
<h2 class="ee-admin-settings-hdr">
<?php
_e('Single Event Pages', 'event_espresso');
?>
<?php
//echo EEH_Template::get_help_tab_link('event_single_settings_info');
?>
</h2>
<table class="form-table">
<tbody>
<tr>
<th>
<label for="display_status_banner_single">
<?php
_e('Display Status Banner', 'event_espresso');
?>
</label>
</th>
<td>
<?php
echo EEH_Form_Fields::select('display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single');
?>
<p class="description"><?php