Plugin Directory

Changeset 728611


Ignore:
Timestamp:
06/19/2013 11:41:23 PM (13 years ago)
Author:
shanaver
Message:

2.0 - Add ability to sync Donately Fundraisers to wordpress

Location:
donately-donation-form/trunk
Files:
2 added
4 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • donately-donation-form/trunk/dntly-options.php

    r715810 r728611  
    2828$dntly_sync_to_private = isset($dntly_options['sync_to_private']) ? $dntly_options['sync_to_private'] : "0";
    2929$dntly_campaign_posttype = isset($dntly_options['dntly_campaign_posttype']) ? $dntly_options['dntly_campaign_posttype'] : "dntly_campaigns";
     30$dntly_get_fundraisers = isset($dntly_options['dntly_get_fundraisers']) ? $dntly_options['dntly_get_fundraisers'] : "0";
     31$dntly_fundraiser_sync_to_private = isset($dntly_options['fundraiser_sync_to_private']) ? $dntly_options['fundraiser_sync_to_private'] : "0";
     32$dntly_fundraiser_posttype = isset($dntly_options['dntly_fundraiser_posttype']) ? $dntly_options['dntly_fundraiser_posttype'] : "dntly_fundraisers";
     33$show_debugging = ( isset($dntly_options['show_debugging']) && DNTLY_DEBUG ) ? $dntly_options['show_debugging'] : "0";
    3034
    3135if($token){
     
    6165        $thank_you_page_options .=  "<option value='{$p->ID}' ".selected($dntly_thank_you_page, $p->ID, false).">{$clean_title}</option>";
    6266    }
    63     $excluded_posttypes = array('dntly_log_entries', 'dntly_fundraisers');
     67    $excluded_posttypes = array('dntly_log_entries', 'dntly_fundraisers', 'ccpurge_log_entries');
    6468    $post_types=get_post_types(array('public'=>true,'_builtin'=>false,'show_ui'=>true), 'objects');
    6569    $campaign_posttype_options = '';
     
    6872            continue;
    6973        $campaign_posttype_options .=   "<option value='{$p->name}' ".selected($dntly_campaign_posttype, $p->name, false).">{$p->labels->name}</option>";
     74    }
     75    $excluded_posttypes = array('dntly_log_entries', 'dntly_campaigns', 'ccpurge_log_entries');
     76    $fundraiser_posttype_options = '';
     77    foreach( $post_types as $p ){
     78        if( in_array($p->name, $excluded_posttypes))
     79            continue;
     80        $fundraiser_posttype_options .= "<option value='{$p->name}' ".selected($dntly_fundraiser_posttype, $p->name, false).">{$p->labels->name}</option>";
    7081    }
    7182}
     
    8495}
    8596
    86 if($token && $dntly_syncing == 'cron'){
    87     dntly_activate_cron_syncing();
     97if($token && stristr($dntly_syncing, 'cron') ){
     98    dntly_activate_cron_syncing($dntly_syncing);
    8899}
    89100else{
     
    92103
    93104?>
     105
     106<script>
     107    function show_hide_debug(){
     108        var show;
     109        if( jQuery('input[name="dntly_options[show_debugging]"]:checked').val() == '1' ){ show = true; }
     110        else{ show = false; }
     111        if( show ){ jQuery('.debugging-block').show(); }
     112        else{ jQuery('.debugging-block').hide(); }
     113    }
     114    function show_hide_fundraisers(){
     115        var show;
     116        if( jQuery('input[name="dntly_options[dntly_get_fundraisers]"]:checked').val() == '1' ){ show = true; }
     117        else{ show = false; }
     118        if( show ){ jQuery('.fundraiser-block').show(); }
     119        else{ jQuery('.fundraiser-block').hide(); }
     120    }   
     121    jQuery(document).ready(function($){
     122        show_hide_debug();
     123        show_hide_fundraisers();
     124        jQuery('input[name="dntly_options[show_debugging]"]').change(function() {
     125            show_hide_debug();
     126        });
     127        jQuery('input[name="dntly_options[dntly_get_fundraisers]"]').change(function() {
     128            show_hide_fundraisers();
     129        });
     130    });
     131</script>
    94132
    95133<div class="wrap">
     
    195233                    <select name="dntly_options[syncing]" id="dntly-account">
    196234                        <option value="manual" <?php selected( $dntly_syncing, 'manual' ); ?>>Manual Syncing</option>   
    197                         <option value="cron" <?php selected( $dntly_syncing, 'cron' ); ?>>Automated Syncing (60 mins)</option>
     235                        <option value="cron60" <?php selected( $dntly_syncing, 'cron60' ); ?>>Automated Syncing (every 60 mins)</option>
     236                        <option value="cron30" <?php selected( $dntly_syncing, 'cron30' ); ?>>Automated Syncing (every 30 mins)</option>
    198237                    </select> <br />
    199238                </td>
     239            </tr>
     240            <tr>
     241                <th><hr /></th>
     242                <td colspan="2"><hr /></td>
    200243            </tr>
    201244            <tr>
     
    217260            </tr>
    218261            <tr>
     262                <th><hr /></th>
     263                <td colspan="2"><hr /></td>
     264            </tr>
     265            <tr>
     266                <th><label for="category_base">Donately Fundraisers</label></th>
     267                <td class="col1"></td>
     268                <td class="col2">
     269                    <input type="radio" name="dntly_options[dntly_get_fundraisers]" value="1" <?php checked( $dntly_get_fundraisers, '1' ); ?>/> Sync Donately Fundraisers
     270                    <span style="width:40px;height:10px;display:inline-block"></span>
     271                    <input type="radio" name="dntly_options[dntly_get_fundraisers]" value="0" <?php checked( $dntly_get_fundraisers, '0' ); ?>/> Ignore Donately Fundraisers
     272                </td>
     273            </tr>       
     274            <tr class="fundraiser-block">
     275                <th><label for="category_base">Import Donately Fundraisers</label></th>
     276                <td class="col1"></td>
     277                <td class="col2">
     278                    <input type=radio name="dntly_options[fundraiser_sync_to_private]"  value="1" <?php checked( "1", $dntly_fundraiser_sync_to_private); ?>> as Private<br />
     279                    <input type=radio name="dntly_options[fundraiser_sync_to_private]"  value="0" <?php checked( "0", $dntly_fundraiser_sync_to_private); ?>> as Public<br />
     280                </td>
     281            </tr>
     282            <tr class="fundraiser-block">
     283                <th><label for="category_base">Donately Fundraiser Posttype</label></th>
     284                <td class="col1"><a href="#" class="tooltip"><span>Use the default 'Dntly Fundraisers' posttype - or your own</span></a></td>
     285                <td class="col2">
     286                    <select name="dntly_options[dntly_fundraiser_posttype]" id="dntly-posttype">
     287                        <?php print $fundraiser_posttype_options ?>
     288                    </select>
     289                </td>
     290            </tr>
     291            <tr>
     292                <th><hr /></th>
     293                <td colspan="2"><hr /></td>
     294            </tr>
     295            <tr>
    219296                <th><label for="category_base">Donation Thank You Page</label></th>
    220                 <td class="col1"><a href="#" class="tooltip"><span>Must be a top level page (i.e. not have parent)</span></a></td>
     297                <td class="col1"><a href="#" class="tooltip"><span>Choose a page to redirect the user to after a successful donation.<br/>Must be a top level page (i.e. not have parent)</span></a></td>
    221298                <td class="col2">
    222299                    <select name="dntly_options[thank_you_page]" id="dntly-account">
    223                         <option value="">-- none --</option>
     300                        <option value="">-- Do not redirect after donation --</option>
    224301                        <?php print $thank_you_page_options ?>
    225302                    </select> <br />
    226303                </td>
    227             </tr>
    228             <tr>
     304            </tr -->
     305            <?php if(DNTLY_DEBUG): ?>
     306            <tr>
     307                <th><label for="category_base">Debugging</label></th>
     308                <td class="col1"></td>
     309                <td class="col2">
     310                    <input type="radio" name="dntly_options[show_debugging]" value="1" <?php checked( $show_debugging, '1' ); ?>/> Show Debugging Sections
     311                    <span style="width:40px;height:10px;display:inline-block"></span>
     312                    <input type="radio" name="dntly_options[show_debugging]" value="0" <?php checked( $show_debugging, '0' ); ?>/> Hide Debugging Sections
     313                </td>
     314            </tr>       
     315            <tr class="debugging-block">
    229316                <th><label for="category_base">Options</label></th>
    230317                <td class="col1"></td>
     
    235322                </td>
    236323            </tr>
     324        <?php endif; ?>
    237325            <tr>
    238326                <th>&nbsp;</th>
     
    252340                </tr>   
    253341            <?php endif; ?>
     342                <tr class="debugging-block">
     343                    <th><hr /></th>
     344                    <td colspan="2"><hr /></td>
     345                </tr>
    254346            </tbody>
    255347        </table>   
     
    265357                    <td class="col2">
    266358                        <input type="button" value="Sync Campaigns" id="dntly-sync-campaigns" class="button-primary"/>
    267                         <!-- input type="button" value="Sync Fundraisers" id="dntly-sync-fundraisers" class="button-primary"/ -->
     359                        <input type="button" value="Sync Fundraisers" id="dntly-sync-fundraisers" class="button-primary fundraiser-block" />
    268360                    </td>
    269361                </tr>
     
    275367    <div id="spinner"></div>
    276368   
    277     <div id="dntly_table_logging_container">
     369    <div id="dntly_table_logging_container" class="debugging-block">
    278370        <div id="dntly_table_logging"></div>
    279371    </div> 
  • donately-donation-form/trunk/dntly.php

    r715810 r728611  
    22
    33/*
    4 Plugin Name:  Dntly
     4Plugin Name:  Donately Integration
    55Plugin URI:   http://www.donately.com
    66Description:  API Integration with the Donately donation platform
    7 Version:      1.2.3
     7Version:      2.0.0
    88Author:       5ifty&5ifty
    99Author URI:   https://www.fiftyandfifty.org/
    10 Contributors: shanaver, bryanmonzon, brianburkett2k
     10Contributors: shanaver, bryanmonzon, elzizzo
    1111
    1212Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
     
    1818*/
    1919
    20 define('DNTLY_VERSION', '1.2.3');
     20define('DNTLY_VERSION', '2.0.0');
    2121
    2222/* set to true for testing/debugging in development & staging environments */
     
    3636// admin styles & scripts
    3737function dntly_admin_scripts_styles(){
    38     wp_register_script( 'dntly-scripts', DNTLY_PLUGIN_URL . 'lib/dntly.js' ) ;
    39     wp_register_script( 'base64', DNTLY_PLUGIN_URL . 'lib/base64.js' ) ;   
    40    
     38    wp_register_script( 'dntly-scripts', DNTLY_PLUGIN_URL . 'lib/dntly-back.js', array('jquery') );
     39    wp_enqueue_script( 'dntly-scripts' );
    4140    wp_register_style( 'dntly-style', DNTLY_PLUGIN_URL . 'lib/dntly.css' );
    42    
    43     wp_enqueue_script( 'dntly-scripts' );
    44     wp_enqueue_script( 'base64' );
    45    
    4641    wp_enqueue_style( 'dntly-style' );
    4742}
     
    5045// front end styles & scripts
    5146function dntly_front_scripts_styles(){
    52     wp_register_script( 'jquery', '/wp-includes/js/jquery/jquery.js' );
    53     wp_register_script( 'jquery-validate', DNTLY_PLUGIN_URL . 'lib/jquery.validate.min.js', array('jquery') );
    54     wp_register_script( 'jquery-base64', DNTLY_PLUGIN_URL . 'lib/base64.js', array('jquery') );
    55 
    56     wp_enqueue_script( 'jquery' );
    57     wp_enqueue_script( 'jquery-validate' );
    58     wp_enqueue_script( 'jquery-base64' );
     47    wp_register_script( 'dntly-scripts', DNTLY_PLUGIN_URL . 'lib/dntly-front.js', array('jquery') );
     48    wp_localize_script( 'dntly-scripts', 'dntly_ajax', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ) ) );
     49    wp_enqueue_script( 'dntly-scripts' );
    5950}
    6051add_action('wp_enqueue_scripts', 'dntly_front_scripts_styles');
     
    9283/*  Cron Functions  */
    9384
    94 add_filter( 'cron_schedules', 'dntly_corn_schedules');
    95 function dntly_corn_schedules(){
     85add_filter( 'cron_schedules', 'dntly_cron_schedules');
     86function dntly_cron_schedules(){
    9687    return array(
    97         'every_fifteen_minute' => array(
     88        'every_fifteen_minutes' => array(
    9889            'interval' => 60 * 15,
    9990            'display' => 'Four Times Hourly'
    10091        ),
     92        'every_thirty_minutes' => array(
     93            'interval' => 60 * 30,
     94            'display' => 'Twice Hourly'
     95        ),
    10196    );
    10297}
     
    105100function dntly_sync_everything() {
    106101    dntly_get_campaigns();
    107     //dntly_get_fundraisers();
     102    dntly_get_fundraisers();
    108103}
    109104add_action('dntly_syncing_cron', 'dntly_sync_everything');
    110105
    111106// function for adding the syncing everything cron
    112 function dntly_activate_cron_syncing() {
     107function dntly_activate_cron_syncing($cron) {
    113108    if( !wp_get_schedule('dntly_syncing_cron') ){
    114         dntly_transaction_logging('Donately Plugin - start hourly scheduler');
    115         wp_schedule_event(time(), 'hourly', 'dntly_syncing_cron');
     109        if($cron == 'cron30'){
     110            wp_schedule_event(time(), 'every_thirty_minutes', 'dntly_syncing_cron');
     111            dntly_transaction_logging('Donately Plugin - start hourly scheduler - 30 minutes');
     112        }
     113        else{
     114            wp_schedule_event(time(), 'hourly', 'dntly_syncing_cron');
     115            dntly_transaction_logging('Donately Plugin - start hourly scheduler - 60 minutes');
     116        }
    116117    }
    117118}
  • donately-donation-form/trunk/lib/dntly.class.php

    r715810 r728611  
    4545    function build_api_methods(){
    4646        $this->api_methods = array(
    47             "root"                  =>  array("get",  ""),
    48             "get_session_token"     =>  array("post", "sessions"),
    49             "donate_without_auth"   =>  array("post", "accounts/" . $this->dntly_account_id . "/donate_without_auth"),     
    50             "create_fundraiser"     =>  array("post", "fundraisers"),
    51             "create_person"       =>  array("post", "people"),
    52             "person_exists"       =>  array("get",  "public/people/exists"),
    53             "get_my_accounts"           =>  array("get",  "accounts"),
    54             "get_person"          =>  array("get",  "admin/people" . ( $this->api_runtime_id ? '/' . $this->api_runtime_id : '' )),
    55             "get_all_accounts"      =>  array("get",  "public/accounts"),
    56             "get_campaigns"       =>  array("get",  "admin/campaigns"),
    57             "get_fundraisers"     =>  array("get",  "admin/fundraisers"),
    58             "get_donations"       =>  array("get",  "admin/donations"),
    59             "get_events"          =>  array("get",  "admin/events"),   
     47            "root"                                  =>  array("get",  ""),
     48            "get_session_token"                     =>  array("post", "sessions"),
     49            "donate_without_auth"                   =>  array("post", "accounts/" . $this->dntly_account_id . "/donate_without_auth"),     
     50            "create_fundraiser"                     =>  array("post", "fundraisers"),
     51            "create_user_and_fundraiser"    =>  array("post", "people/create_person_and_fundraiser"),
     52            "create_person"                     =>  array("post", "people"),
     53            "person_exists"                     =>  array("get",  "public/people/exists"),
     54            "get_my_accounts"                           =>  array("get",  "accounts"),
     55            "get_person"                        =>  array("get",  "admin/people" . ( $this->api_runtime_id ? '/' . $this->api_runtime_id : '' )),
     56            "get_all_accounts"                      =>  array("get",  "public/accounts"),
     57            "get_campaigns"                     =>  array("get",  "admin/campaigns"),
     58            "get_fundraisers"                   =>  array("get",  "admin/fundraisers"),
     59            "get_donations"                     =>  array("get",  "admin/donations"),
     60            "get_events"                        =>  array("get",  "admin/events"), 
    6061        );
    6162    }
     
    9798         $name = strtolower(trim($name));
    9899         if (!empty($name)) {
    99             $object->$name = $this->array_to_object(stripslashes($value));
     100            $object->$name = $this->array_to_object($value);
    100101         }
    101102      }
     
    401402    function create_fundraiser(){
    402403        $this->suppress_logging = true;
    403         $post_object = $this->array_to_object($_POST['dntly_result']);
    404         $dntly_result = json_decode($post_object);
     404        $dntly_result = $this->array_to_object($_POST['dntly_result']);
    405405        if( $dntly_result->success ){
    406406            if( isset($dntly_result->fundraiser->id) ){
  • donately-donation-form/trunk/lib/dntly.css

    r677857 r728611  
    99    margin: 20px 10px;
    1010    clear: both;
    11     display: none;
     11    /*display: none;*/
    1212}
    1313#dntly_table_logging_container table {
  • donately-donation-form/trunk/lib/dntly_tips_box.php

    r677857 r728611  
    1818            <tr><th>Shortcode</th><th>Donation</th></tr>
    1919            <tr><td colspan="2"><strong>iFrame <span style="font-size:.8em">(no SSL needed)</span></strong></td></tr>
    20             <tr><td>[dntly_iframe]</td><td>General</td></tr>
    21             <tr><td>[dntly_iframe cid=123]</td><td>Campaign</td></tr>
    22             <tr><td>[dntly_iframe cid=123 fid=123]</td><td>Fundraiser</td></tr>
    23         </table>
    24         <table>
    25             <tr><td colspan="2"><strong>Custom <span style="font-size:.8em">(SSL needed)</span></strong></td></tr>
    26             <tr><td colspan="2"><strong>* Coming Soon *</strong></td></tr>
     20            <tr><td>[dntly_300width_form]</td><td>General</td></tr>
     21            <tr><td>[dntly_300width_form cid=123]</td><td>Campaign</td></tr>
     22            <tr><td>[dntly_300width_form cid=123 fid=123]</td><td>Fundraiser</td></tr>
    2723        </table>
    2824    <?php endif; ?>
  • donately-donation-form/trunk/lib/donately-formjs.php

    r707217 r728611  
    44  $form_js_url .= $dntly->api_subdomain . '.' . ( isset($dntly->dntly_options['environment']) ? $dntly->api_domain[$dntly->dntly_options['environment']] : $dntly->api_domain['production'] ) . '/assets/js/v1/form.js';
    55?>
    6 <script class='donately-form' ></script>
    7 <script src='<?php print $form_js_url ?>' type='text/javascript' async='async'
     6<script class="donately-formjs" src='<?php print $form_js_url ?>' type='text/javascript' async='async'
    87  data-donately-id='<?php print (isset($account)?$account:$dntly->dntly_options['account_id']) ?>'
    98  data-donately-campaign-id='<?php print (isset($campaign)?$campaign:'0') ?>'
     
    1514  data-donately-email='<?php print (isset($email)?$email:'') ?>'
    1615  data-donately-amount='<?php print (isset($amount)?$amount:'') ?>'
     16  data-donately-iframe-height='<?php print (isset($iframe_height)?$iframe_height:'') ?>'
     17  data-donately-iframe-width='<?php print (isset($iframe_width)?$iframe_width:'') ?>'
     18  data-donately-comment='<?php print (isset($comment)?(bool)$comment:'false') ?>'
    1719  data-donately-dont-send-receipt-email='<?php print (isset($dont_send_receipt_email)?(bool)$dont_send_receipt_email:'false') ?>'
    1820</script>
     
    2022  jQuery(function() {
    2123    jQuery('script').bind('donately.success', function(e, resp){
    22       //console.log('donately.success')
    23       //console.log(resp);
    2424      <?php if( $dntly->dntly_options['thank_you_page'] != '' ): ?>
    2525        setTimeout(function(){
  • donately-donation-form/trunk/lib/posttypes.php

    r715810 r728611  
    33function dntly_custom_post_types(){
    44    $dntly_options = get_option('dntly_options');
     5    if( !isset($dntly_options['dntly_get_fundraisers']) ){$dntly_options['dntly_get_fundraisers'] = '0';}
     6    if( !isset($dntly_options['dntly_campaign_posttype']) ){$dntly_options['dntly_campaign_posttype'] = '0';}
    57    register_post_type( 'dntly_campaigns',
    68        array(
     
    4951          'rewrite' => array("slug" => "fundraiser"),
    5052          'menu_position' => '26',
    51           'show_in_menu' => false,
     53          'show_in_menu' => ($dntly_options['dntly_get_fundraisers'] == '1'?true:false),
    5254        )
    5355    );
     
    106108add_action('manage_dntly_fundraisers_posts_custom_column', 'dntly_display_column_fundraisers', 10, 2);
    107109function dntly_display_column_fundraisers($column_name, $post_id) {
     110    global $dntly_options;
    108111    if ('environment' == $column_name) {
    109112        print ucwords(get_post_meta( $post_id, '_dntly_environment', true ));
     
    112115        $c = get_post_meta( $post_id, '_dntly_campaign_id', true );
    113116        $campaign_post = new WP_Query( array(
    114             'post_type' => 'dntly_campaigns',
     117            'post_type' => $dntly_options['dntly_campaign_posttype'],
    115118            'meta_query' => array(
    116119                array(
     
    120123            )
    121124        ) );
    122         print $campaign_post->posts[0]->post_title;
     125        if( isset($campaign_post->posts[0]) ){
     126            print $campaign_post->posts[0]->post_title;
     127        }
     128        else{
     129            print "unknown";
     130        }
     131       
    123132    }   
    124133}
  • donately-donation-form/trunk/lib/shortcodes.php

    r688581 r728611  
    11<?php
    22
    3 add_shortcode( 'dntly_custom_form', 'dntly_build_custom_form' );
    4 function dntly_build_custom_form( $atts ){
    5     $dntly_options = get_option('dntly_options');
    6     extract( shortcode_atts( array(
    7         'account' => null,
    8         'cid' => null,
    9         'fid' => null,
    10         'tracking' => null,
    11         'layout' => null,
    12         'thank_you_url' => null     
    13     ), $atts ) );
    14     $account           = $account       != '' ? sanitize_text_field($account) : null;
    15     $campaign_id       = $cid           != '' ? sanitize_text_field($cid) : null;
    16     $fundraiser_id     = $fid           != '' ? sanitize_text_field($fid) : null;
    17     $tracking          = $tracking      != '' ? sanitize_text_field($tracking) : null;
    18     $layout            = $layout        != '' ? sanitize_text_field($layout) : null;
    19     $thank_you_url     = $thank_you_url != '' ? sanitize_text_field($thank_you_url) : null;
    20     $account_subdomain = isset($account) ? $account : $dntly_options['account'];
    21     include_once( DNTLY_PLUGIN_PATH . '/lib/donation_form.php');
    22 }
    23 
    24 
    25 add_shortcode( 'dntly_300width_form', 'dntly_build_sidebar_form' );
    26 function dntly_build_sidebar_form($atts) {
     3add_shortcode( 'dntly_300width_form', 'dntly_build_formjs' );
     4add_shortcode( 'dntly_formjs', 'dntly_build_formjs' );
     5function dntly_build_formjs($atts) {
    276    extract(shortcode_atts(array(
    28         'account' => null,
    29         'campaign' => null,
    30         'fundraiser' => null,
    31         'css_url' => null, //DNTLY_PLUGIN_URL . 'lib/formjs-wide.css',
    32         'address' => false,
    33         'phone' => false,
     7        'account'           => null,
     8        'campaign'          => null,
     9        'fundraiser'        => null,
     10        'css_url'           => null,
     11        'address'           => false,
     12        'phone'                 => false,
     13        'comment'           => false,
     14        'iframe_height' => null,
     15        'iframe_width'  => null,
    3416  ), $atts));
    3517    include( DNTLY_PLUGIN_PATH . '/lib/donately-formjs.php');
  • donately-donation-form/trunk/lib/widgets.php

    r715810 r728611  
    6060        $address = isset( $instance['address'] ) ? (bool) $instance['address'] : false;
    6161        $phone = isset( $instance['phone'] ) ? (bool) $instance['phone'] : false;
     62        $iframe_height = isset( $instance['iframe_height'] ) ? $instance['iframe_height'] : null;
     63        $iframe_width = isset( $instance['iframe_width'] ) ? $instance['iframe_width'] : null;
     64        $comment = isset( $instance['comment'] ) ? (bool) $instance['comment'] : false;
    6265
    6366        $dntly = new DNTLY_API;
     
    98101            <input class="widefat" type="text" name="<?php echo $this->get_field_name( 'css_url' ); ?>" value="<?php echo esc_attr( $css_url ); ?>" />
    99102        </p>
    100         <p>
     103        <p style="display:block;clear:both">
     104            <div style="width:100px;float:left">
     105                <label for="<?php echo $this->get_field_id( 'iframe_width' ); ?>"><?php _e( 'Custom Width:' ); ?></label>
     106                <input type="text" name="<?php echo $this->get_field_name( 'iframe_width' ); ?>" value="<?php echo esc_attr( $iframe_width ); ?>" style="width:100px" />
     107            </div>
     108            <div style="width:100px;float:right">
     109                <label for="<?php echo $this->get_field_id( 'iframe_height' ); ?>"><?php _e( 'Custom Height:' ); ?></label>
     110                <input type="text" name="<?php echo $this->get_field_name( 'iframe_height' ); ?>" value="<?php echo esc_attr( $iframe_height ); ?>" style="width:100px"/>
     111            </div>
     112        </p>       
     113        <p style="display:block;clear:both;padding-top:10px">
    101114            <input class="checkbox" type="checkbox" <?php checked( $address ); ?> id="<?php echo $this->get_field_id( 'address' ); ?>" name="<?php echo $this->get_field_name( 'address' ); ?>" />
    102115            <label for="<?php echo $this->get_field_id( 'address' ); ?>"><?php _e( 'Display Address Fields?' ); ?></label>
     
    106119            <label for="<?php echo $this->get_field_id( 'phone' ); ?>"><?php _e( 'Display Phone Field?' ); ?></label>
    107120        </p>
     121        <p>
     122            <input class="checkbox" type="checkbox" <?php checked( $comments ); ?> id="<?php echo $this->get_field_id( 'comment' ); ?>" name="<?php echo $this->get_field_name( 'comment' ); ?>" />
     123            <label for="<?php echo $this->get_field_id( 'comment' ); ?>"><?php _e( 'Display Comments Field?' ); ?></label>
     124        </p>
    108125        <?php
    109126    }
  • donately-donation-form/trunk/readme.txt

    r715810 r728611  
    7575* Add option for using your own custom posttype instead of the default 'Dntly Campaigns'
    7676
     77= 2.0.0 =
     78* Add ability to sync Donately Fundraisers to wordpress
     79* Add option for using your own custom posttype instead of the default 'Dntly Fundraisers'
     80* Add another sync option (30 minutes & 60 minutes now available)
     81* Add logging to settings page & include options to hide all debugging settings (note: must set DNTLY_DEBUG=true in dntly.php)
     82
    7783== Upgrade Notice ==
    7884
Note: See TracChangeset for help on using the changeset viewer.