Commit 363920ed authored by Nathan Peraldi's avatar Nathan Peraldi

edit display of sort buttons

parent 9cd5886e
...@@ -7,21 +7,23 @@ function my_theme_enqueue_styles() ...@@ -7,21 +7,23 @@ function my_theme_enqueue_styles()
} }
$debug_functions=false; $debug_functions = false;
function echo_debug($words){ function echo_debug($words)
{
//si mode debug activé, on affiche les informations demandées //si mode debug activé, on affiche les informations demandées
global $debug_functions; global $debug_functions;
if ($debug_functions){ if ($debug_functions) {
echo $words; echo $words;
} }
} }
function dump_debug($list){ function dump_debug($list)
{
//si mode debug activé, on affiche le var dump demandé //si mode debug activé, on affiche le var dump demandé
global $debug_functions; global $debug_functions;
if ($debug_functions){ if ($debug_functions) {
var_dump($list); var_dump($list);
} }
} }
...@@ -34,7 +36,7 @@ function childrens_of_member_category($category_to_select) ...@@ -34,7 +36,7 @@ function childrens_of_member_category($category_to_select)
$id = $member_category_object->cat_ID; $id = $member_category_object->cat_ID;
$server_link = $_SERVER["SERVER_NAME"]; $server_link = $_SERVER["SERVER_NAME"];
$link_Category = "http://" . $server_link . "/category/"; $link_Category = "http://" . $server_link . "/category/";
$current_category=explode("/", $_SERVER['REQUEST_URI'])[2]; $current_category = explode("/", $_SERVER['REQUEST_URI'])[2];
dump_debug($_SERVER); dump_debug($_SERVER);
echo_debug("\n----------------------\n"); echo_debug("\n----------------------\n");
...@@ -57,23 +59,21 @@ function childrens_of_member_category($category_to_select) ...@@ -57,23 +59,21 @@ function childrens_of_member_category($category_to_select)
if ($temp_category->slug == $category_to_select) { if ($temp_category->slug == $category_to_select) {
//si on est en train d'afficher la catégorie sélectionnée //si on est en train d'afficher la catégorie sélectionnée
$my_link .= " adullact-selected"; $my_link .= " adullact-selected";
} } else {
else{
echo_debug($temp_category->slug . "=/=" . $category_to_select); echo_debug($temp_category->slug . "=/=" . $category_to_select);
} }
$my_link.="'><a href = \"http://" . $server_link . "/category/"; $my_link .= "'><a href = \"http://" . $server_link . "/category/";
$my_link .= $temp_category->slug; $my_link .= $temp_category->slug;
$my_link .= "\""; $my_link .= "\"";
$my_link .= "\">"; $my_link .= "\">";
$my_link .= $temp_category->name; $my_link .= $temp_category->name;
$my_link .= "</a></li>"; $my_link .= "</a></li>";
echo $my_link; echo $my_link;
} }
sort_page();
} }
function sort_page() function sort_page()
......
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