コード例 #1
0
function epl_wp_login($user_login, $user)
{
    if (!epl_um_is_active()) {
        return null;
    }
    if (!EPL_IS_ADMIN && !isset($_SESSION['temp_fields']['user_id'])) {
        $_SESSION['temp_fields']['user_id'] = $user->ID;
    }
}
コード例 #2
0
function epl_get_api_fields()
{
    global $epl_fields;
    $epl_fields['epl_api_option_fields'] = array('epl_api_key' => array('input_type' => 'text', 'input_name' => 'epl_api_key', 'label' => epl__('Support License Key'), 'help_text' => 'The Support License Key will enable the pro version, allow automatic downloads of new versions of the plugin and modules that you have purchased.  The key can be obtained from ' . get_option('epl_help_url', true), 'class' => 'epl_w400', 'required' => true), 'epl_api_section' => array('input_type' => 'section', 'label' => '', 'class' => '', 'style' => 'font-size:12px', 'content' => "Custom Tables" . "<div style='font-size:12px;'>Version 2.0 introduces custom registration db tables.  They need to be populated with current registration data.  " . "WARNING. It is highly encouraged to do a backup of your database, just in case things go wrong (unlikely but we want to be safe).  If you have a large data set (>1000 registrations), this may take up to a few minutes. " . epl_anchor(admin_url('/edit.php?post_type=epl_event&epl_action=populate_db_tables&epl_controller=epl_registration&r=1&epl_download_trigger=1'), 'Click here', '_self', 'class="button-secondary"') . " to populate/repopulate the tables." . " Latest run was performed on: " . '<strong>' . get_option('_epl_last_table_refresh', 'Never') . '</strong>'));
    if (epl_is_addon_active('_epl_atp')) {
        $epl_fields['epl_api_option_fields'] += array('epl_atp_section' => array('input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => epl__('Advanced Time/Price Settings')), 'epl_atp_enable_date_specific_time' => array('input_type' => 'select', 'input_name' => 'epl_atp_enable_date_specific_time', 'options' => epl_yes_no(), 'default_value' => 10, 'label' => epl__('Enable date specific times?')), 'epl_atp_enable_date_specific_price' => array('input_type' => 'select', 'input_name' => 'epl_atp_enable_date_specific_price', 'options' => epl_yes_no(), 'default_value' => 10, 'label' => epl__('Enable date specific price?')), 'epl_atp_enable_price_specific_form' => array('input_type' => 'select', 'input_name' => 'epl_atp_enable_price_specific_form', 'options' => epl_yes_no(), 'default_value' => 10, 'label' => epl__('Enable price specific forms?')), 'epl_atp_enable_table_price_type' => array('input_type' => 'select', 'input_name' => 'epl_atp_enable_table_price_type', 'options' => epl_yes_no(), 'default_value' => 10, 'label' => epl__('Enable table price type?')));
    }
    if (!epl_is_addon_active('ASDFAWEEFADSF')) {
        return $epl_fields;
    }
    $epl_fields['epl_api_option_fields'] += array('epl_mc_section' => array('input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => epl__('MailChimp Settings.  Please enter your key and hit Save Changes to begin.')), 'epl_mc_key' => array('input_type' => 'password', 'input_name' => 'epl_mc_key', 'label' => epl__('Mailchimp API Key'), 'class' => 'epl_w400', 'required' => true));
    if (epl_get_setting('epl_api_option_fields', 'epl_mc_key') != '') {
        $epl_fields['epl_api_option_fields'] += array('epl_mc_action' => array('input_type' => 'select', 'input_name' => 'epl_mc_action', 'options' => array(0 => epl__('No'), 1 => epl__('Enable for all current and future events'), 2 => epl__('I will choose for each event')), 'help_text' => epl__('If you select No, this feature will be diabled at global and event level. If you select the second option, you can still override it for each event.'), 'id' => 'epl_mc_default_action', 'label' => epl__('Enable MailChimp Extension'), 'help_icon_type' => '-red', 'default_value' => 1, 'class' => 'epl_field_type', 'default_value' => ''), 'epl_mc_double_opt_in' => array('input_type' => 'select', 'input_name' => 'epl_mc_double_opt_in', 'options' => epl_yes_no(), 'id' => 'epl_mc_double_opt_in', 'label' => epl__('Double Opt In (global)'), 'help_text' => epl__('When this option is enabled, MailChimp will send a confirmation email to the user and will only add them to your MailChimp list upon confirmation.'), 'default_value' => 0), 'epl_mc_send_welcome_email' => array('input_type' => 'select', 'input_name' => 'epl_mc_send_welcome_email', 'id' => 'epl_mc_send_welcome_email', 'label' => epl__('Send Welcome Email (global)'), 'help_text' => epl__('When this option is enabled, users will receive an automatic welcome email from MailChimp upon being added to your MailChimp list.'), 'options' => epl_yes_no(), 'class' => 'epl_field_type', 'default_value' => ''), '_epl_mc_offer_notification_sign_up' => array('input_type' => 'select', 'input_name' => '_epl_mc_offer_notification_sign_up', 'options' => array(1 => epl__('Ask'), 3 => epl__('Automatically add')), 'default_value' => 1, 'label' => epl__('User Signup Method (default)')), 'epl_mc_permission_label' => array('input_type' => 'text', 'input_name' => 'epl_mc_permission_label', 'label' => epl__('Permission Label'), 'help_text' => epl__('This label will be displayed during the registration process if you choose to ask the users for permission to sign them up.'), 'class' => 'epl_w400', 'default_value' => epl__('Subscribe to our newsletter')), '_epl_mc_default_list' => array('input_type' => 'select', 'input_name' => '_epl_mc_default_list', 'options' => epl_get_mailchimp_lists(), 'empty_row' => true, 'default_value' => '', 'label' => epl__('Default Notification List')));
    }
    if (epl_um_is_active()) {
        $epl_fields['epl_api_option_fields'] += array('epl_um_section' => array('input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => epl__('User Manager Settings') . '<br/><span style="font-size:12px;"> - ' . epl__("Please note that this feature will only work if the Primary Registrant form is enabled.") . '</span>'), 'epl_um_enable_user_regis' => array('input_type' => 'select', 'input_name' => 'epl_um_enable_user_regis', 'label' => epl__('Enable User Registration?'), 'options' => array(0 => epl__('No'), 1 => epl__('Yes')), 'default_value' => 0), 'epl_um_user_regis_username' => array('input_type' => 'select', 'input_name' => 'epl_um_user_regis_username', 'label' => epl__('Username'), 'options' => array(1 => epl__('Email'), 2 => epl__('Let user choose')), 'default_value' => 1), 'epl_um_user_regis_password' => array('input_type' => 'select', 'input_name' => 'epl_um_user_regis_password', 'label' => epl__('Password'), 'options' => array(1 => epl__('Automatic'), 2 => epl__('Let user choose')), 'default_value' => 1), 'epl_um_user_regis_role' => array('input_type' => 'select', 'input_name' => 'epl_um_user_regis_role', 'label' => epl__('Role to assign'), 'options' => epl_get_roles_arr(), 'default_value' => 'subscriber'));
    }
    $epl_fields['epl_api_option_fields'] += array('epl_invoice_section' => array('input_type' => 'section', 'label' => '', 'class' => 'epl_font_555 epl_font_bold', 'content' => epl__('Invoice Settings')), 'epl_invoice_attach_to_conf' => array('input_type' => 'select', 'input_name' => 'epl_invoice_attach_to_conf', 'id' => 'epl_invoice_send_in_conf', 'label' => epl__('Attach invoice to confirmation emails?'), 'help_text' => epl__('If no, you can still attach invoices to emails that are sent manually.'), 'options' => epl_yes_no(), 'default_value' => 0), 'epl_invoice_logo' => array('input_type' => 'text', 'input_name' => 'epl_invoice_logo', 'id' => 'epl_invoice_logo', 'class' => 'epl_w400', 'label' => epl__('Invoice Logo'), 'description' => epl_anchor('#', epl__('Select File'), null, ' id="epl_invoice_logo_select"')), 'epl_invoice_display_id' => array('input_type' => 'select', 'input_name' => 'epl_invoice_display_id', 'id' => 'epl_invoice_display_id', 'label' => epl__('Invoice Id'), 'options' => array(1 => epl__('Registration Post ID'), 2 => epl__('Registration Title'), 3 => epl__('Incremental ID'))), 'epl_invoice_due' => array('input_type' => 'text', 'input_name' => 'epl_invoice_due', 'class' => 'epl_w40', 'label' => epl__('Invoice Payment Due'), 'help_text' => epl__('Number of days after issue date when the payment is due.')), 'epl_invoice_company_info' => array('input_type' => 'textarea', 'input_name' => 'epl_invoice_company_info', 'id' => 'epl_invoice_company_info', 'label' => epl__('Invoice Company Information'), 'help_text' => epl__('This will be posted on the top right cornerof the invoice.  Can use HTML'), 'style' => 'width:300px;height:120px;', '_save_func' => 'wp_kses_post'), 'epl_invoice_instruction' => array('input_type' => 'textarea', 'input_name' => 'epl_invoice_instruction', 'id' => 'epl_invoice_instruction', 'label' => epl__('Instructions'), 'help_text' => epl__('This will be posted on the bottom of the invoice.'), 'style' => 'width:90%;height:120px;', '_save_func' => 'wp_kses_post'));
    return $epl_fields;
}