Osclass是一个非常好的工具,但我遇到了一些问题。
我有这段代码:
<div class="cell selector">
<?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>
</div>
并且此代码呈现此HTML:
<div class="cell selector">
<div class="select-box undefined"><select name="sCategory" id="sCategory" style="opacity: 0;"><option value="">Select a category</option><option value="98">Key West</option><option value="101"> Miami</option><option value="99">Italy</option><option value="102"> Rome</option><option value="97">Madives</option><option value="96">France</option><option value="4">United States</option><option value="43"> Houses - Apartments for Sale</option><option value="44"> Houses - Apartments for Rent</option><option value="45"> Rooms for Rent - Shared</option><option value="46"> Housing Swap</option><option value="47"> Vacation Rentals</option><option value="48"> Parking Spots</option><option value="49"> Land</option><option value="50"> Office - Commercial Space</option><option value="51"> Shops for Rent - Sale</option></select><a href="#" class="select-box-trigger"><span class="select-box-label">Select a category</span><span class="select-box-icon">0</span></a></div> </div>
所以你可以看到我无法控制:<?php osc_categories_select('sCategory', null, __('Select country/city', 'bender')) ; ?>
我如何以及在哪里可以更改此内容?我需要放我的课,因为我想创建一个新风格的新主题?有人知道吗?
答案 0 :(得分:0)
这应该是oc-includes&gt; osclass&gt; fm&gt; Category.form.class.php
下:
static public function category_select($categories, $category, $default_item = null, $name = "sCategory")
{
echo '<select name="' . $name . '" id="' . $name . '">';
if(isset($default_item)) {
echo '<option value="">' . $default_item . '</option>';
}
foreach($categories as $c) {
echo '<option value="' . $c['pk_i_id'] . '"' . ( ($category['pk_i_id'] == $c['pk_i_id']) ? 'selected="selected"' : '' ) . '>' . $c['s_name'] . '</option>';
if(isset($c['categories']) && is_array($c['categories'])) {
CategoryForm::subcategory_select($c['categories'], $category, $default_item, 1);
}
}
echo '</select>';
}