This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Assuming the field name is 'url'. | |
// Don't forget to URL encode | |
$url = sprintf("http://www.facebook.com/share/dialog/app_id=xxxxxx%s&redirecht_uri=myurl.com", get_field('url')); | |
// Or use http_build_query | |
$url = sprintf('http://www.facebook.com/share/dialog/%s', http_build_query([ | |
'app_id' => 'xxxxxx', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
|-------------------------------------------------------------------------- | |
| Web Routes | |
|-------------------------------------------------------------------------- | |
| | |
| Here is where you can register web routes for your application. These | |
| routes are loaded by the RouteServiceProvider within a group which | |
| contains the "web" middleware group. Now create something great! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
\Magento\Framework\Component\ComponentRegistrar::register( | |
\Magento\Framework\Component\ComponentRegistrar::THEME, | |
'frontend/MyTheme/Theme', | |
__DIR__ | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd"> | |
<title>My Theme</title> | |
<parent>Magento/luma</parent> | |
</theme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.navbar-hoverable { | |
.dropdown { | |
&:hover { | |
.dropdown-menu { | |
display: block; | |
margin-top: 0; | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@supports(display:grid) { | |
#recipes { | |
display: grid; | |
grid-template-columns: repeat(4, 1fr); | |
padding: 0; | |
grid-gap: 30px; | |
margin: 0 30px; | |
width: auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected function updateQuantityRelative($item, $key, $value){ | |
if (preg_match('/\-/', $value) == 1) { | |
$value = floatval(str_replace('-', '', $value)); | |
if (($item[$key] - $value) > 0) { | |
$item[$key] -= $value; | |
} | |
} elseif (preg_match('/\+/', $value) == 1) { | |
$item[$key] += floatval(str_replace('+', '', $value)); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Include a redirect map, incase 301s are needed | |
# include /etc/nginx/conf.d/redirect-map.conf; | |
server { | |
listen 80; | |
server_name @@DOMAIN@@ www.@@DOMAIN@@; | |
root /var/www/vhosts/@@DOMAIN@@/public; | |
# Cache general assets for as long as possible | |
location ~* ^.+\.(ogg|ogv|eot|otf|woff|mp4|ttf|rss|atom|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|rtf)$ { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$cols: 12; | |
$gap: .5rem; | |
.css-grid { | |
display: grid; | |
grid-template-columns: repeat($cols, auto); | |
grid-gap: $gap $gap; | |
@for $col from 1 to ($cols+1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class API { | |
private $token; | |
private $tokenExpiry; | |
public function __construct() | |
{ | |
$this->deserializeToken(); |