本文整理汇总了PHP中osc_count_categories函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_count_categories函数的具体用法?PHP osc_count_categories怎么用?PHP osc_count_categories使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_count_categories函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chosen_select_optgroup
function chosen_select_optgroup()
{
View::newInstance()->_exportVariableToView('categories', Category::newInstance()->toTree());
if (osc_count_categories() > 0) {
echo '<select name="sCategory" data-placeholder="' . __('Select a category...', 'twitter') . '" style="width: auto;" class="chzn-select"">';
echo '<option></option>';
while (osc_has_categories()) {
echo '<optgroup label="' . osc_category_name() . '">';
if (osc_count_subcategories() > 0) {
while (osc_has_subcategories()) {
echo '<option value="' . osc_category_name() . '">' . osc_category_name() . '</option>';
}
}
echo '</optgroup>';
}
echo '</select>';
}
View::newInstance()->_erase('categories');
}
示例2: _e
<div class="section">
<div class="maincategory">
<div class="container">
<div class="row"><h3><?php
_e('Categories', 'flatter');
?>
</h3></div>
<div class="row mc wow fadeInUp animated clearfix">
<?php
// RESET CATEGORIES IF WE USED THEN IN THE HEADER
?>
<?php
osc_goto_first_category();
?>
<?php
if (osc_count_categories() >= 0) {
?>
<?php
while (osc_has_categories()) {
?>
<div class="col-md-3 col-sm-4 col-xs-6 cating">
<div class="catsingle">
<div class="pull-left">
<i class="<?php
echo osc_esc_html(osc_get_preference('cat_icon_' . osc_category_id(), 'flatter_theme'));
?>
fa-2x"></i>
</div>
<div class="category">
<a class="<?php
echo osc_category_slug();
示例3: osc_search_pattern
echo osc_search_pattern();
?>
" />
</div>
<div class="row one_input">
<h6><?php
_e('City', 'masjob');
?>
</h6>
<input type="text" id="sCity" name="sCity" value="<?php
echo osc_search_city();
?>
" />
</div>
<?php
if (osc_count_categories()) {
?>
<div class="row checkboxes">
<h6><?php
_e('Areas', 'masjob');
?>
</h6>
<ul>
<?php
// RESET CATEGORIES IF WE USED THEN IN THE HEADER
?>
<?php
osc_goto_first_category();
?>
<?php
while (osc_has_categories()) {
示例4: pop_draw_categories_list
function pop_draw_categories_list()
{
?>
<?php
if (!osc_is_home_page()) {
echo '<div class="resp-wrapper">';
}
?>
<?php
//cell_3
$total_categories = osc_count_categories();
$col1_max_cat = ceil($total_categories / 3);
osc_goto_first_category();
$i = 0;
while (osc_has_categories()) {
?>
<?php
if ($i % $col1_max_cat == 0) {
if ($i > 0) {
echo '</div>';
}
if ($i == 0) {
echo '<div class="cell_3 first_cel">';
} else {
echo '<div class="cell_3">';
}
}
?>
<ul class="r-list">
<li>
<h1>
<?php
$_slug = osc_category_slug();
$_url = osc_search_category_url();
$_name = osc_category_name();
$_total_items = osc_category_total_items();
if (osc_count_subcategories() > 0) {
?>
<span class="collapse resp-toogle"><i class="fa fa-caret-right fa-lg"></i></span>
<?php
}
?>
<?php
if ($_total_items > 0) {
?>
<a class="category <?php
echo $_slug;
?>
" href="<?php
echo $_url;
?>
"><?php
echo $_name;
?>
</a> <span>(<?php
echo $_total_items;
?>
)</span>
<?php
} else {
?>
<a class="category <?php
echo $_slug;
?>
" href="#"><?php
echo $_name;
?>
</a> <span>(<?php
echo $_total_items;
?>
)</span>
<?php
}
?>
</h1>
<?php
if (osc_count_subcategories() > 0) {
?>
<ul>
<?php
while (osc_has_subcategories()) {
?>
<li>
<?php
if (osc_category_total_items() > 0) {
?>
<a class="category sub-category <?php
echo osc_category_slug();
?>
" href="<?php
echo osc_search_category_url();
?>
"><?php
echo osc_category_name();
?>
</a> <span>(<?php
echo osc_category_total_items();
?>
)</span>
<?php
//.........这里部分代码省略.........
示例5: osclasswizards_draw_categories_list
function osclasswizards_draw_categories_list()
{
if (!osc_is_home_page()) {
echo '<div class="resp-wrapper">';
}
?>
<h1 class="title"><?php
_e('Categories', OSCLASSWIZARDS_THEME_FOLDER);
?>
</h1>
<div class="row">
<?php
$total_categories = osc_count_categories();
$col1_max_cat = ceil($total_categories / 1);
osc_goto_first_category();
$catcount = 0;
while (osc_has_categories()) {
?>
<ul class="col-sm-6 col-md-3 grid_list">
<li>
<section class="listings">
<h2><i class="fa fa-<?php
echo osclasswizards_category_icon(osc_category_id());
?>
"></i>
<?php
$_slug = osc_category_slug();
$_url = osc_search_category_url();
$_name = osc_category_name();
$_total_items = osc_category_total_items();
if (osc_count_subcategories() > 0) {
?>
<?php
}
?>
<?php
if ($_total_items > 0) {
?>
<a class="category <?php
echo $_slug;
?>
" href="<?php
echo $_url;
?>
"><?php
echo $_name;
?>
</a> <span><?php
echo $_total_items;
?>
</span>
<?php
} else {
?>
<a class="category <?php
echo $_slug;
?>
" href="#"><?php
echo $_name;
?>
</a> <span><?php
echo $_total_items;
?>
</span>
<?php
}
?>
</h2>
<?php
if (osc_count_subcategories() > 0) {
$m = 1;
?>
<ul>
<?php
while (osc_has_subcategories()) {
if ($m <= osc_get_preference('sub_cat_limit', 'osclasswizards_theme')) {
?>
<li>
<?php
if (osc_category_total_items() > 0) {
?>
<a class="category sub-category <?php
echo osc_category_slug();
?>
" href="<?php
echo osc_search_category_url();
?>
"><?php
echo osc_category_name();
?>
</a> <span>(<?php
echo osc_category_total_items();
?>
)</span>
<?php
} else {
?>
<a class="category sub-category <?php
echo osc_category_slug();
//.........这里部分代码省略.........
示例6: _e
</div>
<section class="categories">
<div class="container text-center">
<div>
<h1 class="title">
<?php
_e('Categories', 'pop');
?>
</h1>
</div>
<?php
//cell_3
$total_categories = osc_count_categories();
$col1_max_cat = ceil($total_categories / 1);
osc_goto_first_category();
$i = 0;
$catcount = 0;
while (osc_has_categories()) {
$catcount++;
?>
<div class="category-card">
<?php
$_slug = osc_category_slug();
$_url = osc_search_category_url();
$_name = osc_category_name();
$_total_items = osc_category_total_items();
?>
<a href="<?php
示例7: osclasswizards_draw_categories_list
function osclasswizards_draw_categories_list()
{
if (!osc_is_home_page()) {
echo '<div class="resp-wrapper">';
}
?>
<h1 class="title">
<?php
_e("Categories", 'osclasswizards');
?>
</h1>
<?php
//cell_3
$total_categories = osc_count_categories();
$col1_max_cat = ceil($total_categories / 1);
osc_goto_first_category();
$i = 0;
$catcount = 0;
while (osc_has_categories()) {
$catcount++;
if ($catcount == 1) {
echo '<div class="row">';
}
?>
<ul class="col-sm-6 col-md-6 grid_list">
<li>
<?php
$_slug = osc_category_slug();
$_url = osc_search_category_url();
$_name = osc_category_name();
$_total_items = osc_category_total_items();
if (osc_count_subcategories() > 0) {
?>
<section class="listings row">
<h2 class="col-md-7 category <?php
echo $_slug;
?>
<?php
echo $_name;
?>
">
<?php
if ($_total_items > 0) {
?>
<a href="<?php
echo $_url;
?>
"><?php
echo $_name;
?>
</a> <span><?php
echo $_total_items;
?>
</span>
<?php
} else {
?>
<a href="#"><?php
echo $_name;
?>
</a> <span><?php
echo $_total_items;
?>
</span>
<?php
}
?>
<?php
}
?>
</h2>
<?php
if (osc_count_subcategories() > 0) {
$m = 1;
?>
<ul class="col-md-5">
<?php
while (osc_has_subcategories()) {
if ($m <= 5) {
?>
<li>
<?php
if (osc_category_total_items() > 0) {
?>
<a class="category sub-category <?php
echo osc_category_slug();
?>
" href="<?php
echo osc_search_category_url();
?>
"><?php
echo osc_category_name();
?>
</a> <span>(<?php
echo osc_category_total_items();
?>
)</span>
//.........这里部分代码省略.........
示例8: osclassclsx_draw_categories_list_home
function osclassclsx_draw_categories_list_home()
{
//cell_3
$total_categories = osc_count_categories();
// $col1_max_cat = ceil($total_categories/3);
// $col1_max_cat = 3;
?>
<div class="categories-list row">
<?php
osc_goto_first_category();
$i = 0;
while (osc_has_categories()) {
?>
<?php
if ($i == 0) {
echo '<div class="columns small-4 first_cel">';
} else {
echo '<div class="columns small-4">';
}
?>
<h1>
<?php
$_slug = osc_category_slug();
$_url = osc_search_category_url();
$_name = osc_category_name();
$_total_items = osc_category_total_items();
?>
<a class="category <?php
echo $_slug;
?>
" href="<?php
echo $_url;
?>
"><?php
echo $_name;
?>
</a> <span class="hide">(<?php
echo $_total_items;
?>
)</span>
</h1>
<?php
if (osc_count_subcategories() > 0) {
while (osc_has_subcategories()) {
}
}
?>
<?php
echo '</div>';
$i++;
}
?>
</div>
<?php
}