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 | |
/* | |
UPDATED: December 31, 2011. | |
Modifications: | |
- Truncated the longest country names, including: | |
-- British Indian Ocean Territories (Chagos Archipelago) -> British Indian Ocean Territories | |
-- South Georgia and the South Sandhich Islands -> South Georgia & S. Sandwich Islands |
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
// AUTO-SELECT CLICKFUNNELS PRODUCT ON ORDER PAGE | |
// -- | |
// | |
// AUTHOR: Robert Klubenspies (klubenspies.com) | |
// | |
// REQUIREMENTS: jQuery | |
// | |
// USAGE: | |
// 1) Find your product's ID numbers by using Web Inspector to find | |
// the code for your order page's radio buttons. They'll look |
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
<? | |
// Add at bottom of functions.php file | |
//Example with minimum options | |
function create_post_type() { | |
register_post_type( 'acme_product', | |
array( | |
'labels' => array( | |
'name' => __( 'Products' ), | |
'singular_name' => __( 'Product' ) | |
), |
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
/** | |
* | |
* Recent Posts Widget | |
* Note* - The WP_Widget class is located in wp-includes/class-wp-widget.php. | |
*/ | |
//Add Custom Excerpt Length | |
function excerpt($limit) { |
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 | |
function upload_image_metabox() { | |
echo '<p><strong>Upload image</strong></p>'; | |
echo '<input type="text" id="child_logo_url" name="' . $this->get_field_name( 'welcome-image' ) . '" value="' . esc_attr( $this->get_field_value( 'welcome-image' ) ) . '" size="50" />'; | |
echo '<input id="child_upload_logo_button" type="button" class="button" value="Upload Image" /> '; | |
?> | |
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_action( 'admin_menu', 'wpto_add_admin_menu' ); | |
add_action( 'admin_init', 'wpto_settings_init' ); | |
function wpto_add_admin_menu( ) { | |
add_options_page( 'Theme Options ', 'Theme Options ', 'manage_options', 'theme_options_', 'wpto_options_page' ); | |
} |
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: SS Content Ads | |
* Plugin URI: http://kustomdesigner.com/ss-content-ads | |
* Description: Add ads within single posts by category matching. Also, send a ga.js click event with photo-id for use in split testing ads to see which ones are getting the most response. | |
* Version: 2.0 | |
* Author: Michael Hicks | |
* Author URI: http://kustomdesigner.com/ | |
*/ |
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
// Add / Update a key-value pair in the URL query parameters | |
function updateUrlParameter(uri, key, value) { | |
// remove the hash part before operating on the uri | |
var i = uri.indexOf('#'); | |
var hash = i === -1 ? '' : uri.substr(i); | |
uri = i === -1 ? uri : uri.substr(0, i); | |
var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
if (uri.match(re)) { |
OlderNewer