Plugin Directory

Changeset 1029002


Ignore:
Timestamp:
11/19/2014 11:04:01 PM (11 years ago)
Author:
bryanmonzon
Message:

a few fixes and some new functions

Location:
simple-campaigns/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • simple-campaigns/trunk/includes/admin/campaigns/metabox.php

    r987552 r1029002  
    6464    $fields = apply_filters( 's_camps_metabox_fields_save', array(
    6565            's_camps_goal',
    66             's_camps_percent_funded',
    67             's_camps_amount_raised',
    68             's_camps_donor_count',
    69             's_camps_donor_list',
    7066            's_camps_default_donation_amount',
    7167            's_camps_donation_type',
  • simple-campaigns/trunk/includes/shortcodes.php

    r989747 r1029002  
    3939}
    4040add_shortcode('donate_button', 's_camps_donate_button_shortcode');
     41
     42
     43/**
     44 * Simple shortcode to display total raised.
     45 *
     46 * @since  1.0.7
     47 * @param  [type] $atts    [description]
     48 * @param  [type] $content [description]
     49 * @return [type]          [description]
     50 */
     51function s_camps_total_raised_shortcode( $atts, $content = null )
     52{
     53    extract( shortcode_atts( array(
     54        'dollar_sign'   => true
     55    ), $atts ) );
     56
     57    $sign = $dollar_sign ? '$' : null;
     58    return $sign . s_camps_get_total_raised();
     59}
     60add_shortcode( 'total_raised', 's_camps_total_raised_shortcode' );
     61
     62
     63function s_camps_total_campaigns_shortcode( $atts, $content=null)
     64{
     65    return s_camps_get_total_number_campaigns();
     66}
     67add_shortcode( 'total_campaigns', 's_camps_total_campaigns_shortcode' );
  • simple-campaigns/trunk/readme.txt

    r997863 r1029002  
    44Requires at least: 3.0.1
    55Tested up to: 4.0
    6 Version: 1.0.6
    7 Stable tag: 1.0.6
     6Version: 1.0.7
     7Stable tag: 1.0.7
    88
    99License: GPLv2 or later
     
    6464== Changelog ==
    6565
     66= 1.0.7: November 19, 2014 =
     67FIX: Fixed an issue where campaign meta might get deleted on post save
     68NEW: Function `s_camps_get_total_raised();` to get total of all campaigns
     69NEW: Shortcode to display [total_raised]
     70NEW: Function `s_camps_get_total_number_campaigns();` that returns total number of campaigns
     71NEW" Shortcode to display the `[total_campaigns]` (the number of active/published campaigns )
     72
    6673= 1.0.6: September 28, 2014 =
    6774NEW: Ability to pass campaign title to a hidden field.
  • simple-campaigns/trunk/simple-campaigns.php

    r997863 r1029002  
    44 * Plugin URI: http://wordpress.org/plugins/simple-campaigns
    55 * Description: Easily create campaigns and track with Gravity Forms
    6  * Version: 1.0.6
     6 * Version: 1.0.7
    77 * Author: WP Setup
    88 * Author URI: http://wpsetup.co
     
    6666    // Plugin version
    6767    if ( ! defined( 'S_CAMPS_VERSION' ) )
    68       define( 'S_CAMPS_VERSION', '1.0.6' );
     68      define( 'S_CAMPS_VERSION', '1.0.7' );
    6969
    7070    // Plugin Folder Path
     
    104104    require_once S_CAMPS_PLUGIN_DIR . '/includes/scripts.php';
    105105    require_once S_CAMPS_PLUGIN_DIR . '/includes/shortcodes.php';
     106    require_once S_CAMPS_PLUGIN_DIR . '/includes/numbers-functions.php';
    106107    require_once S_CAMPS_PLUGIN_DIR . '/includes/admin/campaigns/functions.php';
    107108
Note: See TracChangeset for help on using the changeset viewer.