Skip to content

Instantly share code, notes, and snippets.

View barrykooij's full-sized avatar
:shipit:
I may be slow to respond.

Barry Kooij barrykooij

:shipit:
I may be slow to respond.
View GitHub Profile
@barrykooij
barrykooij / pc-example.php
Created June 5, 2014 07:59
Post Connector Example: Display linked posts of current post
<?php
// Get the connected posts
$my_connected_posts = Post_Connector::API()->get_children( "course", get_the_id() );
// Check
if ( count( $my_connected_posts ) > 0 ) {
// Loop
foreach ( $my_connected_posts as $my_connected_post ) {
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mysql-server-5.5 mysql-server/root_password_again password root'
sudo apt-get update
sudo apt-get -y install mysql-server-5.5 php5-mysql libsqlite3-dev apache2 php5 php5-dev build-essential php-pear
# Set timezone
echo "Europe/Amsterdam" | sudo tee /etc/timezone
sudo dpkg-reconfigure --frontend noninteractive tzdata
@barrykooij
barrykooij / release-wpseo.sh
Last active August 29, 2015 14:01
The WordPress SEO Release script
#!/bin/sh
# License: GPL v3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@barrykooij
barrykooij / yag.php
Last active August 29, 2015 13:58
WP recursive arg merging
<?php
$args = array(
'meta_query' => array(
'relation' => 'AND',
array(
'key' => 'meta_key_one',
'value' => '1'
)
)