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
#!/bin/bash -e | |
# Install WordPress and clean the folder | |
echo "======================" | |
echo " Installing WordPress " | |
echo "======================" | |
echo "" | |
# Download the files (cURL works fine here too) | |
wget http://wordpress.org/latest.tar.gz |
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
<? | |
/** | |
* Repeatable Custom Fields in a Metabox | |
* Author: Helen Hou-Sandi | |
* | |
* From a bespoke system, so currently not modular - will fix soon | |
* Note that this particular metadata is saved as one multidimensional array (serialized) | |
*/ | |
function hhs_get_sample_options() { |
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
$.getJSON('http://173.255.193.46/api/edge/popular:themeforest.json?callback=?', function(files) { | |
var imgs; | |
files = files.popular; | |
console.log(files); // see what's available to play with | |
imgs = $.map(files.items_last_week, function(file, i) { | |
return '<a href="' + file.url + '"><img src=' + file.thumbnail + '></a>'; | |
}); |
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 | |
/* | |
Plugin Name: Add Extra Comment Fields | |
Plugin URI: http://pmg.co/category/wordpress | |
Description: An example of how to add, save and edit extra comment fields in WordPress | |
Version: n/a | |
Author: Christopher Davis | |
Author URI: http://pmg.co/people/chris | |
License: MIT | |
*/ |
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 | |
class envato_marketplace { | |
public static $base_url = 'http://marketplace.envato.com/api/edge/'; | |
public function curl($path) { | |
$ch = curl_init(self::$base_url . $path); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
$data = curl_exec($ch); |
NewerOlder