Plugin Directory

Changeset 1667282


Ignore:
Timestamp:
05/30/2017 07:45:44 PM (9 years ago)
Author:
MikeGillihan
Message:

add subscriptions support

Location:
bb-connect-for-give-donations
Files:
31 added
6 edited

Legend:

Unmodified
Added
Removed
  • bb-connect-for-give-donations/trunk/bb-connect-give.php

    r1666281 r1667282  
    44 * Plugin URI: https://wordpress.org/plugins/bb-connect-for-give-donations/
    55 * Description: Easily integrate Give Donations with Beaver Builder.
    6  * Version: 2.0
     6 * Version: 2.1
    77 * Author: PurposeWP
    88 * Author URI: https://purposewp.com
  • bb-connect-for-give-donations/trunk/fields/bbc-toggle/bbc-toggle.php

    r1666249 r1667282  
    4848            $output .= '.bbc-toggle .' . $name . ':checked + .' . $name . '{';
    4949            $output .= 'background: #1e8cbe;';
     50            $output .= 'background: #2ea2cc;';
    5051            $output .= 'border-color: #0074a2;';
    5152            $output .= 'color: #fff;';
  • bb-connect-for-give-donations/trunk/fields/bbc-toggle/css/bbc-toggle.css

    r1666249 r1667282  
    1313.bbc-toggle label {
    1414  display: inline-block;
    15   width: 60px;
     15  width: 35px;
    1616  font-size: 14px;
    1717  font-weight: normal;
    1818  text-align: center;
    1919  text-shadow: none;
    20   padding: 4px;
     20  padding: 5px 9px;
    2121  border: 1px solid rgba(0, 0, 0, 0.2);
    2222 
     
    3131}
    3232.bbc-toggle input:checked + label {
    33 /*  background-color: #A5DC86;*/
    3433  -webkit-box-shadow: none;
    3534  box-shadow: none;
  • bb-connect-for-give-donations/trunk/modules/bbc-give-account/bbc-give-account.php

    r1666249 r1667282  
    22
    33/**
    4  * @class BBC_Give_Account
    5  * @since 2.0
     4 * @class  BBC_Give_Account
     5 * @since  2.0
     6 * @credit The Beaver Builder (https://beaverbuilder.com) team for the Tabs module which is what we based  this upon and the team at UABB (https://www.ultimatebeaver.com) for their clever implementation of toggle fields.
    67 */
    78class BBC_Give_Account extends FLBuilderModule {
     
    1920
    2021        $this->add_css( 'font-awesome' );
     22    }
     23
     24    /**
     25     * Return the Subscription Tab settings if Give Recurring is active
     26     *
     27     * @return array
     28     */
     29    public static function bbc_do_subscriptions() {
     30        if ( !class_exists( 'Give_Recurring' ) ) {
     31            return;
     32        }
     33
     34        $settings = array(
     35            'type'        => 'bbc-toggle',
     36            'label'       => __( 'Subscriptions', 'bbc-give' ),
     37            'description' => '',
     38            'default'     => 'false',
     39            'options'     => array(
     40                'true'  => __( 'Show', 'bbc-give' ),
     41                'false' => __( 'Hide', 'bbc-give' ),
     42            ),
     43            'help'    => __( 'Displays the Subscriptions tab. Default is “Hide”', 'bbc-give' )
     44        );
     45
     46        return $settings;
    2147    }
    2248}
     
    4470                'title'  => '',
    4571                'fields' => array(
    46                     'profile' => array(
     72                    'profile'       => array(
    4773                        'type'        => 'bbc-toggle',
    48                         'label'       => __( 'Donor Profile', 'bbc-give' ),
     74                        'label'       => __( 'Profile Editor', 'bbc-give' ),
    4975                        'description' => '',
    5076                        'default'     => 'true',
     
    5379                            'false' => __( 'Hide', 'bbc-give' ),
    5480                        ),
     81                        'help'    => __( 'Displays the Profile Editor tab. Default is “Show”', 'bbc-give' )
    5582                    ),
    56                     'history' => array(
     83                    'history'       => array(
    5784                        'type'        => 'bbc-toggle',
    5885                        'label'       => __( 'Donation History', 'bbc-give' ),
     
    6390                            'false' => __( 'Hide', 'bbc-give' ),
    6491                        ),
     92                        'help'    => __( 'Displays the Donation History tab. Default is “Show”', 'bbc-give' )
    6593                    ),
     94                    'subscriptions' => BBC_Give_Account::bbc_do_subscriptions(),
    6695                )
    6796            ),
  • bb-connect-for-give-donations/trunk/modules/bbc-give-account/includes/frontend.php

    r1666249 r1667282  
    66        'id'      => 'profile',
    77        'label'   => 'Donor Profile',
    8         'enabled' => 'true' == $settings->profile
     8        'enabled' => 'true' == $settings->profile,
     9        'shortcode' => '[give_profile_editor]'
    910    ),
    1011    'history' => array(
    1112        'id'      => 'history',
    1213        'label'   => 'Donation History',
    13         'enabled' => 'true' == $settings->history
     14        'enabled' => 'true' == $settings->history,
     15        'shortcode' => '[donation_history]'
     16    ),
     17    'subscriptions' => array(
     18        'id'      => 'subscriptions',
     19        'label'   => 'Subscriptions',
     20        'enabled' => 'true' == $settings->subscriptions,
     21        'shortcode' => '[give_subscriptions]'
    1422    ),
    1523);
     
    7987                         role="tabpanel"
    8088                         aria-live="polite">
    81                         <?php echo do_shortcode( 'profile' == $tab ? '[give_profile_editor]' : '[donation_history]' ); ?>
     89                        <?php echo do_shortcode( $tab_settings['shortcode'] ); ?>
    8290                    </div>
    8391                </div>
  • bb-connect-for-give-donations/trunk/readme.txt

    r1666281 r1667282  
    44Requires at least: 4.4
    55Tested up to: 4.7.5
    6 Stable tag: 2.0
     6Stable tag: 2.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2121* **Donation Form Module** - Add and configure your Give donation form.
    2222* **Donation Form Goal Module** - Add a Donation Form Goal anywhere in your layout.
    23 * **Account Details Module** - Add a tabbed Account Details module for your donors.
     23* **Account Details Module** - Give your donors the ability to update their profile and view their donation history. Includes support for Give subscriptions and you can even add your own custom content tabs.
    2424
    2525Configure your donation form using the Give plugin and add it to your Beaver Builder enabled page or post.
     
    6464== Changelog ==
    6565
     66= [2.1] - 2017-05-30 =
     67* Enhancement: The Account Details module now supports Give subscriptions
     68* Enhancement: UI Tweaks
     69
    6670= [2.0] - 2017-05-28 =
    6771* New: Give Account Details module
Note: See TracChangeset for help on using the changeset viewer.