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 | |
// Shortcode to easily link to Amazon search results with associate id. | |
// Use: | |
// [amazon-search search="WordPress"]WordPress[/amazon-search] | |
// [amazon-search search="WordPress"] | |
// [amazon-search search="WordPress" id="my-id"]WordPress Search on Amazon[/amazon-search] | |
function ugotsta_amazon_search_shortcode($search, $content = null ) { | |
// get attributes | |
extract(shortcode_atts(array( |
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
.clear-tape { | |
/* Slightly opaque background */ | |
background-color: rgba(255,255,255,0.5); | |
/* Dark, slightly opaque border */ | |
border: 1px solid rgba(0,0,0,0.5); | |
/* Dotted side borders to simulate serrated edges */ | |
border-left: 2px dotted rgba(0,0,0,0.2); | |
border-right: 2px dotted rgba(0,0,0,0.2); | |
/* Very slight shadow */ | |
box-shadow: 0px 0px 4px rgba(0,0,0,0.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 | |
function replace_content($content) | |
{ | |
$content = preg_replace('/WordPress/', '<a href="http://wordpress.org/">WordPress</a>', $content, 1); | |
return $content; | |
} | |
add_filter('the_content','replace_content'); | |
?> |
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
/* | |
Simple way to highlight keypress or key combinations with CSS. | |
Just add a <span> with a "keypress" class to the relevant text. | |
example: Press <span class="keypress">Ctrl-C</span> to copy. | |
*/ | |
span.keypress { | |
/* for use with white background */ | |
border: 1px solid #000; |
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
<? | |
// create new schedule_change action hook | |
add_action('schedule_change', 'change_description'); | |
// function to schedule event if it doesn't exist | |
function activate_change() { | |
// check if schedule_change action/event already exists | |
if ( !wp_next_scheduled( 'schedule_change' ) ) { | |
// schedule new event to trigger schedule_change daily | |
wp_schedule_event( time(), 'daily', 'schedule_change'); |
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
div#mp_product_list .product { | |
display: inline; | |
float: left; | |
width: 29%; | |
margin: 2%; | |
} | |
div#mp_product_list .product:nth-child(3n+1) { | |
clear: both; | |
} |
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
var img = Document.RasterImage; | |
var sizeX = img.sizeX; | |
var sizeY = img.sizeY; | |
var scanline_x = 2; | |
var scanline_y = 0; | |
var scanline_alpha = 0; | |
for (var x = 0; x < sizeX; x += 1) { | |
for (var y = 0; y < sizeY; y += 1) { | |
if (x%scanline_x === 0) { |
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
;Autohotkey script to load and run user-selected Future Pinball tables | |
;for video recording and screen capture purposes | |
#NoEnv | |
CoordMode, Mouse, Window | |
SendMode Input | |
#SingleInstance Force | |
SetTitleMatchMode 2 | |
DetectHiddenWindows On | |
#WinActivateForce |
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 | |
/* | |
Simple, Multi-site plugin for WordPress and BuddyPress to restrict categories, by slug, from the Activity Stream | |
Please note, his is a Multi-site plugin meant to be installed in wp-content/mu-plugins/ folder in a Multi-site WordPress install | |
code derivative of snippet by imath at: | |
http://buddypress.org/support/topic/possible-to-exclude-post-categories-in-activity-stream-and-make-a-user-profile-private-like-with-pri/ | |
*/ | |
function exclude_category_slugs_from_activity_stream( $post_id, $post ){ |
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 | |
/** | |
Template Name: Chat Template | |
*/ | |
?> | |
<html> | |
<head> | |
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" /> | |
<style type="text/css"> |
OlderNewer