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 short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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 | |
$args = array( | |
'post_parent' => $post->ID, // For the current post | |
'post_type' => 'attachment', // Get all post attachments | |
'post_mime_type' => 'image', // Only grab images | |
'order' => 'ASC', // List in ascending order | |
'orderby' => 'rand', // List them in their menu order | |
'numberposts' => -1, // Show all attachments | |
'post_status' => null, // For any post status | |
); |
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
# ###################################################################### | |
# # WEB PERFORMANCE # | |
# ###################################################################### | |
# ---------------------------------------------------------------------- | |
# | Compression | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_deflate.c> |
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
# ###################################################################### | |
# # WEB PERFORMANCE # | |
# ###################################################################### | |
# ---------------------------------------------------------------------- | |
# | Compression | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_deflate.c> |
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 //different sizes ?> | |
<?php $large_image_urlLarge = wp_get_attachment_image_src( get_post_thumbnail_id(), 'imgBlogLarge' ); ?> | |
<?php $large_image_urlMedium = wp_get_attachment_image_src( get_post_thumbnail_id(), 'imgBlogMedium' ); ?> | |
<?php $large_image_urlSmall = wp_get_attachment_image_src( get_post_thumbnail_id(), 'imgBlogSmall' ); ?> | |
<?php //title == alt ?> | |
<?php $title = get_post(get_post_thumbnail_id())->post_title; //The Title ?> | |
<picture> | |
<!--[if IE 9]><video style="display: none;"><![endif]--> |
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
//================================= | |
/* Simple grid */ | |
@mixin simple-grid($nombre-items , $margin-right ){ | |
width: ( (100% - ( ($nombre-items - 1) * $margin-right) ) / $nombre-items); | |
margin-right: $margin-right; | |
float:left; | |
&:nth-child(n) { | |
margin-right: $margin-right; |
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
jQuery( function( $ ) | |
{ | |
// ACTIVITY INDICATOR | |
var activityIndicatorOn = function() | |
{ | |
$( '<div id="imagelightbox-loading"><div></div></div>' ).appendTo( 'body' ); | |
}, | |
activityIndicatorOff = function() | |
{ |
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 | |
// Connexion BDD | |
mysql_connect('localhost', 'hostname', 'password'); // | |
mysql_select_db('mybdd'); | |
mysql_query("SET NAMES 'utf8'"); | |
// on start la session | |
session_start(); | |
ini_set('session.gc_maxlifetime', 2592000); // durée de la session => 30 jours (2592000 secondes) |
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
//Remove [...] string using Filters | |
<?php | |
function new_excerpt_more( $more ) { | |
return '<div class="read-more"><a href="'. get_permalink( get_the_ID() ) . '">Read More</a></div>'; | |
} | |
add_filter('excerpt_more', 'new_excerpt_more'); | |
//Control Excerpt Length using Filters | |
function custom_excerpt_length( $length ) { | |
return 30; |
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
<files wp-config.php> | |
order allow,deny | |
deny from all | |
</files> |
NewerOlder