This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
This file contains hidden or 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: Instrument Hooks for WordPress | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook. | |
Version: 0.1 | |
Author: Mike Schinkel | |
Author URI: http://mikeschinkel.com | |
*/ | |
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') { |
This file contains hidden or 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: Future Core Login | |
* Plugin URI: http://unserkaiser.com | |
* Description: Replacing the current stylesheets loaded on wp-login.php until this ticket goes into core: <a href="http://core.trac.wordpress.org/ticket/12506">#12506</a> | |
* Version: 0.1 | |
* Author: Franz Josef Kaiser | |
* Author URI: http://unserkaiser.com | |
* License: GPL2 | |
* |
This file contains hidden or 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
<input type="text" name="my-theme-options[color]" id="color" /> | |
<input type='button' class='pickcolor button-secondary' value='Select Color'> | |
<div id='colorpicker' style='z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;'></div> | |
// Color Picker for js file | |
$('.pickcolor').click( function(e) { | |
colorPicker = jQuery(this).next('div'); | |
input = jQuery(this).prev('input'); | |
$(colorPicker).farbtastic(input); | |
colorPicker.show(); |
This file contains hidden or 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 | |
if [[ ! -n $1 ]]; then | |
echo "Please insert a project name" | |
exit 1 | |
fi | |
# Mysql Config | |
MYSQL_USER="" |
This file contains hidden or 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
Clean debugging: | |
// Add this to wp-config.php to cleanly debug a site. | |
// Just make sure to turn it off when you're done! | |
define('WP_DEBUG', true); // Turn debugging ON | |
define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF | |
define('WP_DEBUG_LOG', true); // Turn logging to wp-content/debug.log ON | |
# Drop this in a .htaccess file in wp-content to keep the log safe. | |
<files debug.log> |
This file contains hidden or 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 | |
// == Without caching | |
$args = array( 'orderby' => 'comment_count', 'posts_per_page' => '1', 'ignore_sticky_posts' => 1 ); | |
$query = new WP_Query( $args ); | |
while ( $query->have_posts() ) : $query->the_post(); | |
// do stuff | |
endwhile; | |
// == With Caching | |
// First, let's see if we have the data in the cache already |
This file contains hidden or 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 | |
/** | |
* Display Post Image and Caption | |
* | |
* @link http://www.billerickson.net/wordpress-featured-image-captions/ | |
* @author Bill Erickson | |
* | |
*/ | |
function be_display_image_and_caption() { |
This file contains hidden or 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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
/* | |
|-------------------------------------------------------------------------- | |
| ExpressionEngine Config Items | |
|-------------------------------------------------------------------------- | |
| | |
| The following items are for use with ExpressionEngine. The rest of | |
| the config items are for use with CodeIgniter, some of which are not | |
| observed by ExpressionEngine, e.g. 'permitted_uri_chars' |
This file contains hidden or 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
############################################################################### | |
# | |
# Apache virtual host 'no reboot needed' template. | |
# | |
# This apache virtualhost configuration allows a user to create development | |
# sites on the fly. This will not work out of the box however, you will need | |
# to replace the {variables} in this conf with values explained below. This | |
# can be done with a script, or a simple find and replace in your favorite | |
# editor. | |
# |
OlderNewer