当前位置: 首页>>代码示例>>PHP>>正文


PHP BYT_Theme_Utils::get_days_of_week方法代码示例

本文整理汇总了PHP中BYT_Theme_Utils::get_days_of_week方法的典型用法代码示例。如果您正苦于以下问题:PHP BYT_Theme_Utils::get_days_of_week方法的具体用法?PHP BYT_Theme_Utils::get_days_of_week怎么用?PHP BYT_Theme_Utils::get_days_of_week使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BYT_Theme_Utils的用法示例。


在下文中一共展示了BYT_Theme_Utils::get_days_of_week方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_type_day_of_week_day

 public function get_type_day_of_week_day()
 {
     $day_of_week_index = $this->get_type_day_of_week_index();
     $days_of_week = BYT_Theme_Utils::get_days_of_week();
     if ($day_of_week_index > -1) {
         return $days_of_week[$day_of_week_index];
     }
     return '';
 }
开发者ID:alikris,项目名称:OTA,代码行数:9,代码来源:tour.class.php

示例2: cruise_type_edit_meta_fields

    function cruise_type_edit_meta_fields($term)
    {
        $days_of_week = BYT_Theme_Utils::get_days_of_week();
        // put the term ID into a variable
        $t_id = $term->term_id;
        // retrieve the existing value(s) for this meta field. This returns an array
        $term_meta = get_option("taxonomy_{$t_id}");
        ?>
		<tr class="form-field">
			<th scope="row" valign="top"><label for="term_meta[cruise_type_is_repeated]"><?php 
        _e('Is cruise repeated?', 'bookyourtravel');
        ?>
</label></th>
			<td>
				<select id="term_meta[cruise_type_is_repeated]" name="term_meta[cruise_type_is_repeated]" onchange="isCruiseTypeRepeatedChanged('table-row')">
					<option <?php 
        echo (int) $term_meta['cruise_type_is_repeated'] == 0 ? 'selected' : '';
        ?>
 value="0"><?php 
        _e('No', 'bookyourtravel');
        ?>
</option>
					<option <?php 
        echo (int) $term_meta['cruise_type_is_repeated'] == 1 ? 'selected' : '';
        ?>
 value="1"><?php 
        _e('Daily', 'bookyourtravel');
        ?>
</option>
					<option <?php 
        echo (int) $term_meta['cruise_type_is_repeated'] == 2 ? 'selected' : '';
        ?>
 value="2"><?php 
        _e('Weekdays', 'bookyourtravel');
        ?>
</option>
					<option <?php 
        echo (int) $term_meta['cruise_type_is_repeated'] == 3 ? 'selected' : '';
        ?>
 value="3"><?php 
        _e('Weekly', 'bookyourtravel');
        ?>
</option>
				</select>
				<p class="description"><?php 
        _e('Do cruises belonging to this cruise type repeat on a daily or weekly basis?', 'bookyourtravel');
        ?>
</p>
			</td>
		</tr>
		<tr id="tr_cruise_type_day_of_week" class="form-field" style="<?php 
        echo (int) $term_meta['cruise_type_is_repeated'] < 3 ? 'display:none' : '';
        ?>
">
			<th scope="row" valign="top"><label for="term_meta[cruise_type_day_of_week]"><?php 
        _e('Start day (if weekly)', 'bookyourtravel');
        ?>
</label></th>
			<td>
				<select id="term_meta[cruise_type_day_of_week]" name="term_meta[cruise_type_day_of_week]">
				  <?php 
        for ($i = 0; $i < count($days_of_week); $i++) {
            $day_of_week = $days_of_week[$i];
            ?>
				  <option <?php 
            echo (int) $term_meta['cruise_type_day_of_week'] == $i ? 'selected' : '';
            ?>
 value="<?php 
            echo esc_attr($i);
            ?>
"><?php 
            echo $day_of_week;
            ?>
</option>
				  <?php 
        }
        ?>
				</select>	
				<p class="description"><?php 
        _e('Select a start day of the week for weekly cruise', 'bookyourtravel');
        ?>
</p>
			</td>
		</tr>
	<?php 
    }
开发者ID:alikris,项目名称:OTA,代码行数:86,代码来源:cruises.php


注:本文中的BYT_Theme_Utils::get_days_of_week方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。