Compare commits
5 Commits
f85187ca13
...
36bad45e67
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36bad45e67 | ||
|
|
31736397d0 | ||
|
|
42f86e5999 | ||
|
|
68783b735b | ||
|
|
62a868b8c4 |
|
|
@ -1,28 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
class wp_nav_menu_walker extends Walker_Nav_menu
|
|
||||||
{
|
|
||||||
|
|
||||||
function start_lvl(&$output, $depth = 0, $args = null)
|
|
||||||
{
|
|
||||||
|
|
||||||
$tmp_class = "child-" . $depth;
|
|
||||||
|
|
||||||
$output .= "<ul class='" . $tmp_class . "'>";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function start_el(&$output, $item, $depth = 0, $args = null, $id = 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
$output .= "<li>I like pie" . $item->title;
|
|
||||||
|
|
||||||
// var_dump($args);
|
|
||||||
}
|
|
||||||
|
|
||||||
function end_el(&$output, $item, $depth = 0, $args = null)
|
|
||||||
{
|
|
||||||
$output .= "...</li>";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
|
||||||
Walker to ReWrap li submenu parent with button instead of
|
|
||||||
-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
function dynamiques_wrap_parent_menu_item_buttons($output, $item, $depth, $args)
|
|
||||||
{
|
|
||||||
|
|
||||||
// $item->classes = array_merge($item->classes, array('menu-item-' . $item->ID));
|
|
||||||
|
|
||||||
// #### MENU HOMEGRADE HEADER
|
|
||||||
if ($args->theme_location === "homegrade" && $args->menu_id === "menu-homegrade-navlist" && in_array('menu-item-has-children', $item->classes, true)) {
|
|
||||||
$output = '<button type="button" class="menu-item-submenu-toggle" aria-expanded="false" aria-controls="sub-menu-' . $item->ID . '">' . $item->title . '</button>';
|
|
||||||
}
|
|
||||||
|
|
||||||
// #### MENU HOMEGRADE FOOTER
|
|
||||||
if ($args->theme_location === "homegrade" && $args->menu_class === "menu-homegrade-footer" && in_array('menu-item-has-children', $item->classes, true)) {
|
|
||||||
$output = '<h6 class="page-group-title">' . $item->title . '</h6>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($args->theme_location === "primary") {
|
|
||||||
$page_icon = get_field('page_icon', $item->object_id);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (isset($page_icon)) {
|
|
||||||
$icon = '<img class="page_icon" src="' . $page_icon['url'] . '" alt=""/>';
|
|
||||||
$link = $output;
|
|
||||||
$output = $icon . $link;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// #### TAXONOMY : GET ICON & INFOS ABOUT TAX
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($args->theme_location === "footer" && in_array('menu-item-has-children', $item->classes, true)) {
|
|
||||||
$output = $item->title;
|
|
||||||
}
|
|
||||||
return $output;
|
|
||||||
}
|
|
||||||
add_filter('walker_nav_menu_start_el', 'dynamiques_wrap_parent_menu_item_buttons', 10, 4);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
|
||||||
Pass Specific submenus-classnames for menu renovateur
|
|
||||||
-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function customize_submenu_classnames($classes, $args, $depth)
|
|
||||||
{
|
|
||||||
// Here we can additionally use menu arguments.
|
|
||||||
// if ($args->theme_location === "renovateur") {
|
|
||||||
// $default_class_name_key = array_search('sub-menu', $classes);
|
|
||||||
|
|
||||||
// if (false !== $default_class_name_key) {
|
|
||||||
// unset($classes[$default_class_name_key]);
|
|
||||||
// }
|
|
||||||
// $classes[] = 'header-submenu';
|
|
||||||
// $classes[] = "depth-{$depth}";
|
|
||||||
// $classes[] = 'sub-menu';
|
|
||||||
// $classes[] = 'test';
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
return $classes;
|
|
||||||
}
|
|
||||||
// add_filter('nav_menu_submenu_css_class', 'customize_submenu_classnames', 10, 3);
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
|
||||||
FILTER MENU OBJECTS TO BE DISPLAYED
|
|
||||||
-----------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
function wpdocs_unset_menu_items($menu_objects, $args)
|
|
||||||
{
|
|
||||||
if ($args->theme_location === "renovateur") {
|
|
||||||
}
|
|
||||||
return $menu_objects;
|
|
||||||
}
|
|
||||||
// add_filter('wp_nav_menu_objects', 'wpdocs_unset_menu_items', 10, 2);
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
.primary-menu-container {
|
/* .primary-menu-container {
|
||||||
#primary-menu {
|
#primary-menu {
|
||||||
li.menu-item:has(.page_icon) {
|
li.menu-item:has(.page_icon) {
|
||||||
@apply flex flex-row items-center justify-center gap-2;
|
@apply flex flex-row items-center justify-center gap-2;
|
||||||
|
|
@ -7,4 +7,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} */
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<span><?php echo __('Rechercher', 'homegrade-theme__texte-fonctionnel') ?></span>
|
<span><?php echo __('Rechercher', 'homegrade-theme__texte-fonctionnel') ?></span>
|
||||||
<img class="search_icon" src='<?php echo get_template_directory_uri() ?>/resources/img/graphic-assets/search-icon.svg' alt=''>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,10 @@ $revueID = $args['revueID'];
|
||||||
|
|
||||||
$issue_number = get_field('issue_number', $revueID);
|
$issue_number = get_field('issue_number', $revueID);
|
||||||
$issue_parution_date = get_the_date('F Y', $revueID);
|
$issue_parution_date = get_the_date('F Y', $revueID);
|
||||||
$issue_updated_date = get_the_modified_date('F Y', $revueID);
|
$issue_updated_date = get_post_meta(get_the_ID(), 'article_modification_date', true);
|
||||||
|
// Formater la date en utilisant la langue configurée dans WordPress
|
||||||
|
$issue_updated_date_formatted = $issue_updated_date ? date_i18n('F Y', strtotime($issue_updated_date)) : null;
|
||||||
|
|
||||||
|
|
||||||
$coordinations_authors = get_field('coordinations_authors', $revueID);
|
$coordinations_authors = get_field('coordinations_authors', $revueID);
|
||||||
?>
|
?>
|
||||||
|
|
@ -24,10 +27,10 @@ $coordinations_authors = get_field('coordinations_authors', $revueID);
|
||||||
<time class="issue-parution-date__value" datetime="<?php echo $issue_parution_date; ?>"><?php echo $issue_parution_date ?></time>
|
<time class="issue-parution-date__value" datetime="<?php echo $issue_parution_date; ?>"><?php echo $issue_parution_date ?></time>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($issue_updated_date) : ?>
|
<?php if ($issue_updated_date_formatted) : ?>
|
||||||
<div class="issue-updated-date">
|
<div class="issue-updated-date">
|
||||||
<h5 class="issue-updated-date__label title-small">Mise à jour</h5>
|
<h5 class="issue-updated-date__label title-small">Mise à jour</h5>
|
||||||
<time class="issue-updated-date__value" datetime="<?php echo $issue_updated_date; ?>"><?php echo $issue_updated_date; ?></time>
|
<time class="issue-updated-date__value" datetime="<?php echo $issue_updated_date; ?>"><?php echo $issue_updated_date_formatted; ?></time>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,9 @@
|
||||||
"contentSize": "960px",
|
"contentSize": "960px",
|
||||||
"wideSize": "1280px"
|
"wideSize": "1280px"
|
||||||
},
|
},
|
||||||
|
"spacing": {
|
||||||
|
"blockGap": true
|
||||||
|
},
|
||||||
"color": {
|
"color": {
|
||||||
"defaultPalette": false,
|
"defaultPalette": false,
|
||||||
"custom": false,
|
"custom": false,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user