Plugin Directory

Changeset 2556073


Ignore:
Timestamp:
06/29/2021 09:06:10 PM (5 years ago)
Author:
thomask777
Message:

Improved handling of http error codes receiving from bibleserver.com backend

Location:
link-to-bible/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • link-to-bible/trunk/ltb.php

    r2477796 r2556073  
    33 * Plugin Name: Link To Bible
    44 * Description: Automatically links bible references in posts to the appropriate bible verse(s) at bibleserver.com
    5  * Version: 2.5.8
     5 * Version: 2.5.9
    66 * Plugin URI: https://wordpress.org/extend/plugins/link-to-bible/
    77 * Author: Thomas Kuhlmann
    88 * Author URI: http://www.thk-systems.de
    99 * Min WP Version: 3.2.1
    10  * Max WP Version: 5.6
     10 * Max WP Version: 5.8
    1111 * Text Domain: ltb
    1212 */
     
    463463        $result = curl_exec ( $ch );
    464464        $errno = curl_errno ( $ch );
     465        $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    465466        $error = curl_error ( $ch );
    466467        curl_close ( $ch );
    467         if (! $errno) {
    468             return $result;
    469         }
     468        if ((!$errno) && (in_array($http_code, [200, 201, 202, 204]))) {
     469            return $result;
     470        }
    470471    } else {
    471472        $http = array (
  • link-to-bible/trunk/readme.txt

    r2477796 r2556073  
    33Tags: bible, bible verse, bible reference, bibleserver.com, bibelvers, bibel, bibelstelle
    44Requires at least: 3.2.1
    5 Tested up to: 5.6
    6 Stable tag: 2.5.8
     5Tested up to: 5.8
     6Stable tag: 2.5.9
    77License: GPLv3 or later
    88License URI: https://www.gnu.org/copyleft/gpl.html
     
    2020= Notes =
    2121- This plugin uses the webservice of bibleserver.com
    22 - The links to bibleserver.com are added while saving a post, because the requests to bibleserver.com are limited per day and site. For posts created before activating 'Link-To-Bible' and never saved since then, the links to bibleserver.com are added when the post is viewed the first time. 
     22- <b>The links to bibleserver.com are added while saving a post</b>, because the requests to bibleserver.com are limited per day and site. For posts created before activating 'Link-To-Bible' and never saved since then, the links to bibleserver.com are added when the post is viewed the first time.
    2323- Changing an already linked bible reference (e.g. "Gen 1,2" -> "Gen 2,1"), saving the post will automatically update the link to bibleserver.com.
    2424
     
    6666== Changelog ==
    6767
     68= 2.5.9 =
     69
     70- Improved handling of http error codes receiving from bibleserver.com backend
     71
    6872= 2.5.8 =
    6973
Note: See TracChangeset for help on using the changeset viewer.