2024-10-16
This commit is contained in:
parent
ee7c786dbd
commit
5793fcb710
74 changed files with 2153 additions and 1234 deletions
|
|
@ -15,12 +15,26 @@ $modeles = ["boutique.twig"];
|
|||
|
||||
/** @var array<WC_Product> $informations_produits Les informations brutes des Produits. */
|
||||
$informations_produits = wc_get_products([
|
||||
"orderby" => "date",
|
||||
"limit" => 12,
|
||||
"order" => "DESC",
|
||||
"orderby" => "date",
|
||||
]);
|
||||
/** @var InformationsProduitShop $produits Les informations strictement nécessaires pour la grille des Produits. */
|
||||
$produits = array_map(callback: "recupere_informations_produit_shop", array: $informations_produits);
|
||||
$contexte["produits"] = $produits;
|
||||
|
||||
/**
|
||||
* Charge les Scripts nécessaires pour la page Boutique.
|
||||
*/
|
||||
function charge_scripts_page_boutique(): void {
|
||||
wp_enqueue_script_module(
|
||||
id: "haiku-atelier-2024-scripts-page-boutique",
|
||||
src: get_template_directory_uri() . "/assets/js/scripts-page-boutique.js",
|
||||
deps: [],
|
||||
version: filemtime(get_template_directory() . "/assets/js/scripts-page-boutique.js"),
|
||||
);
|
||||
}
|
||||
add_action("wp_enqueue_scripts", "charge_scripts_page_boutique");
|
||||
|
||||
// Rendu
|
||||
Timber::render($filenames = $modeles, $data = $contexte);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue