Skip to content

Commit

Permalink
v7.2 fix styling poetic verses, fix error table showing on frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
Lwangaman authored and Lwangaman committed Aug 22, 2020
1 parent 967f74d commit ef14ea5
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 4 additions & 4 deletions bibleget-io.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/*
* Plugin Name: BibleGet I/O
* Version: 7.1
* Version: 7.2
* Plugin URI: https://www.bibleget.io/
* Description: Easily insert Bible quotes from a choice of Bible versions into your articles or pages with the "Bible quote" block or with the shortcode [bibleget].
* Author: John Romano D'Orazio
Expand All @@ -28,7 +28,7 @@
*/


define("BIBLEGETPLUGINVERSION", "v7_1");
define("BIBLEGETPLUGINVERSION", "v7_2");

if (!defined('ABSPATH')) {
die("You cannot access this file directly.");
Expand Down Expand Up @@ -997,7 +997,7 @@ function bibleGetQueryServer($finalquery)
// $output .= "<br /><br />Effettuate ".$count1." e ".$count2." sostituzioni.";

$matches = null;
if (preg_match_all("/<div class=\"errorsTbl\" id=\"errorsTbl\">.*?<\/div>/s", $output, $matches)) {
if (preg_match_all("/<div class=\"errors bibleQuote\">.*?<\/div>/s", $output, $matches)) {
// capture table of error messages, and turn it into notices for backend
$errorshtml = new DOMDocument();
$errorshtml->loadHTML("<!DOCTYPE HTML><head><title>BibleGet Query Errors</title></head><body>" . $matches[0][0] . "</body>");
Expand All @@ -1009,7 +1009,7 @@ function bibleGetQueryServer($finalquery)
$errs[] = "BIBLEGET SERVER ERROR: " . "<span style=\"color:Red;\">" . $errormessage[0]->nodeValue . "</span><span style=\"color:DarkBlue;\">(" . bibleGetCurrentPageUrl() . ")</span>." . "<br />" . "<span style=\"color:Gray;font-style:italic;\">" . __("If this error continues, please notify the BibleGet plugin author at") . ": <a target=\"_blank\" href=\"mailto:[email protected]?subject=BibleGet+Server+Error&body=" . urlencode("The Wordpress Plugin is receiving this error message from the BibleGet Server:" . "\n\n" . $errormessage[0]->nodeValue . "\n\nKind regards,\n\n") . "\">[email protected]</a>" . "</span>";
}
}
$output = preg_replace("/<div class=\"errors\" id=\"errors\">.*?<\/div>/s", '', $output);
$output = preg_replace("/<div class=\"errors bibleQuote\">.*?<\/div>/s", '', $output);
}
} else {
$errs[] = 'BIBLEGET SERVER ERROR: <span style="color:Red;font-weight:bold;">' . __("There was an error communicating with the BibleGet server, please wait a few minutes and try again", "bibleget-io") . ': &apos;' . curl_error($ch) . '&apos;: ' . $finalquery . '</span>';
Expand Down
4 changes: 4 additions & 0 deletions options.php
Original file line number Diff line number Diff line change
Expand Up @@ -1833,6 +1833,10 @@ public static function header_output()
echo PHP_EOL;
echo ".bibleQuote.results p.versesParagraph span.speaker { font-weight: bold; background-color: #eeeeee; padding: 3px; border-radius: 3px; font-size: $fontsize_versenumber; }";
echo PHP_EOL;
echo ".bibleQuote.errors { display: none; }";
echo PHP_EOL;
echo ".bibleQuote.info { display: none; }";
echo PHP_EOL;

//$bibleversionalign = get_theme_mod('bibleversionalign', 'left');
$bibleversionalign = 'left';
Expand Down
11 changes: 9 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Tags: bible, block, shortcode, quote, citation, verses, bibbia, citazione, verse
Requires at least: 5.0
Tested up to: 5.5
Requires PHP: 5.6
Stable tag: 7.1
Stable tag: 7.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -136,8 +136,12 @@ There was recently an update to the BibleGet I/O API which slightly changed the

== Changelog ==

= 7.2 =
* Fix: styling of poetic verses in NABRE version
* Fix: error table not hidden to end user

= 7.1 =
* use `POST` requests for the ServerSideRender component if available (Gutenberg 8.8 plugin required)
* Use `POST` requests for the ServerSideRender component if available (Gutenberg 8.8 plugin required)

= 7.0 =
* Compatibility with WordPress 5.5
Expand Down Expand Up @@ -358,6 +362,9 @@ There was recently an update to the BibleGet I/O API which slightly changed the

== Upgrade Notice ==

= 7.2 =
Better styling of poetic verses in NABRE version, fix for error table being shown to end user

= 7.1 =
Fixes some possible problems with the Bible quote block by changing the API method from GET to POST. Requires Gutenberg plugin v8.8

Expand Down

0 comments on commit ef14ea5

Please sign in to comment.