This file contains 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 | |
// remove API access | |
// https://developer.wordpress.org/rest-api/using-the-rest-api/frequently-asked-questions/ | |
add_filter( 'rest_authentication_errors', function( $result ) { | |
if ( ! empty( $result ) ) { | |
return $result; | |
} | |
if ( ! is_user_logged_in() ) { | |
return new WP_Error( 'rest_not_logged_in', 'You are not currently logged in.', array( 'status' => 401 ) ); |
This file contains 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
#!/bin/bash | |
git add . && \ | |
git commit -a -m "Dayly BKP `date`" && \ | |
git push origin stage |
This file contains 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
<script> | |
function init() { | |
var vidDefer = document.getElementsByTagName('iframe'); | |
for (var i=0; i<vidDefer.length; i++) { | |
if(vidDefer[i].getAttribute('data-src')) { | |
vidDefer[i].setAttribute('src',vidDefer[i].getAttribute('data-src')); | |
} } } | |
window.onload = init; | |
</script> |
This file contains 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
<script type="text/javascript"> | |
(function($){ | |
$(document).ready(function() { | |
$('.ppyt').magnificPopup({ | |
disableOn: 700, | |
type: 'iframe', | |
mainClass: 'mfp-fade', | |
removalDelay: 160, | |
preloader: false, | |
fixedContentPos: false |
This file contains 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
<a class="ppyt" href="https://www.youtube.com/watch?v=s1T9bWKJW_g"> | |
<img src="http://webplus.odns.fr/wp-content/uploads/2018/02/video-overlay.jpg" width="800" height="534" alt="" class="" /> | |
</a> |
This file contains 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
<div id="videosansson"></div> | |
<script async src="https://www.youtube.com/iframe_api"></script> | |
<script> | |
function onYouTubeIframeAPIReady() { | |
var player; | |
player = new YT.Player('videosansson', { | |
videoId: 'ID_DE_LA_VIDEO', // ID vidéo YT | |
width: 560, // Largeur player (en px) | |
height: 316, // Hauteur player (en px) |
This file contains 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
<div style="position: fixed; z-index: -99; width: 100%; height: 100%"> | |
<iframe frameborder="0" height="100%" width="100%" | |
src="https://youtube.com/embed/ID?autoplay=1&controls=0&showinfo=0&autohide=1"> | |
</iframe> | |
</div> |
This file contains 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 Custom_WP_Show_IDs { | |
public function __construct() { | |
add_action( 'admin_init', array( $this, 'custom_objects' ) ); | |
add_action( 'admin_head', array( $this, 'add_css' ) ); | |
// For Post Management |