Plugin Directory

Changeset 2404541


Ignore:
Timestamp:
10/22/2020 11:36:13 AM (5 years ago)
Author:
omnideveloper
Message:

Application code changes for release 1.0.7

Location:
ping-news/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ping-news/trunk/pingnews.php

    r2398716 r2404541  
    66 Plugin Name: Ping News
    77 Description: The Ping! WordPress plugin allows hyperlocal journalists to submit their news stories to the Ping! system and receive approval/feedback on their stories.
    8  Version: 1.0.6
     8 Version: 1.0.7
    99 License: GPLv2 or later
    1010 */
    1111
    12 define("PINGNEWS_PLUGIN_VERSION", "1.0.6");
     12define("PINGNEWS_PLUGIN_VERSION", "1.0.7");
    1313
    1414// Include all functions related to pushing packages to ingest
  • ping-news/trunk/push.php

    r2376518 r2404541  
    1111$pingnews_vmn_ingest_url = getenv("VMN_INGEST_URL");
    1212if (!$pingnews_vmn_ingest_url) {
    13     $pingnews_vmn_ingest_url = "https://ingest.vmn.production.omni-digital.co.uk";
     13    $pingnews_vmn_ingest_url = "https://ingest.pingnews.uk";
    1414}
    1515// Get vmn central url from environmental variable and if does not exist use default
    1616$pingnews_vmn_central_url = getenv("VMN_CENTRAL_URL");
    1717if (!$pingnews_vmn_central_url) {
    18     $pingnews_vmn_central_url = "https://central.vmn.production.omni-digital.co.uk";
     18    $pingnews_vmn_central_url = "https://app.pingnews.uk";
    1919}
    2020// This variable is used in `push.php` for JS error reporting
     
    11221122     }
    11231123
     1124    // match any WP 4 image caption
     1125    //      example:    [caption id="attachment_7" align="alignnone" width="218"]<img ... /> Caption text[/caption]
     1126    preg_match_all('/\[caption\ id="[A-Za-z0-9_]*"\ align="[A-Za-z]*" width="[0-9]*"][ \n]*<img .*\/>(.*)\[\/caption]/', $content, $caption_matches);
     1127
     1128    // replace each match with a figcaption element
     1129    foreach ($caption_matches[0] as $match) {
     1130        // remove opening `[caption]`
     1131        $replace = preg_replace('/\[caption\ id="[A-Za-z0-9_]*"\ align="[A-Za-z]*" width="[0-9]*"]/', "", $match);
     1132        // replace caption str and closing `[/caption]` with a <figcaption> element
     1133        $replace = preg_replace('/\/>(.*)\[\/caption]/', '/> <figcaption>${1}</figcaption>', $replace);
     1134        // update content
     1135        $content = str_replace($match, $replace, $content);
     1136    }
     1137
    11241138     // Construct data to send in post request to ingest
    11251139     $post_data = [
  • ping-news/trunk/readme.txt

    r2398716 r2404541  
    1919
    2020== Changelog ==
     21
     22= 1.0.7 =
     23*Release Date - 22 October 2020*
     24
     25* Bug fix for WordPress 4 style image captions
     26* Support for new application domains
    2127
    2228= 1.0.6 =
Note: See TracChangeset for help on using the changeset viewer.