/**
  * Campaign Type
  *
  * @since Astoundify Crowdfunding 0.7
  *
  * @return string $type The type of campaign
  */
 public function type()
 {
     $type = $this->__get('campaign_type');
     if (!$type) {
         $type = atcf_campaign_type_default();
     }
     return $type;
 }
Example #2
0
function wpo_field_submit()
{
    global $edd_options;
    $min = isset($edd_options['atcf_campaign_length_min']) ? $edd_options['atcf_campaign_length_min'] : 14;
    $max = isset($edd_options['atcf_campaign_length_max']) ? $edd_options['atcf_campaign_length_max'] : 48;
    return array('campaign_heading' => array('label' => __('Campaign Information', TEXTDOMAIN), 'type' => 'heading', 'default' => null, 'editable' => true, 'priority' => 2), 'title' => array('label' => __('Title', TEXTDOMAIN), 'default' => null, 'type' => 'text', 'editable' => false, 'placeholder' => null, 'required' => true, 'priority' => 4), 'goal' => array('label' => sprintf(__('Goal (%s)', TEXTDOMAIN), edd_currency_filter('')), 'default' => null, 'type' => 'text', 'editable' => false, 'placeholder' => edd_format_amount(800), 'required' => true, 'priority' => 6), 'length' => array('label' => __('Length', TEXTDOMAIN), 'default' => floor(($min + $max) / 2), 'type' => 'number', 'editable' => false, 'placeholder' => null, 'min' => $min, 'max' => $max, 'step' => 1, 'priority' => 8), 'type' => array('label' => __('Funding Type', TEXTDOMAIN), 'default' => atcf_campaign_type_default(), 'type' => 'radio', 'options' => atcf_campaign_types_active(), 'editable' => false, 'placeholder' => null, 'required' => true, 'priority' => 10), 'category' => array('label' => __('Categories', TEXTDOMAIN), 'default' => null, 'type' => 'term_checklist', 'editable' => true, 'placeholder' => null, 'priority' => 12), 'tag' => array('label' => __('Tags', TEXTDOMAIN), 'default' => null, 'type' => 'term_checklist', 'editable' => true, 'placeholder' => null, 'priority' => 14), 'image' => array('label' => __('Featured Image', TEXTDOMAIN), 'default' => null, 'type' => 'featured_image', 'editable' => true, 'placeholder' => null, 'priority' => 16), 'video' => array('label' => __('Featured Video URL', TEXTDOMAIN), 'default' => null, 'type' => 'text', 'editable' => true, 'placeholder' => null, 'priority' => 18), 'description' => array('label' => __('Description', TEXTDOMAIN), 'default' => null, 'type' => 'wp_editor', 'editable' => true, 'placeholder' => null, 'required' => true, 'priority' => 20), 'updates' => array('label' => __('Updates', TEXTDOMAIN), 'default' => null, 'type' => 'wp_editor', 'editable' => 'only', 'placeholder' => null, 'priority' => 22), 'excerpt' => array('label' => __('Excerpt', TEXTDOMAIN), 'default' => null, 'type' => 'textarea', 'editable' => true, 'placeholder' => null, 'priority' => 24), 'backer_rewards_heading' => array('label' => __('Backer Rewards', TEXTDOMAIN), 'type' => 'heading', 'default' => null, 'editable' => true, 'priority' => 26), 'physical' => array('label' => __('Collect shipping information on checkout.', TEXTDOMAIN), 'default' => null, 'type' => 'checkbox', 'editable' => true, 'placeholder' => null, 'priority' => 28), 'norewards' => array('label' => __('No rewards, donations only.', TEXTDOMAIN), 'default' => null, 'type' => 'checkbox', 'editable' => false, 'placeholder' => null, 'priority' => 30), 'rewards' => array('label' => null, 'type' => 'rewards', 'required' => false, 'default' => null, 'editable' => true, 'priority' => 32), 'info_heading' => array('label' => __('Your Information', TEXTDOMAIN), 'type' => 'heading', 'default' => null, 'editable' => true, 'priority' => 34), 'contact_email' => array('label' => __('Contact Email', TEXTDOMAIN), 'default' => null, 'type' => 'text', 'editable' => true, 'placeholder' => null, 'required' => true, 'priority' => 36), 'organization' => array('label' => __('Name/Organization', TEXTDOMAIN), 'default' => null, 'type' => 'text', 'editable' => true, 'placeholder' => null, 'priority' => 38), 'location' => array('label' => __('Location', TEXTDOMAIN), 'default' => null, 'type' => 'text', 'editable' => true, 'placeholder' => null, 'priority' => 40));
}