/**
 * Adds plugin settings.
 *
 * @param $settings
 *
 * @return array
 */
function give_basic_fees_add_settings($settings)
{
    $basic_fee_settings = array(array('name' => __('Fee Percentage', 'give-basic-fees'), 'desc' => __('Adds a gateways fee percentage to the donation. Value should be a number, without a percentage sign.', 'give-basic-fees'), 'attributes' => array('placeholder' => '2'), 'id' => 'basic_fee_percentage', 'type' => 'text'));
    return give_settings_array_insert($settings, 'default_gateway', $basic_fee_settings);
}
Beispiel #2
0
/**
 * Filter for Email Template Preview Buttons.
 *
 * @param array $array
 *
 * @access private
 * @since  1.0
 * @return array|bool
 */
function give_email_template_preview($array)
{
    if (!current_user_can('manage_give_settings')) {
        return false;
    }
    $custom_field = array('name' => esc_html__('Preview Email', 'give'), 'desc' => esc_html__('Click the buttons to preview emails.', 'give'), 'id' => 'give_email_preview_buttons', 'type' => 'email_preview_buttons');
    return give_settings_array_insert($array, 'donation_subject', array($custom_field));
}