Notes:
- Adding a link does not equal an endorsement of any kind.
- Ordered by year and discovery date.
Notes:
this.$el.find( '.taxonomy-terms' ).select2({ | |
multiple: true, | |
ajax: { | |
url: WP_API_Settings.root + 'wp/v2/terms/' + this.options.taxonomy.slug, | |
data: function( term, page ) { | |
return { | |
search: term, | |
page: page, | |
_envelope: true | |
} |
jQuery(document).ready(function() { | |
//Set-up some constants. | |
var scrollTimeout; | |
var scrollUsePushStateInstead = false; //Set to true to make the history stack of the browser include every point when posts were loaded. It's kind of annoying. | |
var scrollDelay = 200; //Milliseconds | |
var scrollLoading = false; | |
var triggerOffset = $(document).height() - $('#pagination').siblings().eq(-4).offset().top; //The point of this is to do one calculation up front instead of multiple calculations every time the infinite scroll is triggered. | |
// Simple feature detection for History Management (borrowed from Modernizr) | |
function supportsHistory() { |
v() { | |
DIR=`echo $PWD | sed 's,.*/projects,,'` | |
ARGS=$* | |
ssh -t [email protected] "cd /srv/www${DIR} ; ${ARGS}" 2> /dev/null | |
} | |
alias wp="v wp" | |
alias grunt="v grunt" |
sites | |
|__ ms.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable | |
| |__ wp-config.php | |
|__ one.dev | |
| |__ content | |
| |__ index.php | |
| |__ wp => ../../wordpress/stable |
<?php | |
// with the above we can now do things like this: | |
foreach ( posts_loop() as $p ) { | |
get_template_part( 'content', 'page' ); | |
comments_template( '', true ); | |
} | |
// put this below in your functions.php: |
I've been noticing that there seems to be a lot of interest and momentum lately surrounding plugn/theme dependencies. I am very excited about this. WordPress desperately needs a core dependency solution so that we can move the route of plugins being tiny interoperable building blocks, like what we've seen with NPM.
Here's a running list of the stuff I've been seeing lately about WordPress dependencies:
We have a private Git running on a server somewhere which we consider our central repository. Inside the .git/hooks/post-recieve is the following: | |
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then |
config.vm.provision :puppet do |puppet| | |
# Add a folder in your root named .ppt | |
puppet.manifests_path = ".ppt/manifests" | |
# vagrant.pp is your main manifest and goes in .ppt/manifests | |
puppet.manifest_file = "vagrant.pp" | |
# Add puppet modules in .ppt/modules as git submodules; they will be pre-installed in Vagrant this way | |
puppet.module_path = ".ppt/modules" | |
# Config files, etc. go in .ppt/files. fileserver.conf (see below) defines the path for puppet to add | |
# when looking for files. That way, you can reference files with puppet:// protocols. Make sure you | |
# add the directory defined in fileserver.conf as a shared directory in the main Vagrantfile config |
<?php | |
/* | |
Plugin Name: Post Meta Revisions | |
Description: Revisions for the 'foo' post meta field | |
Version: 1.0 | |
Author: John Blackbourn | |
Plugin URI: http://lud.icro.us/post-meta-revisions-wordpress | |
*/ | |