Skip to content

Instantly share code, notes, and snippets.

@wpweb101
wpweb101 / follow-authors-listing.php
Created January 27, 2014 13:33
Follow Autors listing
<?php
global $wpw_fp_options;
$prefix = WPW_FP_META_PREFIX;
// get all custom post types
$post_types = get_post_types( array( 'public' => true ), 'objects' );
$followtext = $wpw_fp_options['authors_follow_buttons']['follow'];
@wpweb101
wpweb101 / follow-terms-listing.php
Created January 27, 2014 13:37
Follow Terms Listing
<?php
global $wpw_fp_options;
$prefix = WPW_FP_META_PREFIX;
// get all custom post types
$post_types = get_post_types( array( 'public' => true ), 'objects' );
$followtext = $wpw_fp_options['term_follow_buttons']['follow'];
$followingtext = $wpw_fp_options['term_follow_buttons']['following'];
$unfollowtext = $wpw_fp_options['term_follow_buttons']['unfollow'];
@wpweb101
wpweb101 / follow-posts-listing.php
Created January 27, 2014 13:39
Follow Posts Listing
<?php
global $wpw_fp_options;
$prefix = WPW_FP_META_PREFIX;
// get all custom post types
$post_types = get_post_types( array( 'public' => true ), 'objects' );
$followtext = $wpw_fp_options['follow_buttons']['follow'];
$followingtext = $wpw_fp_options['follow_buttons']['following'];
$unfollowtext = $wpw_fp_options['follow_buttons']['unfollow'];
<?php
register_activation_hook( __FILE__, 'edd_points_install' );
function edd_points_install() {
global $wpdb, $edd_options;
$udpopt = false;
//check earning points conversion not set
@wpweb101
wpweb101 / replace_cur.php
Last active July 28, 2021 17:21
replace edd currency symbol with points
<?php
if( class_exists( 'Easy_Digital_Downloads' ) ) {
$currency = edd_get_currency(); // get edd base currency
add_filter( 'edd_' . strtolower( $currency ) . '_currency_filter_before', 'edd_cur_change_before_format', 10, 3 );
add_filter( 'edd_' . strtolower( $currency ) . '_currency_filter_after', 'edd_cur_change_after_format', 10, 3 );
function edd_cur_change_before_format($formatted, $currency, $price) {
@wpweb101
wpweb101 / follow-category.php
Last active August 4, 2018 04:52
Follow my blog post - add support for term follow buttions on category archive page
<?php
global $post, $wp_query;
echo do_shortcode('[wpw_follow_term_me posttype="'.$post->post_type.'" taxonomy="category" termid="'.$wp_query->query_vars['cat'].'"][/wpw_follow_term_me]');
?>
@wpweb101
wpweb101 / payu-money-code.php
Last active August 29, 2015 14:08
PayU Money filter
<?php
add_filter( 'edd_payu_payment_form_arguments', 'twentytwelve_edd_payu_payment_form_arguments' );
function twentytwelve_edd_payu_payment_form_arguments( $payu_args ) {
$payu_args['service_provider'] = 'payu_paisa';
return $payu_args;
@wpweb101
wpweb101 / follow-author.php
Last active August 29, 2015 14:10
Follow my blog post - add support for author follow button on authors archive page
<?php
echo do_shortcode('[wpw_follow_author_me author_id="'.$wp_query->query_vars['author'].'"][/wpw_follow_author_me]');
?>
@wpweb101
wpweb101 / follow-tags.php
Last active August 4, 2018 04:54
Follow my blog post - add support for tag follow buttons on tags archive page
<?php
global $post, $wp_query;
echo do_shortcode('[wpw_follow_term_me posttype="'.$post->post_type.'" taxonomy="post_tag" termid="'.$wp_query->query_vars['tag_id'].'"][/wpw_follow_term_me]');
?>
@wpweb101
wpweb101 / functions.php
Created January 30, 2015 13:13
Social Deals - Vendors : Change vendor URL slug
<?php
add_filter( 'sde_vendors_vendor_slug', 'change_vendor_url_slug' );
function change_vendor_url_slug( $slug ) {
$slug = 'new_url';
return $slug;
}
?>