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); |
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
$.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
<? | |
/** | |
* 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
<?php | |
include('../../../../wp-config.php'); | |
$keyword = $_GET['k']; | |
search($wpdb->get_results("SELECT * from wp_posts WHERE post_title LIKE '$keyword%'"), "Full keyword"); | |
$keywords_split = explode(" ",$keyword); | |
for($i=0;$i<count($keywords_split);$i++){ | |
search($wpdb->get_results("SELECT * from wp_posts WHERE post_title LIKE '$keywords_split[$i]%'") ,"Split keyword = '$keywords_split[$i]'"); |
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
<?php | |
class Envato | |
{ | |
protected static $key = ""; | |
protected static $username = ""; | |
public static function verify( $code ) |
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 | |
/** | |
* Wrapper class for the Envato marketplaces API. | |
* | |
* @author Jeffrey Way <jeffrey@envato.com> | |
* @created January, 2012 | |
* @license Do-whateva-ya-want-with-it | |
*/ |
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 | |
/* Create a WordPress While Loop | |
-------------------------------------------------- */ | |
$wordpress_loop_argument = array( | |
'post_type' => 'custom_post_type', | |
'posts_per_page' => -1, | |
'orderby' => 'date', | |
'order' => 'ASC' | |
); |
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 | |
/* | |
Register Fonts | |
*/ | |
function studio_fonts_url() { | |
$font_url = ''; | |
/* | |
Translators: If there are characters in your language that are not supported | |
by chosen font(s), translate this to 'off'. Do not translate into your own language. |
OlderNewer