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 avr_replace_title_with_meta( $title, $id ) { | |
$type = get_post_type(); | |
if ( in_array( $type, array( 'property', 'rate' ) ) ) | |
$title = get_post_meta( $id, 'avr_' . $type . '_title', true ); | |
return $title; | |
} | |
add_filter( 'the_title', 'avr_replace_title_with_meta', 10, 2 ); |
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 ( is_home() ) | |
nivo_slider( 123 ); | |
?> |
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 | |
/** | |
* API shit | |
*/ | |
error_reporting(E_ALL); | |
ini_set('display_errors', true); | |
include_once '/var/www/xhprof/external/header.php'; | |
$start = microtime(true); |
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 remove_start_the_query() { | |
remove_action( 'template_redirect', 'wpsc_start_the_query', 8 ); | |
} | |
add_action( 'template_redirect', 'remove_start_the_query' ); |
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 | |
class GFFormList{ | |
public static function form_list_page(){ | |
global $wpdb; | |
if(!GFCommon::ensure_wp_version()) | |
return; | |
echo GFCommon::get_remote_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 | |
$args = array( | |
'meta_key' => '_cs-expire-date', | |
'orderby' => 'meta_value_num', | |
'order' => 'ASC', | |
'meta_query' => array( | |
array( | |
'key' => '_cs-expire-date', | |
'value' => time(), | |
'compare' => '>=', |
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 | |
$links = array( | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', | |
'web development' => 'http://www.c9labs.com/web-dev/', |
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( 'get_post_metadata', 'zao_edit_per_product_shipping', 10, 4 ); | |
function zao_edit_per_product_shipping( $check, $object_id, $meta_key, $single ) { | |
if ( '_wpsc_product_metadata' === $meta_key && has_filter( 'get_post_metadata', 'zao_edit_per_product_shipping' ) ) { | |
remove_filter( 'get_post_metadata', 'zao_edit_per_product_shipping', 10, 4 ); | |
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 rkv_url_spamcheck( $approved , $commentdata ) { | |
return ( strlen( $commentdata['comment_author_url'] ) > 50 ) ? 'spam' : $approved; | |
} | |
add_filter( 'pre_comment_approved', 'rkv_url_spamcheck', 99, 2 ); |
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
//This would be the code that hooks into the custom event. Plugin authors should take this approach vs. the old PHP hook. | |
jQuery( document ).on( 'wpsc_fancy_notification', function( event ){ | |
console.log(event.response); | |
}); | |
function() { | |
var success = function( response ) { | |
jQuery( document ).trigger( { type : 'wpsc_fancy_notification', response : response } ); | |
jQuery('div.shopping-cart-wrapper').html( response.widget_output ); |
OlderNewer