Skip to content

Instantly share code, notes, and snippets.

@partageit
partageit / functions-bootstrap-carousel-shortcode.php
Last active September 4, 2015 12:25
Partage-it.com : Carrousel d'articles pour WordPress avec Twitter Bootstrap
@partageit
partageit / functions-mono-page.php
Last active August 29, 2015 14:03
Partage-it.com : fonctions nécessaires pour le template monopage pour Twenty Thirteen
<?php
// Ajoute Bootstrap pour le scrollspy et l'affix
function enqueueStyles() {
wp_enqueue_style("bootstrap", get_stylesheet_directory_uri() . "/css/bootstrap/css/bootstrap.min.css");
wp_enqueue_script('jquery');
wp_enqueue_script('bootstrap-js', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', 'jquery' );
}
add_action("wp_enqueue_scripts", "enqueueStyles");
@partageit
partageit / template-mono-page.php
Last active August 29, 2015 14:03
Partage-it.com : template monopage pour Twenty Thirteen
<?php
/**
Template name: Mono page
Copié depuis page.php de Twenty Thirteen
*/
get_header("mono-page"); ?>
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
@partageit
partageit / header-mono-page.php
Last active August 29, 2015 14:03
Partage-it.com : Header du template monopage pour Twenty Thirteen
<?php
/**
* En-tête du template mono page pour Twenty Thirteen
* Copié du header.php et modifié pour un thème enfant
*/
?><!DOCTYPE html>
<!--[if IE 7]>
<html class="ie ie7" <?php language_attributes(); ?>>
<![endif]-->
<!--[if IE 8]>
@partageit
partageit / wordpress-anti-spambot-functions.inc.php
Created June 16, 2014 08:26
Partage-it.com : système anti spambot de commentaire pour WordPress
<?php
// Ajout le nouveau 'vrai' champ et change celui qui existe en leurre à spambot
function addAntiSpambotField($fields) {
$newUrlFieldName = "url2";
$fields["url2"] = str_replace(array("for=\"url\"", "id=\"url\"", "name=\"url\""), array("for=\"$newUrlFieldName\"", "id=\"$newUrlFieldName\"", "name=\"$newUrlFieldName\""), $fields["url"]);
$fields["url"] = '<input type="url" id="url" name="url" value="">';
return $fields;
}
add_filter("comment_form_default_fields", "addAntiSpambotField");
@partageit
partageit / less-yo-angular-Gruntfile.js
Created June 5, 2014 12:55
Partage-it.com : Less et yo angular - Gruntfile.js
// New task:
[...]
karma: {
[...]
},
less: {
server: {
files: {
"<%= yeoman.app %>/styles/style.css": "<%= yeoman.app %>/less/*.less"
}
@partageit
partageit / offset0.html
Created May 31, 2014 20:49
Bootstrap offset 0
<html>
<head>
<meta charset="UTF-8">
<title>Test offset Bootstrap</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<style>
.col { color: #ffffff; height: 250px; line-height: 250px; font-size: 4em; text-align: center; }
.col1 { background-color: #34495e; }
.col2 { background-color: #2c3e50; }
.col3 { background-color: #95a5a6; }