Skip to content

Commit

Permalink
resolves bgtfw/#620 (BoldGrid#143)
Browse files Browse the repository at this point in the history
* resolves bgtfw/#620

* update style.css and readme.txt w tested up to 6.1
  • Loading branch information
jamesros161 authored Oct 5, 2022
1 parent d52eed1 commit 59839f7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 528 deletions.
14 changes: 8 additions & 6 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
global $boldgrid_theme_framework;
global $post;

if ( ! empty( $post ) ) {
$is_sa_invoice = 'sa_invoice' === $post->post_type;
if ( ! empty( $post ) && class_exists( 'SI_Invoice' ) ) {
$is_sa_invoice = SI_Invoice::is_invoice_query();
$is_sa_estimate = 'sa_estimate' === $post->post_type;
} else {
$is_sa_invoice = false;
Expand All @@ -33,10 +33,12 @@
<!-- BGTFW Version: <?php echo esc_html( $bgtfw_configs['framework-version'] ); ?> -->
<html <?php language_attributes(); ?>>
<?php
if ( $is_sa_invoice ) {
get_template_part( 'sa_templates/invoice' );
} elseif ( $is_sa_estimate ) {
get_template_part( 'sa_templates/estimate' );
if ( $is_sa_estimate ) {
$template = SI_Templating_API::override_template( 'estimate' );
load_template( $template );
} elseif ( $is_sa_invoice ) {
$template = SI_Templating_API::override_template( 'invoice' );
load_template( $template );
} else {
get_template_part( 'templates/head' );
?>
Expand Down
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: boldgrid, timph, rramo012, bgnicolepaschen, joemoto, imh_brad, jam
Tags: news, blog, e-commerce, sticky-post, theme-options, threaded-comments, full-width-template, footer-widgets, featured-images, flexible-header, custom-header, custom-logo, custom-background, custom-colors, custom-menu, editor-style, translation-ready, left-sidebar, right-sidebar, grid-layout, one-column, two-columns, three-columns, four-columns
Requires PHP: 5.6
Requires at least: 4.8
Tested up to: 6.0
Stable tag: 2.11.0
Tested up to: 6.1
Stable tag: 2.17.1
License: GPL-3.0-or-later
License URI: https://www.gnu.org/licenses/gpl-3.0-standalone.html

Expand Down
295 changes: 0 additions & 295 deletions sa_templates/estimate.php

This file was deleted.

Loading

0 comments on commit 59839f7

Please sign in to comment.