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