Skip to content

Instantly share code, notes, and snippets.

View Manoz's full-sized avatar
😏
Meh

Kévin Legrand Manoz

😏
Meh
View GitHub Profile
<?php
/* Remove an old shortcode.
* Code by @boiteaweb
*/
/*
* Exemple:
* [button color="babyblue" link="http://manoz.fr/facebook-template/2012-Facebook-template.zip" target="_blank"]Télécharger le template[/button]
*/
add_shortcode( 'button', 'sc_button' );
@Manoz
Manoz / widget.php
Created March 28, 2014 13:12
Simple "Blog info" Widget snippet for WordPress. Not very good, but it's a test =)
<?php
/**
* Simple "blog info" widget snippet
* @todo rebuild it =)
* @author Kevin Legrand : http://k-legrand.fr
* @copyright Copyright (c) 2014, Kevin Legrand
* @link http://k-legrand.fr
* @license http://www.gnu.org/licenses/gpl-3.0.html
*/
@Manoz
Manoz / functions.php
Last active August 29, 2015 13:57
WordPress: Add social network links in user profil
<?php
// Add social networks fields to aithor profil and author info box
add_filter('user_contactmethods', 'manoz_profile_fields');
function manoz_profile_fields( $profile_fields ) {
$profile_fields['twitter'] = __( 'Twitter URL', 'textdomain' );
$profile_fields['facebook'] = __( 'Facebook URL', 'textdomain' );
$profile_fields['gplus'] = __( 'Google+ URL', 'textdomain' );
$profile_fields['linkedin'] = __( 'LinkedIn URL', 'textdomain' );
$profile_fields['dribbble'] = __( 'Dribbble URL', 'textdomain' );
@Manoz
Manoz / test.html
Last active August 29, 2015 13:57
<p style="text-align: center;">
<a href=""><img class="size-full wp-image-311 alignleft" src="url_de_limage" /></a>
<a href=""><img class="size-full wp-image-311 alignleft" src="url_de_limage" /></a>
<a href=""><img class="size-full wp-image-311 alignleft" src="url_de_limage" /></a>
<a href=""><img class="size-full wp-image-311 alignleft" src="url_de_limage" /></a>
<a href=""><img class="size-full wp-image-311 alignleft" src="url_de_limage" /></a>
</p>
@Manoz
Manoz / dabblet.css
Created February 13, 2014 09:42
Toggle button in pure CSS
/* Toggle button in pure CSS
* Wanted to make a cool button but, finally, I think I'm going in the wrong way.
* Original button : http://dribbble.com/shots/408190-Quick-Setting-Toggles
*/
body {
text-align: center;
background-color: #dcdfe5;
}
body,
header,
footer {
margin: 0 auto;
padding: 3px 8px;
font-family: 'Open Sans',Arial,Helvetica,sans-serif;
background: transparent url('../img/bg.png') repeat-x;
background-color: #ececec;
-moz-box-shadow:
inset 0 1px 0 #fff,
@Manoz
Manoz / test.php
Created February 5, 2014 10:32
Test: récupérer tous les posts plus vieux que le 1er décembre 2013.
<div class="test">
<p>Test: récupérer tous les posts plus vieux que le 1er décembre 2013.</p>
<?php
global $wpdb;
$query = "
SELECT post_title,post_date
FROM $wpdb->posts
WHERE post_date < '2013-12-01 00:00:00'
AND post_status = 'publish'
AND post_type = 'post'
<?php
/**
* Allow parameters to be passed in the URL
*/
add_filter('query_vars', 'parameter_queryvars' );
function parameter_queryvars( $qvars ) {
$qvars[] = 'full'; // This is the parameter for the url: yourblog.com/your-post/?full=1
return $qvars;
}
@Manoz
Manoz / bloc.txt
Last active August 29, 2015 13:55
All CSS Properties. Last update: Feb 1, 2014
align-content align-items align-self alignement-adjust all anchor-point animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function appearance azimuth backface-visibility background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size baseline-shift binding bleed bookmark-label bookmark-level bookmark-state bookmark-target border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left
@Manoz
Manoz / dabblet.css
Created January 28, 2014 11:39
CSS3 Loading animations
/* CSS3 Loading animations */
/* -----------------------------------------
=Default css to make the demo more pretty
-------------------------------------------- */
body {
margin: 0 auto;
padding: 20px;
max-width: 1200px;