Commit 204688a2 authored by Nathan Peraldi's avatar Nathan Peraldi

change css class placements for member list

parent 384adb66
......@@ -7,6 +7,25 @@ function my_theme_enqueue_styles()
}
$debug_functions=false;
function echo_debug($words){
//si mode debug activé, on affiche les informations demandées
global $debug_functions;
if ($debug_functions){
echo $words;
}
}
function dump_debug($list){
//si mode debug activé, on affiche le var dump demandé
global $debug_functions;
if ($debug_functions){
var_dump($list);
}
}
function childrens_of_member_category($category_to_select)
{
//cette fonction affiche la liste des catégories enfants de la catégorie mère Adhérent
......@@ -25,17 +44,15 @@ function childrens_of_member_category($category_to_select)
$childrens = get_term_children($id, "category"); //contiendra les id de tous les enfants de adhérent
if ($current_category == "adherent" || $current_category == "") {
echo " <a href='" . $link_Category . "adherent/' class='adullact-sort-button adullact-selected'>Tout</a>";
echo " <li class='adullact-sort-button adullact-selected'><a href='" . $link_Category . "adherent/'>Tout</a></li>";
} else {
echo " <a href='" . $link_Category . "adherent/' class='adullact-sort-button'>Tout</a>";
echo " <li class='adullact-sort-button'><a href='" . $link_Category . "adherent/'>Tout</a></li>";
}
foreach ($childrens as $c) {
$temp_category = get_category($c); //objet contenant les infos de la catégorie enfant
$my_link = "<a href = \"http://" . $server_link . "/category/";
$my_link .= $temp_category->slug;
$my_link .= "\" class=\"adullact-sort-button";
$my_link = "<li class='adullact-sort-button";
if ($temp_category->slug == $category_to_select) {
//si on est en train d'afficher la catégorie sélectionnée
......@@ -44,6 +61,11 @@ function childrens_of_member_category($category_to_select)
else{
echo_debug($temp_category->slug . "=/=" . $category_to_select);
}
$my_link.="'><a href = \"http://" . $server_link . "/category/";
$my_link .= $temp_category->slug;
$my_link .= "\"";
$my_link .= "\">";
$my_link .= $temp_category->name;
......@@ -57,23 +79,23 @@ function childrens_of_member_category($category_to_select)
function sort_page()
{
$link = $_SERVER['REQUEST_URI'];
$cleanLink = explode("&order", $link)[0];
$cleanLink = explode("?order", $link)[0];
if (strpos($link, "order=desc")) {
?>
<a href="<?php echo $cleanLink; ?>&order=asc" class="adullact-sort-button">
<a href="<?php echo $cleanLink; ?>?order=asc" class="adullact-sort-button">
Croissant
</a>
<a href="<?php echo $cleanLink; ?>&order=desc" class="adullact-sort-button adullact-selected">
<a href="<?php echo $cleanLink; ?>?order=desc" class="adullact-sort-button adullact-selected">
Décroissant
</a>
<?php
} else {
?>
<a href="<?php echo $cleanLink; ?>&order=asc" class="adullact-sort-button adullact-selected">
<a href="<?php echo $cleanLink; ?>?order=asc" class="adullact-sort-button adullact-selected">
Croissant
</a>
<a href="<?php echo $cleanLink; ?>&order=desc" class="adullact-sort-button">
<a href="<?php echo $cleanLink; ?>?order=desc" class="adullact-sort-button">
Décroissant
</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment