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 | |
/** | |
* Raam Dev - http://raamdev.com/ | |
* | |
* This code loads a Flickr Photo Set and then picks a random photo from that set | |
* After configuring your settings and loading the PHP, you can display the random photo as follows: | |
* <a href="<?php echo $flickr_img_url_large; ?>" title="<?php echo $flickr_photo_description; ?>"> | |
* <img title="<?php echo $flickr_photo_description; ?>" border="0" src="<?php echo $flickr_img_url; ?>" /> | |
* </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 | |
/* | |
$Id: postie-functions.php 683869 2013-03-18 21:39:57Z WayneAllen $ | |
*/ | |
//to turn on debug output add the following line to wp-config.php | |
//define('POSTIE_DEBUG', true); | |
if (!function_exists('mb_str_replace')) { |
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 | |
/* Add a checkbox to the featured image metabox */ | |
add_filter( 'admin_post_thumbnail_html', 'theme_featured_image_meta'); | |
function theme_featured_image_meta( $content ) { | |
global $post; | |
// Text for checkbox | |
$text = __( "Don't display image on post.", 'textdomain' ); |
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 | |
if ( ! function_exists( 'independent_publisher_recent_posts_shortcode' ) ) : | |
/** | |
* Returns recent posts for given category and excludes given post formats | |
* | |
* Example usage: [independent_publisher_recent_posts count="10" category="Technology" exclude_formats="aside,gallery,link" more_text="« Full Archives"] | |
*/ | |
function independent_publisher_recent_posts_shortcode( $atts /*$number_posts = '10', $category = '', $exclude_formats = array()*/ ) { | |
$formats_to_exclude = ''; |
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 | |
add_filter( 'stcr_confirmation_email_message', 'modify_email_message', 10, 3 ); | |
function modify_email_message( $message, $_post_ID, $email ) { | |
$message = $message . "Adding something to the end of my email confirmation message."; | |
return $message; | |
} | |
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: Subscribe to Comments Reloaded | |
Version: 140125 | |
Stable tag: 140125 | |
Requires at least: 2.9.2 | |
Tested up to: 3.8 | |
Plugin URI: http://wordpress.org/extend/plugins/subscribe-to-comments-reloaded/ |
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
# Download & install marports http://www.macports.org/install.php | |
$ sudo port selfupdate | |
$ sudo port install nginx | |
$ sudo launchctl load -w /Library/LaunchDaemons/org.macports.nginx.plist | |
$ sudo port install php5 +fastcgi fcgi | |
$ sudo mkdir /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi | |
$ cd /opt/local/etc/LaunchDaemons/org.macports.php-fastcgi | |
$ mate org.macports.php-fastcgi.plist # or vim org.macports.php-fastcgi.plist |
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
# These steps will get nginx installed on your Mac for local development and | |
# testing purposes, to be used alongside MAMP (which already includes Apache). | |
# The following steps assume that you're running MAMP and that you already | |
# have php-cgi in /Applications/MAMP/bin/php/php5.4.10/bin/php-cgi. | |
# The start-nginx and stop-nginx scripts created at the end do not | |
# start or stop MySQL because it is assumed that you normally run MAMP | |
# with Apache + MySQL turned on and that you occasionally want to switch | |
# your web server to Nginx for testing purposes and that you leave MySQL running. | |
# This process was tested successfully on OS X 10.9. |
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/sh | |
set -o errexit | |
set -e | |
# Fail fast if we're not on OS X >= 10.6.0. | |
if [ "$(uname -s)" != "Darwin" ]; then | |
echo "Sorry, DevDNS requires Mac OS X to run." >&2 | |
exit 1 |
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
FileETag none | |
<IfModule mod_headers.c> | |
Header unset etag | |
</IfModule> | |
<IfModule mod_expires.c> | |
ExpiresActive on | |
ExpiresByType text/plain "access plus 1 week" | |
ExpiresByType text/css "access plus 1 week" | |
ExpiresByType text/javascript "access plus 1 week" |
OlderNewer