/**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'badgeos', 'defaults' => ''), $hook_prefs, $type);
     $key = '_mycred_values';
     if (!$this->is_main_type) {
         $key .= '_' . $this->mycred_type;
     }
     $this->metakey = $key;
 }
 /**
  * Construct
  *
  * @param array $hook_prefs configured preferences
  * @param string point type
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     if (!function_exists('wc_memberships_get_membership_plans')) {
         return;
     }
     $defaults = array();
     $this->membership_plans = wc_memberships_get_membership_plans();
     $this->textdomain = 'mycred-woocommerce-memberships';
     $defaults['any'] = array('creds' => 1, 'log' => '%plural% for any membership plan', 'limit' => '0/x');
     if (!empty($this->membership_plans)) {
         foreach ($this->membership_plans as $membership_plan) {
             $defaults[$this->sanitize_slug($membership_plan->get_slug())] = array('creds' => 1, 'log' => '%plural% for membership plan ' . $membership_plan->get_name(), 'limit' => '0/x');
         }
     }
     if (isset($hook_prefs['mycred_woocommerce_memberships'])) {
         $defaults = $hook_prefs['mycred_woocommerce_memberships'];
     }
     parent::__construct(array('id' => 'mycred_woocommerce_memberships', 'defaults' => $defaults), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type)
 {
     global $likebtn_mycred_defaults;
     $entities_mycred_defaults = array();
     // Modify default prefs
     $likebtn_entities = _likebtn_get_entities(true, false, false);
     foreach ($likebtn_entities as $entity_name => $entity_title) {
         foreach ($likebtn_mycred_defaults as $instance => $prefs) {
             $instance = $instance . '_' . $entity_name;
             $entities_mycred_defaults[$instance] = $prefs;
         }
     }
     parent::__construct(array('id' => self::ID, 'defaults' => $entities_mycred_defaults), $hook_prefs, $type);
     // Copy settings to post (to support entities)
     foreach ($likebtn_mycred_defaults as $instance => $prefs) {
         if (isset($hook_prefs[self::ID][$instance])) {
             $this->prefs[$instance . '_' . LIKEBTN_ENTITY_POST] = $hook_prefs[self::ID][$instance];
         }
     }
 }
 /**
  * Constructor
  *
  * @param array $hook_prefs configured preferences
  * @param string point type
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     $registered_post_types = get_post_types();
     $defaults = array();
     $excludes = array('page', 'attachment');
     global $textdomain;
     $this->textdomain = $textdomain;
     foreach ($registered_post_types as $post_type) {
         if (post_type_supports($post_type, 'comments')) {
             $this->available_post_types[] = $post_type;
         }
     }
     $this->available_post_types = array_diff($this->available_post_types, $excludes);
     foreach ($this->available_post_types as $post_type) {
         $defaults[$post_type] = array('creds' => 1, 'log' => '%plural% for comment on ' . $post_type, 'limit' => '0/x');
     }
     if (isset($hook_prefs['post_type_comments'])) {
         $defaults = $hook_prefs['post_type_comments'];
     }
     parent::__construct(array('id' => 'post_type_comments', 'defaults' => $defaults), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'hook_bbpress', 'defaults' => array('new_forum' => array('creds' => 1, 'log' => '%plural% for new forum', 'limit' => '0/x'), 'delete_forum' => array('creds' => 0, 'log' => '%singular% deduction for deleted forum'), 'new_topic' => array('creds' => 1, 'log' => '%plural% for new forum topic', 'author' => 0, 'limit' => '0/x'), 'delete_topic' => array('creds' => 0, 'log' => '%singular% deduction for deleted topic'), 'fav_topic' => array('creds' => 1, 'log' => '%plural% for someone favorited your forum topic', 'limit' => '0/x'), 'new_reply' => array('creds' => 1, 'log' => '%plural% for new forum reply', 'author' => 0, 'limit' => '0/x'), 'delete_reply' => array('creds' => 0, 'log' => '%singular% deduction for deleted reply'), 'show_points_in_reply' => 0, 'show_points_in_profile' => 0)), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'rtmedia', 'defaults' => array('new_media' => array('photo' => 0, 'photo_log' => '%plural% for new photo', 'video' => 0, 'video_log' => '%plural% for new video', 'music' => 0, 'music_log' => '%plural% for new music'), 'delete_media' => array('photo' => 0, 'photo_log' => '%plural% for deleting photo', 'video' => 0, 'video_log' => '%plural% for deleting video', 'music' => 0, 'music_log' => '%plural% for deleting music'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'gravityform', 'defaults' => array()), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'invite_anyone', 'defaults' => array('send_invite' => array('creds' => 1, 'log' => '%plural% for sending an invitation', 'limit' => 0), 'accept_invite' => array('creds' => 1, 'log' => '%plural% for accepted invitation', 'limit' => 0))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'affiliatewp', 'defaults' => array('signup' => array('creds' => 0, 'log' => '%plural% for becoming an affiliate'), 'visits' => array('creds' => 0, 'log' => '%plural% for referral of a visitor', 'limit' => '0/x'), 'referrals' => array('creds' => 0, 'log' => '%plural% for store referral', 'remove_log' => '%plural% refund for rejected sale', 'pay' => 'amount'))), $hook_prefs, $type);
     $this->currency = affiliate_wp()->settings->get('currency', 'USD');
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'wppolls', 'defaults' => array('creds' => 1, 'log' => '%plural% for voting')), $hook_prefs, $type);
 }
Exemple #11
0
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     global $wpdb;
     $this->wpdb = $wpdb;
     parent::__construct(array('id' => 'wp_ulike', 'defaults' => array('add_like' => array('creds' => 1, 'log' => '%plural% for liking a content', 'limit' => '0/x'), 'get_like' => array('creds' => 1, 'log' => '%plural% for getting liked from a content', 'limit' => '0/x'), 'add_unlike' => array('creds' => -1, 'log' => '%plural% deduction for unliking a content'), 'get_unlike' => array('creds' => -1, 'log' => '%plural% for getting Unliked from a content'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'gdstars', 'defaults' => array('star_rating' => array('creds' => 1, 'log' => '%plural% for rating'), 'up_down' => array('creds' => 1, 'log' => '%plural% for rating'))), $hook_prefs, $type);
 }
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'kboard_comments', 'defaults' => array('insert' => array('creds' => 1, 'log' => 'KBoard 댓글 작성'), 'delete' => array('creds' => -1, 'log' => 'KBoard 댓글 삭제'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'wpfavorite', 'defaults' => array('add' => array('creds' => 1, 'log' => '%plural% for adding a post as favorite'), 'remove' => array('creds' => 1, 'log' => '%plural% deduction for removing a post from favorites'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'hook_bp_groups', 'defaults' => array('create' => array('creds' => 10, 'log' => '%plural% for creating a new group', 'min' => 0), 'delete' => array('creds' => '-10', 'log' => '%singular% deduction for deleting a group'), 'new_topic' => array('creds' => 1, 'log' => '%plural% for new group topic', 'limit' => '0/x'), 'edit_topic' => array('creds' => 1, 'log' => '%plural% for updating group topic', 'limit' => '0/x'), 'new_post' => array('creds' => 1, 'log' => '%plural% for new group post', 'limit' => '0/x'), 'edit_post' => array('creds' => 1, 'log' => '%plural% for updating group post', 'limit' => '0/x'), 'join' => array('creds' => 1, 'log' => '%plural% for joining new group', 'limit' => '0/x'), 'leave' => array('creds' => '-5', 'log' => '%singular% deduction for leaving group'), 'avatar' => array('creds' => 1, 'log' => '%plural% for new group avatar', 'limit' => '0/x'), 'comments' => array('creds' => 1, 'log' => '%plural% for new group comment', 'limit' => '0/x'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'hook_bp_gallery', 'defaults' => array('new_gallery' => array('creds' => 1, 'log' => '%plural% for new gallery'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type)
 {
     parent::__construct(array('id' => 'vortex_like_posts_mycred', 'defaults' => array('like' => array('creds' => 1, 'log' => '%plural% for like(post)', 'author' => 4), 'dislike' => array('creds' => 0, 'log' => '%plural% deduction for dislike(post)', 'author' => '-1'), 'canceled' => "Vote canceled(post)")), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'wp_postratings', 'defaults' => array('rating' => array('creds' => 0, 'log' => '%plural% for rating', 'limit' => '0/x', 'value' => 0), 'rated' => array('creds' => 0, 'log' => '%plural% for getting a rating', 'limit' => '0/x', 'value' => 0))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'jetpack', 'defaults' => array('subscribe_site' => array('creds' => 1, 'log' => '%plural% for site subscription'), 'subscribe_comment' => array('creds' => 1, 'log' => '%plural% for comment subscription'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'hook_bp_links', 'defaults' => array('new_link' => array('creds' => 1, 'log' => '%plural% for new Link', 'limit' => '0/x'), 'vote_link' => array('creds' => 1, 'log' => '%plural% for voting on a link', 'limit' => '0/x'), 'vote_link_up' => array('creds' => 1, 'log' => '%plural% for your link voted up', 'limit' => '0/x'), 'vote_link_down' => array('creds' => 1, 'log' => '%plural% for your link voted down', 'limit' => '0/x'), 'update_link' => array('creds' => 1, 'log' => '%plural% for updating link', 'limit' => '0/x'), 'delete_link' => array('creds' => '-1', 'log' => '%singular% deduction for deleting a link'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'hook_simplepress', 'defaults' => array('new_topic' => array('creds' => 1, 'log' => '%plural% for new forum topic', 'limit' => '0/x'), 'delete_topic' => array('creds' => 0 - 1, 'log' => '%singular% deduction for deleted topic'), 'new_post' => array('creds' => 1, 'log' => '%plural% for new topic post', 'author' => 0, 'limit' => '0/x'), 'delete_post' => array('creds' => 0 - 1, 'log' => '%singular% deduction for deleted topic reply'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type)
 {
     global $likebtn_mycred_defaults;
     parent::__construct(array('id' => self::ID, 'defaults' => $likebtn_mycred_defaults), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'wooreview', 'defaults' => array('creds' => 1, 'log' => '%plural% for product review', 'limit' => '0/x')), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'eventsmanager', 'defaults' => array('attend' => array('creds' => 1, 'log' => '%plural% for attending an %link_with_title%'), 'cancel' => array('creds' => 1, 'log' => '%plural% for cancelled attendance at %link_with_title%'))), $hook_prefs, $type);
 }
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'affiliate', 'defaults' => array('visit' => array('creds' => 1, 'log' => '%plural% for referring a visitor', 'limit' => 1, 'limit_by' => 'total'), 'signup' => array('creds' => 10, 'log' => '%plural% for referring a new member', 'limit' => 1, 'limit_by' => 'total'), 'setup' => array('links' => 'username', 'IP' => 1), 'buddypress' => array('profile' => 0, 'priority' => 10, 'title' => __('Affiliate Program', 'mycred'), 'desc' => ''))), $hook_prefs, $type);
     // Let others play with the limit by
     $this->limit_by = apply_filters('mycred_affiliate_limit_by', array('total' => __('Total', 'mycred'), 'daily' => __('Per Day', 'mycred')), $this);
     // Let others play with the ref key
     $this->ref_key = apply_filters('mycred_affiliate_key', 'mref', $this);
     add_filter('mycred_parse_log_entry_signup_referral', array($this, 'parse_log_entry'), 10, 2);
 }
Exemple #26
0
 /**
  * Construct
  */
 function __construct($hook_prefs, $type = 'mycred_default')
 {
     parent::__construct(array('id' => 'badgeos', 'defaults' => ''), $hook_prefs, $type);
 }