/**
* Get Menu Items From Location
*
* @param $location : location slug given as key in register_nav_menus
*/
function getMenuItemsFromLocation($location) {
$theme_locations = get_nav_menu_locations();
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 | |
/* Pages templates in subfolders */ | |
/* | |
This will add ./pages/my-custom-folder/*.php templates | |
if no "Template Name: My name" is specified, name will be : "Subfolder > Filename" | |
*/ |
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
0 info it worked if it ends with ok | |
1 verbose cli [ '/home/pi/.nvm/versions/node/v6.9.5/bin/node', | |
1 verbose cli '/home/pi/.nvm/versions/node/v6.9.5/bin/npm', | |
1 verbose cli 'install' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 silly loadCurrentTree Starting | |
5 silly install loadCurrentTree | |
6 silly install readLocalPackageData | |
7 silly install normalizeTree |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var State = require('ampersand-state'); | |
var Collection = require('ampersand-collection'); | |
var Instance = State.extend({ | |
props: { | |
id: 'number', | |
slug: 'string', |
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
var Tile = function(width, height) { | |
this.width = width; | |
this.height = height; | |
this.size = this.width * this.height; | |
}; | |
Tile.prototype = { | |
get el() { | |
return '<div>MyTile</div>'; |
Handling parent state vs child state with SASS
.papa {
&-enfant {
&.selected {}
.danger & {}
}
}
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 | |
// post_type : flux | |
register_post_type( 'flux', array( | |
'labels' => array( | |
'name' => 'Flux', | |
'singular_name' => 'Flux', | |
'add_new' => 'Écrire un flux', | |
'add_new_item' => 'Écrire un flux', | |
'edit_item' => 'Modifier le flux', | |
'new_item' => 'Nouveau flux', |