function mycred_get_all_references() { // Hooks $hooks = array('registration' => __('Website Registration', 'mycred'), 'site_visit' => __('Website Visit', 'mycred'), 'view_content' => __('Viewing Content (Member)', 'mycred'), 'view_content_author' => __('Viewing Content (Author)', 'mycred'), 'logging_in' => __('Logging in', 'mycred'), 'publishing_content' => __('Publishing Content', 'mycred'), 'approved_comment' => __('Approved Comment', 'mycred'), 'unapproved_comment' => __('Unapproved Comment', 'mycred'), 'spam_comment' => __('SPAM Comment', 'mycred'), 'deleted_comment' => __('Deleted Comment', 'mycred'), 'link_click' => __('Link Click', 'mycred'), 'watching_video' => __('Watching Video', 'mycred'), 'visitor_referral' => __('Visitor Referral', 'mycred'), 'signup_referral' => __('Signup Referral', 'mycred')); if (class_exists('BuddyPress')) { $hooks['new_profile_update'] = __('New Profile Update', 'mycred'); $hooks['deleted_profile_update'] = __('Profile Update Removal', 'mycred'); $hooks['upload_avatar'] = __('Avatar Upload', 'mycred'); $hooks['new_friendship'] = __('New Friendship', 'mycred'); $hooks['ended_friendship'] = __('Ended Friendship', 'mycred'); $hooks['new_comment'] = __('New Profile Comment', 'mycred'); $hooks['comment_deletion'] = __('Profile Comment Deletion', 'mycred'); $hooks['new_message'] = __('New Message', 'mycred'); $hooks['sending_gift'] = __('Sending Gift', 'mycred'); $hooks['creation_of_new_group'] = __('New Group', 'mycred'); $hooks['deletion_of_group'] = __('Deleted Group', 'mycred'); $hooks['new_group_forum_topic'] = __('New Group Forum Topic', 'mycred'); $hooks['edit_group_forum_topic'] = __('Edit Group Forum Topic', 'mycred'); $hooks['new_group_forum_post'] = __('New Group Forum Post', 'mycred'); $hooks['edit_group_forum_post'] = __('Edit Group Forum Post', 'mycred'); $hooks['joining_group'] = __('Joining Group', 'mycred'); $hooks['leaving_group'] = __('Leaving Group', 'mycred'); $hooks['upload_group_avatar'] = __('New Group Avatar', 'mycred'); $hooks['new_group_comment'] = __('New Group Comment', 'mycred'); } if (function_exists('bpa_init') || function_exists('bpgpls_init')) { $hooks['photo_upload'] = __('Photo Upload', 'mycred'); $hooks['video_upload'] = __('Video Upload', 'mycred'); $hooks['music_upload'] = __('Music Upload', 'mycred'); } if (function_exists('bp_links_setup_root_component')) { $hooks['new_link'] = __('New Link', 'mycred'); $hooks['link_voting'] = __('Link Voting', 'mycred'); $hooks['update_link'] = __('Link Update', 'mycred'); } if (class_exists('bbPress')) { $hooks['new_forum'] = __('New Forum (bbPress)', 'mycred'); $hooks['new_forum_topic'] = __('New Forum Topic (bbPress)', 'mycred'); $hooks['topic_favorited'] = __('Favorited Topic (bbPress)', 'mycred'); $hooks['new_forum_reply'] = __('New Topic Reply (bbPress)', 'mycred'); } if (function_exists('wpcf7')) { $hooks['contact_form_submission'] = __('Form Submission (Contact Form 7)', 'mycred'); } if (class_exists('GFForms')) { $hooks['gravity_form_submission'] = __('Form Submission (Gravity Form)', 'mycred'); } if (defined('SFTOPICS')) { $hooks['new_forum_topic'] = __('New Forum Topic (SimplePress)', 'mycred'); $hooks['new_topic_post'] = __('New Forum Post (SimplePress)', 'mycred'); } if (function_exists('install_ShareThis')) { $share = mycred_get_share_service_names(); $hooks = array_merge_recursive($share, $hooks); } if (class_exists('Affiliate_WP')) { $hooks['affiliate_signup'] = __('Affiliate Signup (AffiliateWP)', 'mycred'); $hooks['affiliate_visit_referral'] = __('Referred Visit (AffiliateWP)', 'mycred'); $hooks['affiliate_referral'] = __('Affiliate Referral (AffiliateWP)', 'mycred'); $hooks['affiliate_referral_refund'] = __('Referral Refund (AffiliateWP)', 'mycred'); } if (defined('WP_POSTRATINGS_VERSION')) { $hooks['post_rating'] = __('Adding a Rating', 'mycred'); $hooks['post_rating_author'] = __('Receiving a Rating', 'mycred'); } if (function_exists('vote_poll')) { $hooks['poll_voting'] = __('Poll Voting', 'mycred'); } if (function_exists('invite_anyone_init')) { $hooks['sending_an_invite'] = __('Sending an Invite', 'mycred'); $hooks['accepting_an_invite'] = __('Accepting an Invite', 'mycred'); } // Addons $addons = array(); if (class_exists('myCRED_Banking_Module')) { $addons['payout'] = __('Banking Payout', 'mycred'); } if (class_exists('myCRED_buyCRED_Module')) { $addons['buy_creds_with_paypal_standard'] = __('buyCRED Purchase (PayPal Standard)', 'mycred'); $addons['buy_creds_with_skrill'] = __('buyCRED Purchase (Skrill)', 'mycred'); $addons['buy_creds_with_zombaio'] = __('buyCRED Purchase (Zombaio)', 'mycred'); $addons['buy_creds_with_netbilling'] = __('buyCRED Purchase (NETBilling)', 'mycred'); $addons['buy_creds_with_bitpay'] = __('buyCRED Purchase (BitPay)', 'mycred'); $addons = apply_filters('mycred_buycred_refs', $addons); } if (class_exists('myCRED_Coupons_Module')) { $addons['coupon'] = __('Coupon Purchase', 'mycred'); } if (defined('myCRED_GATE')) { if (class_exists('WooCommerce')) { $addons['woocommerce_payment'] = __('Store Purchase (WooCommerce)', 'mycred'); $addons['reward'] = __('Store Reward (WooCommerce)', 'mycred'); $addons['product_review'] = __('Product Review (WooCommerce)', 'mycred'); } if (class_exists('MarketPress')) { $addons['marketpress_payment'] = __('Store Purchase (MarketPress)', 'mycred'); $addons['marketpress_reward'] = __('Store Reward (MarketPress)', 'mycred'); } if (class_exists('wpsc_merchant')) { $addons['wpecom_payment'] = __('Store Purchase (WP E-Commerce)', 'mycred'); } $addons = apply_filters('mycred_gateway_refs', $addons); } if (defined('EVENT_ESPRESSO_VERSION')) { $addons['event_payment'] = __('Event Payment (Event Espresso)', 'mycred'); $addons['event_sale'] = __('Event Sale (Event Espresso)', 'mycred'); } if (defined('EM_VERSION')) { $addons['ticket_purchase'] = __('Event Payment (Events Manager)', 'mycred'); $addons['ticket_sale'] = __('Event Sale (Events Manager)', 'mycred'); } if (class_exists('myCRED_Sell_Content_Module')) { $addons['buy_content'] = __('Content Purchase / Sale', 'mycred'); } if (class_exists('myCRED_Transfer_Module')) { $addons['transfer'] = __('Transfer', 'mycred'); } $references = array_merge($hooks, $addons); $references['manual'] = __('Manual Adjustment by Admin', 'mycred'); return apply_filters('mycred_all_references', $references); }
/** * Preferences for ShareThis Hook * @since 0.1 * @version 1.1 */ public function preferences() { $prefs = $this->prefs; $st_public_key = get_option('st_pubid', false); $st_services = get_option('st_services', false); // Public key is not yet setup if ($st_public_key === false) { echo '<p>' . __('Your ShareThis public key is not set.', 'mycred') . '</p>'; // Services is not yet setup } elseif ($st_services === false) { echo '<p>' . __('No ShareThis services detected. Please check your installation.', 'mycred') . '</p>'; // All is well! } else { $names = mycred_get_share_service_names(); // Loop though selected services $services = explode(',', $st_services); // Add facebook unlike to facebook like. if (in_array('fblike', $services)) { $services[] = 'fbunlike'; } foreach ($services as $service) { $service = str_replace(' ', '', $service); if ($service == '' || $service == 'sharethis') { continue; } if (!isset($this->prefs[$service])) { $this->prefs[$service] = array('creds' => 0, 'log' => '%plural% for sharing %link_with_title% on %service%', 'limit' => '0/x'); } if (!isset($this->prefs[$service]['limit'])) { $this->prefs[$service]['limit'] = '0/x'; } if (isset($names[$service])) { $service_name = $names[$service]; } else { $service_name = ucfirst($service); } ?> <label for="<?php echo $this->field_id(array($service, 'creds')); ?> " class="subheader"><?php echo $service_name; ?> </label> <ol> <li> <div class="h2"><input type="text" name="<?php echo $this->field_name(array($service, 'creds')); ?> " id="<?php echo $this->field_id(array($service, 'creds')); ?> " value="<?php echo $this->core->number($this->prefs[$service]['creds']); ?> " size="8" /></div> </li> <li> <label for="<?php echo $this->field_id(array($service, 'limit')); ?> "><?php _e('Limit', 'mycred'); ?> </label> <?php echo $this->hook_limit_setting($this->field_name(array($service, 'limit')), $this->field_id(array($service, 'limit')), $prefs[$service]['limit']); ?> </li> <li class="empty"> </li> <li> <label for="<?php echo $this->field_id(array($service, 'log')); ?> "><?php _e('Log template', 'mycred'); ?> </label> <div class="h2"><input type="text" name="<?php echo $this->field_name(array($service, 'log')); ?> " id="<?php echo $this->field_id(array($service, 'log')); ?> " value="<?php echo esc_attr($this->prefs[$service]['log']); ?> " class="long" /></div> <span class="description"><?php echo $this->available_template_tags(array('general', 'post'), '%service%'); ?> </span> </li> </ol> <?php } } }