コード例 #1
0
ファイル: woof.php プロジェクト: Web-Ares/shop-shablon
    if (isset($woof_settings['items_order']) and !empty($woof_settings['items_order'])) {
        $items_order = explode(',', $woof_settings['items_order']);
    } else {
        $items_order = array_merge($this->items_keys, $taxonomies_keys);
    }
    //*** lets check if we have new taxonomies added in woocommerce or new item
    foreach (array_merge($this->items_keys, $taxonomies_keys) as $key) {
        if (!in_array($key, $items_order)) {
            $items_order[] = $key;
        }
    }
    //lets print our items and taxonomies
    $counter = 0;
    foreach ($items_order as $key) {
        if (in_array($key, $this->items_keys)) {
            woof_print_item_by_key($key, $woof_settings, $additional_taxes);
        } else {
            if (!isset($woof_settings['tax'][$key])) {
                continue;
            }
            woof_print_tax($taxonomies, $key, $taxonomies[$key], $exclude_tax_key, $taxonomies_info, $additional_taxes, $woof_settings, $args, $counter);
        }
        $counter++;
    }
}
?>




                    <div class="woof_submit_search_form_container">
コード例 #2
0
$taxonomies_keys = array_keys($taxonomies);
if (isset($woof_settings['items_order']) and !empty($woof_settings['items_order'])) {
    $items_order = explode(',', $woof_settings['items_order']);
} else {
    $items_order = array_merge($this->items_keys, $taxonomies_keys);
}
//*** lets check if we have new taxonomies added in woocommerce or new item
foreach (array_merge($this->items_keys, $taxonomies_keys) as $key) {
    if (!in_array($key, $items_order)) {
        $items_order[] = $key;
    }
}
//lets print our items and taxonomies
foreach ($items_order as $key) {
    if (in_array($key, $this->items_keys)) {
        woof_print_item_by_key($key, $woof_settings);
    } else {
        if (isset($taxonomies[$key])) {
            woof_print_tax($key, $taxonomies[$key], $woof_settings);
        }
    }
}
?>
                    </ul>

                    <input type="button" class="woof_reset_order" style="float: right;" value="<?php 
_e('Reset items order', 'woocommerce-products-filter');
?>
" />

                    <div class="clear"></div>