WordPress.org

Plugin Directory

Changeset 1649232


Ignore:
Timestamp:
05/01/17 21:56:05 (4 weeks ago)
Author:
dancameron
Message:

Deploy version 14

Location:
sprout-invoices
Files:
598 added
14 edited

Legend:

Unmodified
Added
Removed
  • sprout-invoices/trunk/Sprout_Invoices.class.php

    r1618061 r1649232  
    3333     * Current version. Should match sprout-invoices.php plugin version. 
    3434     */ 
    35     const SI_VERSION = '13.0.3'; 
     35    const SI_VERSION = '14.0'; 
    3636    /** 
    3737     * DB Version 
  • sprout-invoices/trunk/changelog.txt

    r1618061 r1649232  
     1= 14.0 = 
     2 
     3* NEW FEATURE: Payment Terms 
     4* FIX: Minor bug fixes all around 
     5 
     6= 13.0.4 = 
     7 
     8* FIX: WooCommerce Payments 
     9 
    110= 13.0.3 = 
    211 
  • sprout-invoices/trunk/controllers/admin/Settings_API.php

    r1613648 r1649232  
    603603                // Loop through each meta box registered under this type. 
    604604                foreach ( $post_meta_boxes as $box_name => $args ) { 
    605                     if ( isset( $args['save_callback'] ) ) { 
     605                    if ( isset( $args['save_callback'] ) && is_array( $args['save_callback'] ) ) { 
    606606                        if ( is_callable( $args['save_callback'] ) ) { 
    607607                            $callback_args = ( ! isset( $args['save_callback_args'] ) ) ? array() : $args['save_callback_args'] ; 
  • sprout-invoices/trunk/controllers/fees/Fees.php

    r1550009 r1649232  
    2828        foreach ( $fees as $fee_key => $data ) { 
    2929 
     30            $fee_total = 0.00; 
    3031            if ( isset( $data['total_callback'] ) && is_callable( $data['total_callback'] ) ) { 
    3132                    $fee_total = call_user_func_array( $data['total_callback'], array( $doc, $data ) ); 
  • sprout-invoices/trunk/controllers/invoices/Invoices_Template.php

    r1321906 r1649232  
    2828 
    2929    public static function prevent_auto_draft_title( $title = '', $post_id = 0 ) { 
    30         if ( __('Auto Draft') !== $title ) { 
     30        if ( __( 'Auto Draft' ) !== $title ) { 
    3131            return $title; 
    3232        } 
     
    4242        if ( apply_filters( 'si_the_content_filter_line_item_descriptions', true ) ) { 
    4343            $content = apply_filters( 'the_content', $description ); 
    44         } 
    45         else { 
     44        } else { 
    4645            $content = wpautop( $description ); 
    4746        } 
     
    6766            $payment_string = ( si_has_invoice_deposit( $invoice_id ) ) ? __( 'Pay Deposit', 'sprout-invoices' ) : __( 'Pay Invoice', 'sprout-invoices' ); 
    6867        } 
     68 
    6969        self::load_view( 'templates/invoice/payment-options', array( 
    7070                'id' => $invoice_id, 
    7171                'payment_options' => si_payment_options(), 
    7272                'payment_string' => $payment_string, 
    73             ), false ); 
     73        ), false ); 
    7474    } 
    7575 
     
    100100                if ( current_user_can( 'edit_sprout_invoices' ) ) { 
    101101                    $wp_scripts->queue = $allowed_admin_scripts; 
    102                 } 
    103                 else { 
     102                } else { 
    104103                    $wp_scripts->queue = $allowed_scripts; 
    105104                } 
     
    108107                if ( current_user_can( 'edit_sprout_invoices' ) ) { 
    109108                    $wp_styles->queue = $allowed_admin_styles; 
    110                 } 
    111                 else { 
     109                } else { 
    112110                    $wp_styles->queue = $allowed_styles; 
    113111                } 
    114112                do_action( 'si_doc_enqueue_filtered' ); 
    115             } 
    116             else { 
     113            } else { 
    117114                // scripts 
    118115                wp_enqueue_script( 'sprout_doc_scripts' ); 
     
    126123        } 
    127124    } 
    128  
    129125} 
  • sprout-invoices/trunk/controllers/records/Internal_Records.php

    r1613648 r1649232  
    6060        } 
    6161 
     62        $status = ( isset( $data['status'] ) && '' !== $data['status'] ) ? $data['status'] : 'publish' ; 
     63        $post_date = ( isset( $data['post_date'] ) && $data['post_date'] ) ? (int) $data['post_date'] : current_time( 'timestamp' ); 
     64 
    6265        $post = array( 
    6366            'post_title' => $title, 
    6467            'post_author' => $author_id, 
    65             'post_status' => 'pending', 
     68            'post_status' => $status, 
    6669            'post_type' => SI_Record::POST_TYPE, 
    6770            'post_parent' => $associate_id, 
    6871        ); 
    6972        $id = wp_insert_post( $post ); 
    70  
    7173        if ( $id && ! is_wp_error( $id ) ) { 
    7274            $record = SI_Record::get_instance( $id ); 
     
    7476            $record->set_associate_id( $associate_id ); 
    7577            $record->set_type( $type ); 
     78            $record->set_post_date( date( 'Y-m-d H:i:s', $post_date ) ); 
    7679            $record->activate(); 
    7780        } 
  • sprout-invoices/trunk/languages/SI_l10n.php

    r1330811 r1649232  
    3434 
    3535        if ( file_exists( $mofile_plugins_global ) ) { 
    36             // Look in global /wp-content/languages/plugins/sprout-apps folder 
     36            // Look in global /wp-content/languages/plugins/sprout-invoices folder 
    3737            load_textdomain( self::TEXT_DOMAIN, $mofile_plugins_global ); 
    3838        } elseif ( file_exists( $mofile_global ) ) { 
    39             // Look in global /wp-content/languages/sprout-apps folder 
     39            // Look in global /wp-content/languages/sprout-invoices folder 
    4040            load_textdomain( self::TEXT_DOMAIN, $mofile_global ); 
    4141        } elseif ( file_exists( $mofile_local ) ) { 
    42             // Look in local /wp-content/plugins/sprout-invoices{-pro}/languages/ folder 
     42            // Look in local /wp-content/plugins/sprout-invoices/languages/ folder 
    4343            load_textdomain( self::TEXT_DOMAIN, $mofile_local ); 
    4444        } else { 
     
    7171        $translations = wp_get_available_translations(); 
    7272 
    73         if ( ! isset( $translations[ $language ] )) { 
     73        if ( ! isset( $translations[ $language ] ) ) { 
    7474            return; 
    7575        } 
    76          
     76 
    7777        printf( 
    7878            '<div id="si_language_detect_nag_dismiss" class="notice notice-info is-dismissible"><p>%s</p></div>', 
     
    121121    } 
    122122 
    123     public static function has_language_detector_dismissed(){ 
     123    public static function has_language_detector_dismissed() { 
    124124        $language = get_locale(); 
    125125        $option = get_option( self::TEXT_DOMAIN . '_language_help_message_' . $language ); 
  • sprout-invoices/trunk/models/Record.php

    r1164273 r1649232  
    2121            'show_in_menu' => false, 
    2222            'rewrite' => false, 
    23             'supports' => array() 
     23            'supports' => array(), 
    2424        ); 
    2525        self::register_post_type( self::POST_TYPE, 'Record', 'Records', $post_type_args ); 
     
    6969    } 
    7070 
     71    /** 
     72     * Executed after all the records data has been completed. 
     73     */ 
    7174    public function activate() { 
    72         $this->post->post_status = 'publish'; 
    73         $this->save_post(); 
     75        //$this->post->post_status = 'publish'; 
     76        //$this->save_post(); 
    7477        do_action( 'record_activated', $this ); 
    7578    } 
     
    104107    public function get_data() { 
    105108        $content = json_decode( $this->post->post_content ); 
    106         if ( $content === NULL ) { // isn't json 
     109        if ( $content === null ) { // isn't json 
    107110            return $this->post->post_content; 
    108111        } 
     
    202205            self::TAXONOMY => $type, 
    203206        ); 
    204  
    205207        $result = get_posts( $args ); 
    206  
    207208        // Set cache 
    208209        $cache[ $cache_index ] = $result; 
     
    305306        wp_cache_delete( 'si_find_records_by_assoc_id', 'si' ); 
    306307    } 
    307  
    308308} 
  • sprout-invoices/trunk/models/_Model.php

    r1492701 r1649232  
    484484    public function set_post_date( $post_date ) { 
    485485        $this->post->post_date = $post_date; 
     486        $this->post->post_date_gmt = get_gmt_from_date( $post_date ); 
    486487        $this->save_post(); 
    487488    } 
  • sprout-invoices/trunk/readme.txt

    r1618061 r1649232  
    55Requires at least: 3.8 
    66Tested up to: 4.7 
    7 Stable tag: 13.0.3 
     7Stable tag: 14.0 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    126126== Changelog == 
    127127 
    128 = 13.0.3 = 
     128= 14.0 = 
     129 
     130* NEW FEATURE: Payment Terms 
     131* FIX: Minor bug fixes all around 
     132 
     133= 13.0.4 = 
    129134 
    130135* UPDATE: WooCommerce Tools Update 
  • sprout-invoices/trunk/resources/admin/css/sprout-invoice.css

    r1613648 r1649232  
    410410    text-align: right; 
    411411} 
     412.sa_table th.skinny_col { 
     413    width: 100px; 
     414    max-width: 20%; 
     415} 
     416.sa_table th.real_skinny_col { 
     417    width: 2em; 
     418    max-width: 4em; 
     419} 
    412420/** 
    413421 * Copy of button-large 
     
    20602068 * Misc. 
    20612069 */ 
     2070 
     2071.postbox-container .si_notice { 
     2072    display: inline-block; 
     2073    line-height: 19px; 
     2074    padding: 11px 15px; 
     2075    font-size: 14px; 
     2076    text-align: left; 
     2077    /* margin: 25px 20px 0 2px; */ 
     2078    background-color: #f5f5f5; 
     2079    border-left: 4px solid #05aeff; 
     2080    -webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 
     2081    box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 
     2082} 
     2083 
    20622084#poststuff .sa-form-field.sa-form-field-bypass h3 { 
    20632085    padding: 16px 0px 8px; 
  • sprout-invoices/trunk/sprout-invoices.php

    r1618061 r1649232  
    33/** 
    44 * @package Sprout_Invoices 
    5  * @version 13.0.3 
     5 * @version 14.0 
    66 */ 
    77 
     
    1111 * Description: App allows for any WordPress site to accept estimates, create invoices and receive invoice payments. Learn more at <a href="https://sproutapps.co">Sprout Apps</a>. 
    1212 * Author: Sprout Apps 
    13  * Version: 13.0.3 
     13 * Version: 14.0 
    1414 * Author URI: https://sproutapps.co 
    1515 * Text Domain: sprout-invoices 
  • sprout-invoices/trunk/template-tags/invoices.php

    r1613648 r1649232  
    801801// Payments // 
    802802////////////// 
    803  
    804803if ( ! function_exists( 'si_payment_options' ) ) : 
    805804    /** 
  • sprout-invoices/trunk/views/admin/meta-boxes/estimates/history.php

    r1613648 r1649232  
    4545                    <?php prp( json_decode( stripslashes_from_strings_only( $data['content'] ) ) ); ?> 
    4646                </div> 
    47             <?php elseif ( $data['status_type'] == SI_Invoices::VIEWED_STATUS_UPDATE ) : ?> 
     47            <?php elseif ( $data['status_type'] == SI_Estimates::VIEWED_STATUS_UPDATE ) : ?> 
    4848                <p> 
    4949                    <?php echo esc_html( $data['update_title'] ) ?> 
Note: See TracChangeset for help on using the changeset viewer.