This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Télécharge un fichier CSV avec les données fournies. | |
* | |
* @param string $fileName Nom du fichier à télécharger. | |
* @param array $dataRows Données à écrire dans le CSV (tableau de tableaux). | |
*/ | |
function downloadCsvFile( $fileName, $dataRows ) { | |
if ( headers_sent() ) { | |
wp_die( 'Headers already sent. Cannot download file.' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_price_ht($price_ttc, $taux = '20') | |
{ | |
$price_ht = $price_ttc / ( 1 + ($taux / 100) ) ; | |
return number_format($price_ht, 2) ; | |
} | |
echo get_price_ht(100) ; // Retourne 83.33 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php dynamic_sidebar( 'sidebar_id_unique' ); ?> |