Make sure social url's have http
authorSteve Sutton <steve@gaslightmedia.com>
Thu, 8 Mar 2018 18:59:03 +0000 (13:59 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Thu, 8 Mar 2018 19:00:17 +0000 (14:00 -0500)
If not empty make sure the url's at least start with http://

classes/data/dataSocialUrls.php
index.php

index 937fe9c..ae38fc0 100644 (file)
@@ -231,6 +231,12 @@ class GlmDataSocialUrls extends GlmDataAbstract
      */
     public function entryPostProcessing($r, $a)
     {
+
+         // Check that URLs have http:// in front of them.
+        if (isset($r['url']) && strlen(trim($r['url'])) > 0  && strtolower(substr($r['url'],0,4)) != 'http') {
+            $r['url'] = 'http://'.$r['url'];
+        }
+
         return $r;
     }
 
index 059df85..968abfa 100644 (file)
--- a/index.php
+++ b/index.php
@@ -3,7 +3,7 @@
  * Plugin Name: GLM Members Database Social
  * Plugin URI: http://www.gaslightmedia.com/
  * Description: Gaslight Media Members Database.
- * Version: 1.1.0
+ * Version: 1.1.1
  * Author: Gaslight Media
  * Author URI: http://www.gaslightmedia.com/
  * License: GPL2
@@ -35,7 +35,7 @@
  * @package glmMembersDatabaseSocialAddOn
  * @author Gaslight Media <dev@gaslightmedia.com>
  * @license http://www.gaslightmedia.com Gaslightmedia
- * @version 1.1.0
+ * @version 1.1.1
  */
 
 /*
@@ -53,7 +53,7 @@
  *  so that we're sure the other add-ons see an up to date
  *  version from this plugin.
  */
-define('GLM_MEMBERS_SOCIAL_PLUGIN_VERSION', '1.1.0');
+define('GLM_MEMBERS_SOCIAL_PLUGIN_VERSION', '1.1.1');
 define('GLM_MEMBERS_SOCIAL_PLUGIN_DB_VERSION', '0.0.3');
 
 // This is the minimum version of the GLM Members DB plugin require for this plugin.