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
// Setting the tabs in the sidebar hide and show, setting the current tab | |
jQuery('.tab-content').hide(); | |
jQuery('.t1').show(); | |
jQuery('ul.tabs li.t1 a').addClass('tab-current'); | |
jQuery('ul li a').css('cursor','pointer'); | |
jQuery('#tab ul.tabs li.t1 a').click( | |
function() { | |
jQuery('#tab div.tab-content').hide(); |
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
function add_orientation_exif( $meta, $file, $sourceImageType ) { | |
$exif = @exif_read_data( $file, 'IFD0' ); | |
if ( !empty( $exif['IFD0']['Orientation'] ) ) | |
$meta['IFD0']['orientation'] = $exif['IFD0']['Orientation']; | |
return $meta; | |
} | |
add_filter( 'wp_read_image_metadata', 'add_orientation_exif', '', 3 ); |
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
If there is more than one attachment, add a second shortcode parameter: | |
<?php | |
if ( in_category( 'photo' ) ) { | |
do_shortcode( '[gallery numberposts="1" columns="1" link="attachment"]' ); | |
//http://wordpress.org/support/topic/if-postpage-has-more-than-one-attachment | |
$args = array( | |
'post_type' => 'attachment', |
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
I'm going to set an option in the settings page to opt into this. So if users wanted to tweet from the admin a longer script, like tweet-longer then can. |
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
$product = new Cart66Product(); | |
$setting = new Cart66Setting(); | |
$products = $product->getModels( 'where id>0', 'order by name' ); | |
if ( !empty( $products ) ) { | |
foreach( $products as $p ) | |
$select_product = array('name' => $p->name, 'value' => $p->itemNumber); | |
} | |
$meta_boxes[] = array( |
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
function columns( $columns, $post_type = 'post' ) { | |
$post_type = get_post_type(); | |
if ( !post_type_supports( $post_type, 'thumbnail' ) ) | |
return; | |
if ( !$columns ) | |
return; | |
if ( !WP_List_Table::has_items() ) |
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
function send2() { | |
/* Verify the nonce */ | |
//check_ajax_referer( 'sms-nonce' ); | |
/* Get post data */ | |
if ( !isset( $_POST['ajax_form_data'] ) ) die("-1"); | |
parse_str( $_POST['ajax_form_data'], $form_data ); | |
/* Get the form fields */ | |
$to = sanitize_text_field( $form_data['smsTo'] ); |
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
function add_twitter_discount() { | |
global $post; | |
$post_id = $_POST['id']; | |
$item = get_post_meta( $post_id, 'item_number_discount', true ); | |
$numb = str_replace( 'theme-', '', $item ); | |
//if ( 'POST' == $_SERVER['REQUEST_METHOD'] && !empty( $_POST['action'] ) && $_POST['action'] == 'confirmed' ) { | |
$arr = array(); |
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
$sql = "CREATE TABLE {$wpdb->prefix}venuesmeta ( | |
meta_id bigint(20) unsigned NOT NULL auto_increment, | |
venues_id bigint(20) unsigned NOT NULL default '0', | |
meta_key varchar(255) default NULL, | |
meta_value longtext, | |
PRIMARY KEY (meta_id), | |
KEY venues_id (venues_id), | |
KEY meta_key (meta_key) | |
) {$charset_collate};"; |
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: PluginName | |
* Plugin URI: http://austinpassy.com/wordpress-plugins/ | |
* Description: Core functionality for __________ | |
* Version: 1.0.0 | |
* Author: Austin Passy | |
* Author URI: http://austinpassy.com/ | |
* | |
* @copyright 2012 |
OlderNewer