Plugin Directory

Changeset 3111030

Timestamp:
07/02/2024 09:55:44 AM (5 weeks ago)
Author:
them.es
Message:

updated trunk

Location:
billy
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • billy/trunk/billy.php

    r3104109 r3111030  
    44 * Plugin URI: https://wordpress.org/plugins/billy
    55 * Description: A business-oriented billing suite powered by WordPress.
    6  * Version: 1.9.0
     6 * Version: 1.9.
    77 * Author: them.es
    88 * Author URI: https://them.es/plugins/billy
  • billy/trunk/inc/class-billy.php

    r3104109 r3111030  
    288288                    <td>' . ( get_theme_mod( 'taxrates' ) ? nl2br( get_theme_mod( 'taxrates' ) ) : '-' ) . '</td>
    289289                </tr>' .
    290                 ( $latest_quotes ? '
     290                ( $latest_es ? '
    291291                <tr>
    292292                    <td><strong>' . esc_html__( 'Current invoice', 'billy' ) . '</strong></td>
    293293                    <td><a href="' . esc_url( admin_url( 'edit.php?post_type=billy-invoice' ) ) . '">' . esc_html( self::get_invoice_number( $latest_invoices[0]->ID ) ) . '</a></td>
    294294                </tr>' : '' ) .
    295                 ( $latest_invoices ?
     295                ( $latest_es ?
    296296                '<tr>
    297297                    <td><strong>' . esc_html__( 'Current quote', 'billy' ) . '</strong></td>
     
    353353        $post_id = get_the_id();
    354354
    355         $output      = '<div class="pre-header d-print-none d-admin-none">';
    356             $output .= '<div>';
    357 
    358         // Print. Deprecated and uncommented for all browsers in v1.9. TODO: Remove!
    359         /*
    360         if ( ! str_contains( wp_unslash( $_SERVER['HTTP_USER_AGENT'] ), 'Chrome' ) ) {
    361             $output .= '<div class="wp-block-button"><button class="wp-block-button__link is-style-outline" onclick="window.print();">' . esc_html__( 'Print', 'billy' ) . '</button></div>';
    362             $output .= '&nbsp;';
    363         }*/
    364 
    365         if ( defined( 'TABLE_EXPORT' ) ) {
    366             // Export table data as tab separated txt file.
    367             $output .= '<div class="wp-block-button"><button class="wp-block-button__link tsv-button">' . sprintf( esc_html__( 'Export %s', 'billy' ), esc_html__( 'TSV', 'billy' ) ) . '</button></div>';
    368         }
    369 
    370             $output .= '</div>';
    371 
     355        $output = '<div class="pre-header d-print-none d-admin-none">';
    372356            // PDF export link with 'wp_rest' nonce.
    373357            $pdf_link = wp_nonce_url(
     
    379363            );
    380364            $output  .= '<!-- wp:file {"href":"' . esc_url( $pdf_link ) . '","displayPreview":true} --><div id="pdf" class="wp-block-file"><a href="' . esc_url( $pdf_link ) . '" class="wp-block-file__button wp-element-button" download>' . sprintf( esc_html__( 'Download %s', 'billy' ), esc_html__( 'PDF', 'billy' ) ) . '</a>' . esc_html( get_the_title() ) . ' <object class="wp-block-file__embed" data="' . esc_url( $pdf_link ) . '"></object></div><!-- /wp:file -->';
    381         $output      .= '</div>';
     365
     366        if ( defined( 'TABLE_EXPORT' ) ) {
     367            // Export table data as tab separated txt file.
     368            $output .= ' &nbsp; &nbsp; <div class="wp-block-button"><button class="wp-block-button__link wp-element-button tsv-button">' . sprintf( esc_html__( 'Export %s', 'billy' ), esc_html__( 'TSV', 'billy' ) ) . '</button></div>';
     369        }
     370        $output .= '</div>';
    382371
    383372        return $output;
     
    447436
    448437        // Update post status if unpublished: https://wordpress.org/support/article/post-status
    449         if ( in_array( get_post_status( $post_id ), array( 'publish', 'future'/*, 'private', 'pending', 'draft', 'auto-draft'*/ ), true ) ) {
     438        if ( in_array( get_post_status( $post_id ), array( 'publish', 'future'/*, 'private', 'pending', 'draft', 'auto-draft'*/ ), true ) ) {
    450439            // New?
    451440            if ( ! is_numeric( $invoice_number ) ) {
     
    582571                    'post_status' => 'private',
    583572                )
    584             )[0]['ID'];
     573            )[0]['ID'];
    585574        }
    586575
     
    16041593        );
    16051594
     1595
     1596
     1597
     1598
     1599
     1600
     1601
     1602
     1603
     1604
     1605
     1606
     1607
     1608
     1609
     1610
    16061611        // Address (geocoded).
    1607         $wp_customize->add_setting(
    1608             'address_geocoded',
    1609             array(
    1610                 'sanitize_callback' => 'wp_kses',
    1611             )
    1612         );
    1613         $wp_customize->add_control(
    1614             'address_geocoded',
    1615             array(
    1616                 'type'        => 'textarea',
    1617                 'label'       => esc_html__( 'Address (geocoded)', 'billy' ),
    1618                 'description' => sprintf( esc_html__( 'Geocoding powered by %s', 'billy' ), 'nominatim.openstreetmap.org' ),
    1619                 'input_attrs' => array(
    1620                     'readonly' => 'readonly',
    1621                     'style'    => 'display: none;',
    1622                 ),
    1623                 'section'     => 'billy_general_section',
    1624             )
    1625         );
     1612        if ( get_theme_mod( 'geocoding_enabled', '1' ) ) {
     1613            $wp_customize->add_setting(
     1614                'address_geocoded',
     1615                array(
     1616                    'sanitize_callback' => 'wp_kses',
     1617                )
     1618            );
     1619            $wp_customize->add_control(
     1620                'address_geocoded',
     1621                array(
     1622                    'type'        => 'textarea',
     1623                    'label'       => esc_html__( 'Address (geocoded)', 'billy' ),
     1624                    'description' => sprintf( esc_html__( 'Geocoding powered by %s', 'billy' ), 'nominatim.openstreetmap.org' ),
     1625                    'input_attrs' => array(
     1626                        'readonly' => 'readonly',
     1627                        'style'    => 'display: none;',
     1628                    ),
     1629                    'section'     => 'billy_general_section',
     1630                )
     1631            );
     1632        }
    16261633
    16271634        // Email.
     
    19201927     */
    19211928    public function geocode( $validity, $value ) {
    1922         if ( ! empty( $value ) && strlen( $value ) > 3 ) {
     1929        if ( ! empty( $value ) && strlen( $value ) > 3 ) {
    19231930            $result = null;
    19241931
  • billy/trunk/readme.txt

    r3104109 r3111030  
    55Requires at least: 6.0
    66Tested up to: 6.6
    7 Stable tag: 1.9.0
     7Stable tag: 1.9.
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    150150== Changelog ==
    151151
     152
     153
     154
     155
     156
    152157= 1.9.0 =
    153158* Include an optional reference meta field in invoice post templates
  • billy/trunk/vendor/composer/installed.php

    r3104109 r3111030  
    44        'pretty_version' => 'dev-main',
    55        'version' => 'dev-main',
    6         'reference' => 'abfff1a9c4e32f33be986ef3d7efd7a60e9458c7',
     6        'reference' => '',
    77        'type' => 'library',
    88        'install_path' => __DIR__ . '/../../',
     
    1414            'pretty_version' => 'dev-main',
    1515            'version' => 'dev-main',
    16             'reference' => 'abfff1a9c4e32f33be986ef3d7efd7a60e9458c7',
     16            'reference' => '',
    1717            'type' => 'library',
    1818            'install_path' => __DIR__ . '/../../',
Note: See TracChangeset for help on using the changeset viewer.