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 | |
/** | |
* Plugin Name: Page templates from plugin | |
* Plugin URI: | |
* Description: Page templates from plugin | |
* Version: 1.0.0 | |
* Author: Pierre Lebedel | |
* Author URI: https://www.pierrelebedel.fr | |
*/ |
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 | |
/** | |
* Jours fériés en France | |
* Source : https://phpsources.net/code/php/date-heure/641_jours-feries-en-france | |
*/ | |
class FrenchHolidays { | |
public static function isHoliday($day=false, $alsacemoselle=false){ |
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
SELECT id, ROUND( | |
( LENGTH(field) - LENGTH( REPLACE(field, "search", "") ) ) / LENGTH("search") | |
) AS count | |
FROM table |
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 | |
class DateTimeFrench extends DateTime { | |
public function format($format='j M Y'){ | |
$days_full = array( | |
'Monday' => 'Lundi', | |
'Tuesday' => 'Mardi', | |
'Wednesday' => 'Mercredi', | |
'Thursday' => 'Jeudi', |
NewerOlder