/** * Constructor */ public function __construct($type = 'mycred_default') { parent::__construct('myCRED_BuddyPress', array('module_name' => 'buddypress', 'defaults' => array('visibility' => array('balance' => 0, 'history' => 0), 'balance_location' => '', 'balance_template' => '%plural% balance:', 'history_location' => '', 'history_menu_title' => array('me' => __("My History", 'mycred'), 'others' => __("%s's History", 'mycred')), 'history_menu_pos' => 99, 'history_url' => 'mycred-history', 'history_num' => 10), 'register' => false, 'add_to_core' => true), $type); if (!is_admin()) { add_action('bp_setup_nav', array($this, 'setup_nav')); } }
/** * Constructor */ public function __construct($type = 'mycred_default') { parent::__construct('myCRED_Banking_Module', array('module_name' => 'banking', 'option_id' => 'mycred_pref_bank', 'defaults' => array('active' => array(), 'services' => array(), 'service_prefs' => array()), 'labels' => array('menu' => __('Banking', 'mycred'), 'page_title' => __('Banking', 'mycred'), 'page_header' => __('Banking', 'mycred')), 'screen_id' => 'myCRED_page_banking', 'accordion' => true, 'menu_pos' => 30), $type); add_action('mycred_edit_profile', array($this, 'user_level_override'), 30, 2); add_action('mycred_edit_profile_action', array($this, 'save_user_level_override')); add_action('mycred_admin_notices', array($this, 'update_user_level_profile_notice')); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_BuyCRED_Module', array('module_name' => 'gateways', 'option_id' => 'mycred_pref_buycreds', 'defaults' => array('installed' => array(), 'active' => array(), 'gateway_prefs' => array()), 'labels' => array('menu' => __('Payment Gateways', 'mycred'), 'page_title' => __('Payment Gateways', 'mycred'), 'page_header' => __('Payment Gateways', 'mycred')), 'screen_id' => 'myCRED_page_gateways', 'accordion' => true, 'add_to_core' => true, 'menu_pos' => 85), $type); // Adjust Module to the selected point type $this->mycred_type = 'mycred_default'; if (isset($this->core->buy_creds['type'])) { $this->mycred_type = $this->core->buy_creds['type']; } add_filter('mycred_parse_log_entry', array($this, 'render_gift_tags'), 10, 2); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Ranks_Module', array('module_name' => 'rank', 'defaults' => array('public' => 0, 'base' => 'current', 'slug' => 'mycred_rank', 'bb_location' => 'top', 'bb_template' => 'Rank: %rank_title%', 'bp_location' => '', 'bb_template' => 'Rank: %rank_title%', 'order' => 'ASC', 'support' => array('content' => 0, 'excerpt' => 0, 'comments' => 0, 'page-attributes' => 0, 'custom-fields' => 0)), 'register' => false, 'add_to_core' => false)); if (!isset($this->rank['order'])) { $this->rank['order'] = 'ASC'; } if (!isset($this->rank['support'])) { $this->rank['support'] = array('content' => 0, 'excerpt' => 0, 'comments' => 0, 'page-attributes' => 0, 'custom-fields' => 0); } }
/** * Construct */ function __construct() { parent::__construct('myCRED_Sell_Content_Module', array('module_name' => 'sell_content', 'register' => false, 'defaults' => array('post_types' => 'post,page', 'type' => 'mycred_default', 'pay' => 'none', 'pay_percent' => 100, 'templates' => array('members' => '<p>Buy this %post_type% for only %price% %buy_button%</p>', 'visitors' => '<p><a href="%login_url_here%">Login</a> to buy access to this %post_type%.</p>', 'cantafford' => "<p>You do not have enough %plural% to buy access to this %post_type%.</p>\n<p><strong>Price</strong>: %price%</p>"), 'defaults' => array('price' => 10, 'overwrite_price' => 0, 'button_label' => __('Buy Now', 'mycred'), 'overwrite_buttonlabel' => 0, 'expire' => 0), 'logs' => array('buy' => 'Purchase of %link_with_title%', 'sell' => 'Sale of %link_with_title%')), 'add_to_core' => true)); // Adjust Module to the selected point type $this->mycred_type = 'mycred_default'; if (isset($this->sell_content['type'])) { $this->mycred_type = $this->sell_content['type']; } $this->core = mycred($this->mycred_type); add_filter('mycred_email_before_send', array($this, 'email_notices'), 10, 2); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Log_Module', array('module_name' => 'log', 'labels' => array('menu' => __('Log', 'mycred'), 'page_title' => __('Log', 'mycred')), 'screen_id' => 'myCRED', 'cap' => 'editor', 'accordion' => true, 'register' => false, 'menu_pos' => 10), $type); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Email_Notice_Module', array('module_name' => 'emailnotices', 'defaults' => array('from' => array('name' => get_bloginfo('name'), 'email' => get_bloginfo('admin_email'), 'reply_to' => get_bloginfo('admin_email')), 'filter' => array('subject' => 0, 'content' => 0), 'use_html' => true, 'content' => '', 'styling' => '', 'send' => '', 'override' => 0), 'register' => false, 'add_to_core' => true)); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Stats_Module', array('module_name' => 'stats', 'register' => false), $type); $this->label = sprintf('%s %s', mycred_label(), __('Statistics', 'mycred')); $this->colors = mycred_get_type_color(); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Settings_Module', array('module_name' => 'general', 'option_id' => 'mycred_pref_core', 'labels' => array('menu' => __('Settings', 'mycred'), 'page_title' => __('Settings', 'mycred'), 'page_header' => __('Settings', 'mycred')), 'screen_id' => 'myCRED_page_settings', 'accordion' => true, 'menu_pos' => 99), $type); }
public function __construct($point_type = 'mycred_default') { global $mycred_types; $this->current_pt = $point_type; if ($point_type == 'mycred_default') { $this->current_option = 'myCRED_' . $point_type . '_pay2publish'; } else { $this->current_option = $point_type . '_pay2publish'; } foreach ($mycred_types as $key => $value) { $this->mycred[$key] = mycred($key); } $this->mycredTypes[$this->counter] = $this->current_pt; $this->counter++; if (function_exists('is_multisite') && is_multisite()) { $this->_MU = true; } else { $this->_MU = false; } parent::__construct($point_type . '_pay2publish', array('module_name' => $point_type . '_pay2publish', 'labels' => array('menu' => __($point_type . '_pay2publish', 'mycred'), 'page_title' => __('Pay 2 publish ', 'mycred')), 'register' => false, 'screen_id' => $point_type . '_pay2publish', 'cap' => 'plugin', 'menu_pos' => 15), $point_type); //myCRED Module methods //hook actions and filters $this->p2p_hooks(); //add shortcodes $this->p2p_addShortCodes(); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Addons_Module', array('module_name' => 'addons', 'option_id' => 'mycred_pref_addons', 'defaults' => array('installed' => array(), 'active' => array()), 'labels' => array('menu' => __('Add-ons', 'mycred'), 'page_title' => __('Add-ons', 'mycred')), 'screen_id' => 'myCRED_page_addons', 'accordion' => true, 'menu_pos' => 30), $type); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Coupons_Module', array('module_name' => 'coupons', 'defaults' => array('log' => 'Coupon redemption', 'invalid' => 'This is not a valid coupon', 'expired' => 'This coupon has expired', 'user_limit' => 'You have already used this coupon', 'min' => 'A minimum of %min% is required to use this coupon', 'max' => 'A maximum of %max% is required to use this coupon', 'success' => 'Coupon successfully deposited into your account'), 'register' => false, 'add_to_core' => true)); add_filter('mycred_parse_log_entry_coupon', array($this, 'parse_log_entry'), 10, 2); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Notifications_Module', array('module_name' => 'notifications', 'defaults' => array('life' => 7, 'template' => '<p>%entry%</p><h1>%cred_f%</h1>', 'use_css' => 1, 'duration' => 3), 'register' => false, 'add_to_core' => true)); add_filter('mycred_add_finished', array($this, 'mycred_finished'), 90, 3); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Badge_Module', array('module_name' => 'badges', 'defaults' => array('buddypress' => '', 'bbpress' => '', 'show_all_bp' => 0, 'show_all_bb' => 0), 'labels' => array('menu' => __('Badges', 'mycred'), 'page_title' => __('Badges', 'mycred'), 'page_header' => __('Badges', 'mycred')), 'add_to_core' => true, 'register' => false, 'menu_pos' => 90), $type); }
/** * Constructor */ public function __construct() { parent::__construct('myCRED_Banking_Module', array('module_name' => 'banking', 'option_id' => 'mycred_pref_bank', 'defaults' => array('active' => array(), 'services' => array(), 'service_prefs' => array()), 'labels' => array('menu' => __('Banking', 'mycred'), 'page_title' => __('Banking', 'mycred'), 'page_header' => __('Banking', 'mycred')), 'screen_id' => 'myCRED_page_banking', 'accordion' => true, 'menu_pos' => 30)); }
/** * Construct */ function __construct($type = 'mycred_default') { parent::__construct('myCRED_Hooks_Module', array('module_name' => 'hooks', 'option_id' => 'mycred_pref_hooks', 'defaults' => array('installed' => array(), 'active' => array(), 'hook_prefs' => array()), 'labels' => array('menu' => __('Hooks', 'mycred'), 'page_title' => __('Hooks', 'mycred'), 'page_header' => __('Hooks', 'mycred')), 'screen_id' => 'myCRED_page_hooks', 'accordion' => true, 'menu_pos' => 20), $type); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Transfer_Module', array('module_name' => 'transfers', 'defaults' => array('types' => array('mycred_default'), 'logs' => array('sending' => 'Transfer of %plural% to %display_name%', 'receiving' => 'Transfer of %plural% from %display_name%'), 'errors' => array('low' => __('You do not have enough %plural% to send.', 'mycred'), 'over' => __('You have exceeded your %limit% transfer limit.', 'mycred')), 'templates' => array('login' => '', 'balance' => 'Your current balance is %balance%', 'limit' => 'Your current %limit% transfer limit is %left%', 'button' => __('Transfer', 'mycred')), 'autofill' => 'user_login', 'reload' => 1, 'limit' => array('amount' => 1000, 'limit' => 'none')), 'register' => false, 'add_to_core' => true)); add_filter('mycred_get_email_events', array($this, 'email_notice_instance'), 10, 2); add_filter('mycred_email_before_send', array($this, 'email_notices'), 10, 2); }
/** * Construct */ function __construct() { parent::__construct('myCRED_Import', array('module_name' => 'import', 'labels' => array('menu' => __('Import', 'mycred'), 'page_title' => __('Import', 'mycred'), 'page_header' => __('Import', 'mycred')), 'screen_id' => 'myCRED_page_import', 'accordion' => true, 'register' => false, 'menu_pos' => 90)); add_action('mycred_help', array($this, 'help'), 10, 2); }