Changeset 3111030
- Timestamp:
- 07/02/2024 09:55:44 AM (5 weeks ago)
- Location:
- billy
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
billy/trunk/billy.php
r3104109 r3111030 4 4 * Plugin URI: https://wordpress.org/plugins/billy 5 5 * Description: A business-oriented billing suite powered by WordPress. 6 * Version: 1.9. 06 * Version: 1.9. 7 7 * Author: them.es 8 8 * Author URI: https://them.es/plugins/billy -
billy/trunk/inc/class-billy.php
r3104109 r3111030 288 288 <td>' . ( get_theme_mod( 'taxrates' ) ? nl2br( get_theme_mod( 'taxrates' ) ) : '-' ) . '</td> 289 289 </tr>' . 290 ( $latest_ quotes ? '290 ( $latest_es ? ' 291 291 <tr> 292 292 <td><strong>' . esc_html__( 'Current invoice', 'billy' ) . '</strong></td> 293 293 <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> 294 294 </tr>' : '' ) . 295 ( $latest_ invoices ?295 ( $latest_es ? 296 296 '<tr> 297 297 <td><strong>' . esc_html__( 'Current quote', 'billy' ) . '</strong></td> … … 353 353 $post_id = get_the_id(); 354 354 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 .= ' '; 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">'; 372 356 // PDF export link with 'wp_rest' nonce. 373 357 $pdf_link = wp_nonce_url( … … 379 363 ); 380 364 $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 .= ' <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>'; 382 371 383 372 return $output; … … 447 436 448 437 // 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 ) ) { 450 439 // New? 451 440 if ( ! is_numeric( $invoice_number ) ) { … … 582 571 'post_status' => 'private', 583 572 ) 584 )[0]['ID'] ;573 )[0]['ID']; 585 574 } 586 575 … … 1604 1593 ); 1605 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1606 1611 // 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 } 1626 1633 1627 1634 // Email. … … 1920 1927 */ 1921 1928 public function geocode( $validity, $value ) { 1922 if ( ! empty( $value ) && strlen( $value ) > 3 ) {1929 if ( ! empty( $value ) && strlen( $value ) > 3 ) { 1923 1930 $result = null; 1924 1931 -
billy/trunk/readme.txt
r3104109 r3111030 5 5 Requires at least: 6.0 6 6 Tested up to: 6.6 7 Stable tag: 1.9. 07 Stable tag: 1.9. 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 150 150 == Changelog == 151 151 152 153 154 155 156 152 157 = 1.9.0 = 153 158 * Include an optional reference meta field in invoice post templates -
billy/trunk/vendor/composer/installed.php
r3104109 r3111030 4 4 'pretty_version' => 'dev-main', 5 5 'version' => 'dev-main', 6 'reference' => ' abfff1a9c4e32f33be986ef3d7efd7a60e9458c7',6 'reference' => '', 7 7 'type' => 'library', 8 8 'install_path' => __DIR__ . '/../../', … … 14 14 'pretty_version' => 'dev-main', 15 15 'version' => 'dev-main', 16 'reference' => ' abfff1a9c4e32f33be986ef3d7efd7a60e9458c7',16 'reference' => '', 17 17 'type' => 'library', 18 18 'install_path' => __DIR__ . '/../../',
Note: See TracChangeset
for help on using the changeset viewer.