I hereby claim:
- I am em-piguet on github.
- I am empiguet (https://keybase.io/empiguet) on keybase.
- I have a public key ASAPEZYVo58aN6f9tnXqg6SHBB-l2-NagjS7Pq1gwPkfqAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/bin/bash | |
| ################################################ | |
| ## | |
| ## Update CIVI plugin in Wordpress | |
| ## | |
| ## this script is called via | |
| ## $ ssh [email protected] 'bash -s -- sites/folder 5.41.0 SiteName' < civi-update.sh | |
| ## | |
| ################################################ |
| <?php | |
| /* | |
| * ADD OEMBED TO RTS.CH | |
| * Copied from : https://gist.github.com/marcwieland95/61074b488aae12460a17882aeb3e0fd8 | |
| */ | |
| wp_embed_register_handler('srg', '#https?:\/\/(?:www\.)?(srf|rsi|rts|rtr)\.ch\/.*(?:detail\/|video:)((?:.{8}-.{4}-.{4}-.{4}-.{12})|\d*)(?:.startTime=(\d*)|.*)#i', function ($matches, $attr, $url, $rawattr) { | |
| return sprintf( | |
| '<div class="embed-container"><iframe width="560" height="315" src="https://%1$s.ch/play/embed?urn=urn:%1$s:video:%2$s" allowfullscreen allow="encrypted-media"></iframe></div>', | |
| esc_attr($matches[1]), | |
| esc_attr($matches[2]), |
| <?php | |
| function acces_article_offert() | |
| { | |
| // only on post | |
| if (is_singular('post')) { | |
| // get the gift start date | |
| $date_de_debut = get_field('article_gift'); | |
| if ($date_de_debut) { | |
| $date_de_fin = date('Y-m-d', strtotime($date_de_debut . ' + 7 days')); |
| <?php | |
| function get_youtube_video_ID($youtube_video_url) { | |
| /** | |
| * Pattern matches | |
| * http://youtu.be/ID | |
| * http://www.youtube.com/embed/ID | |
| * http://www.youtube.com/watch?v=ID | |
| * http://www.youtube.com/?v=ID | |
| * http://www.youtube.com/v/ID | |
| * http://www.youtube.com/e/ID |