Changeset 2404541
- Timestamp:
- 10/22/2020 11:36:13 AM (5 years ago)
- Location:
- ping-news/trunk
- Files:
-
- 3 edited
-
pingnews.php (modified) (1 diff)
-
push.php (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ping-news/trunk/pingnews.php
r2398716 r2404541 6 6 Plugin Name: Ping News 7 7 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. 68 Version: 1.0.7 9 9 License: GPLv2 or later 10 10 */ 11 11 12 define("PINGNEWS_PLUGIN_VERSION", "1.0. 6");12 define("PINGNEWS_PLUGIN_VERSION", "1.0.7"); 13 13 14 14 // Include all functions related to pushing packages to ingest -
ping-news/trunk/push.php
r2376518 r2404541 11 11 $pingnews_vmn_ingest_url = getenv("VMN_INGEST_URL"); 12 12 if (!$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"; 14 14 } 15 15 // Get vmn central url from environmental variable and if does not exist use default 16 16 $pingnews_vmn_central_url = getenv("VMN_CENTRAL_URL"); 17 17 if (!$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"; 19 19 } 20 20 // This variable is used in `push.php` for JS error reporting … … 1122 1122 } 1123 1123 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 1124 1138 // Construct data to send in post request to ingest 1125 1139 $post_data = [ -
ping-news/trunk/readme.txt
r2398716 r2404541 19 19 20 20 == 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 21 27 22 28 = 1.0.6 =
Note: See TracChangeset
for help on using the changeset viewer.