Skip to content

Commit 0cd2e47

Browse files
committed
FIX: Code Syntax - layout.php - rewrite codeblock
1 parent e9d8ac1 commit 0cd2e47

File tree

2 files changed

+18
-24
lines changed

2 files changed

+18
-24
lines changed

Template/layout.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,15 @@
5353
<meta name="theme-color" content="#FFFFFF">
5454
<link rel="manifest" href="<?= $this->url->dir() ?>plugins/ApplicationBranding/Assets/img/favicon/site.webmanifest">
5555
<link rel="mask-icon" href="<?= $this->url->dir() ?>plugins/ApplicationBranding/Assets/img/favicon/safari-pinned-tab.svg" color="#5BBAD5">
56-
<?php
57-
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
58-
$url = "https://";
59-
else
60-
$url = "http://";
61-
// Append the host(domain name, ip) to the URL.
62-
$url .= $_SERVER['HTTP_HOST'];
63-
// Append the requested resource location to the URL
64-
$url .= $_SERVER['REQUEST_URI'];
65-
?>
66-
<meta property="og:url" content="<?php echo $url ?>">
67-
<?php // og:image must be min 300x300px with 'https' and absolute url to png file ?>
56+
57+
<?php if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'): ?>
58+
<?php $url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>
59+
<?php else: ?>
60+
<?php $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>
61+
<?php endif ?>
62+
63+
<meta property="og:url" content="<?= $url ?>">
64+
<!-- og:image must be min 300x300px with 'https' and absolute url to png file -->
6865
<meta property="og:image" content="<?= $this->url->base();$this->url->dir() ?>plugins/ApplicationBranding/Assets/img/workspace-icon-500x500.png">
6966
<meta property="og:type" content="website">
7067
<meta property="og:locale" content="<?= $this->app->jsLang() ?>">

Template/layout_customizer.php

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,16 @@
8181
<link rel="manifest" href="<?= $this->url->dir() ?>plugins/ApplicationBranding/Assets/img/favicon/site.webmanifest">
8282
<link rel="mask-icon" href="<?= $this->url->dir() ?>plugins/ApplicationBranding/Assets/img/favicon/safari-pinned-tab.svg" color="#5BBAD5">
8383
<?php endif ?>
84-
<?php
85-
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
86-
$url = "https://";
87-
else
88-
$url = "http://";
89-
// Append the host(domain name, ip) to the URL.
90-
$url. = $_SERVER['HTTP_HOST'];
91-
// Append the requested resource location to the URL
92-
$url. = $_SERVER['REQUEST_URI'];
93-
?>
94-
<meta property="og:url" content="<?php echo $url ?>">
84+
85+
<?php if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'): ?>
86+
<?php $url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>
87+
<?php else: ?>
88+
<?php $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; ?>
89+
<?php endif ?>
90+
91+
<meta property="og:url" content="<?= $url ?>">
9592
<?php if (null !== $this->task->customizerFileModel->getByType(2)): ?>
96-
<?php // og:image must be min 300x300px with 'https' and absolute url to png file ?>
93+
<!-- og:image must be min 300x300px with 'https' and absolute url to png file -->
9794
<meta property="og:image" content="<?= $this->url->href('CustomizerFileController', 'image', array('plugin' => 'customizer', 'file_id' => $this->task->customizerFileModel->getIdByType(2))) ?>">
9895
<?php else: ?>
9996
<?php // og:image must be min 300x300px with 'https' and absolute url to png file ?>

0 commit comments

Comments
 (0)