This file contains hidden or 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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
autoprefixer = require('gulp-autoprefixer'), | |
cssnano = require('gulp-cssnano'), | |
rename = require('gulp-rename'), | |
uglify = require('gulp-uglify'), | |
concat = require('gulp-concat'), | |
plumber = require('gulp-plumber'); | |
var browserSync = require('browser-sync').create(); |
This file contains hidden or 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
/* | |
* | |
* Code générique qui permet d'utiliser le gestionnaire de media de WordPress | |
* | |
* Pour que ce code marche il faut ajouter le scripts de WordPress ( wp_enqueue_media() ) | |
* et respecter quelques régles pour le HTML ( voir les fichier exemple.php et functions.php ) | |
* | |
*/ | |
var custom_uploader, name, input, size, preview; |
This file contains hidden or 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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Color Scheme - Default/Solarized (Light).tmTheme", | |
"detect_slow_plugins": true, | |
"draw_minimap_border": false, | |
"font_size": 12, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ |
This file contains hidden or 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
/* | |
* WordPress debug | |
* http://codex.wordpress.org/Debugging_in_WordPress | |
*/ | |
define('WP_DEBUG', true); | |
// Log the error in wp_content/debug.log | |
define('WP_DEBUG_LOG', true); | |
// Show error only in debug.log |
This file contains hidden or 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
@function px_to_em( $value, $context : 16 ){ | |
@return ( $value / $context ) + 0em ; | |
} |
This file contains hidden or 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
# Restart apach | |
sudo apachectl restart | |
# MySQL | |
mysql -h localhost -u user -p dbname < dump.sql // Importer des fichier SQL | |
mysqldump -h localhost -u user -pPassword dbname > dump.sql // Exporter des fichier SQL | |
# WordPress | |
## Get the latest french WordPress version | |
wget http://fr.wordpress.org/latest-fr_FR.zip |
This file contains hidden or 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
// Add "Next page" button to TinyMCE | |
function add_next_page_button( $mce_buttons ) { | |
$pos = array_search( 'wp_more', $mce_buttons, true ); | |
if ( $pos !== false ) { | |
$tmp_buttons = array_slice( $mce_buttons, 0, $pos+1 ); | |
$tmp_buttons[] = 'wp_page'; | |
$mce_buttons = array_merge( $tmp_buttons, array_slice( $mce_buttons, $pos+1 ) ); | |
} | |
return $mce_buttons; | |
} |
This file contains hidden or 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
class My_Widget extends WP_Widget { | |
public function __construct() { | |
parent::__construct( | |
'mywidget', // Base ID | |
'My Widget', // Name | |
array( | |
'description' => 'This widget will show a large form', | |
'class' => 'mywidget-class' | |
),// Args |