Allow https
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 3 Feb 2017 19:11:23 +0000 (14:11 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 3 Feb 2017 19:11:23 +0000 (14:11 -0500)
Include optional s on end of http

glm-blocks.php
models/block.php

index ecaca76..a3c03f7 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 Plugin Name: GLM Blocks
-Version: 1.5.3
+Version: 1.5.4
 Description: Displays blocks of content managed from the admin under Blocks.
 Author: Steve Sutton <steve@gaslightmedia.com>
 Author URI: http://www.gaslightmedia.com
index 2fd4649..822bb17 100644 (file)
@@ -240,7 +240,7 @@ class glm_models_block
                     break;
                 case 'url':
                     if ($custom['glm_block_ext_url'][0] != '') {
-                        $block->url = (preg_match('/^http:\/\//', $custom['glm_block_ext_url'][0]))
+                        $block->url = (preg_match('/^https?:\/\//', $custom['glm_block_ext_url'][0]))
                             ? $custom['glm_block_ext_url'][0]
                             : 'http://' . $custom['glm_block_ext_url'][0];
                         $block->externalUrl = true;