You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:
name = name || 'joe';This is quite common and very helpful. Another option is to do:
name || (name = 'joe');| {% if settings.show_multiple_currencies %} | |
| {{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }} | |
| {{ "jquery.currencies.min.js" | asset_url | script_tag }} | |
| <script> | |
| Currency.format = '{{ settings.currency_format | default: 'money_with_currency_format' }}'; | |
| var shopCurrency = '{{ shop.currency }}'; |
| <!doctype html> | |
| <html> | |
| <head> | |
| <!-- Priority tags. These must come first. --> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="x-ua-compatible" content="ie=edge; chrome=1"> <!-- Render Chrome if available or using latest version of Internet Explorer (Recommended). --> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <!-- Document Title --> | |
| <title>Page Title</title> | |
| <!-- Allows control over where resources are loaded from. Place as early in the document as possible, only applies to content below this tag. --> |
You know how, in JavaScript, we can set a value to a variable if one doesn't, like this:
name = name || 'joe';This is quite common and very helpful. Another option is to do:
name || (name = 'joe');| <?php | |
| use Carbon\Carbon; | |
| function today($format=null) | |
| { | |
| $format = $format ? $format:'Y-m-d H:i:s'; | |
| return Carbon::today()->format($format); | |
| } |
| <?php | |
| /** | |
| * Gera a paginação dos itens de um array ou collection. | |
| * | |
| * @param array|Collection $items | |
| * @param int $perPage | |
| * @param int $page | |
| * @param array $options | |
| * | |
| * @return LengthAwarePaginator |
| var KlaviyoSubscribe = KlaviyoSubscribe || {}; | |
| (function() { | |
| if (!KlaviyoSubscribe._loaded) { | |
| KlaviyoSubscribe._loaded = !0; | |
| var m = { | |
| "modal.html": '<div class="klaviyo_modal" style="display:none;"><div class="klaviyo_inner"><a href="#" class="klaviyo_close_modal klaviyo_header_close">×</a><form action="" method="POST" novalidate="novalidate" class="klaviyo_subscription_form"><input type="hidden" name="g" value="" /><p class="klaviyo_header"></p><p class="klaviyo_subheader"></p><div class="klaviyo_fieldset"></div><div class="klaviyo_fine_print"></div><div class="klaviyo_form_actions"><button type="submit" class="klaviyo_submit_button"><span></span></button></div><div class="klaviyo_below_submit"></div><div class="error_message" style="display:none;"></div></form><div class="success_message" style="display:none;"></div></div></div>', | |
| "flyout.html": '<div class="klaviyo_flyout" style="display:none;"><div class="klaviyo_inner"><div class="klaviyo_topbar" /><a href="#" class="klav |
| {% assign current_variant = product.selected_or_first_available_variant %} | |
| <div id="richsnippet"> | |
| <div itemscope itemtype="http://schema.org/Product"> | |
| <meta itemprop="url" content="{{ shop.url }}{{ product.url }}"> | |
| <meta itemprop="image" content="{{ product.featured_image.src | img_url: 'grande' }}"> | |
| <meta itemprop="name" content="{{ product.title | escape }}"> | |
| <meta itemprop="description" content="{{ product.description | strip_html }}"> | |
| {% if product.vendor %}<meta itemprop="brand" content="{{ product.vendor }}">{% endif %} |
| . | |
| .. | |
| ........ | |
| @ | |
| * | |
| *.* | |
| *.*.* | |
| 🎠|
| <?php | |
| /** | |
| * This Scheduler will run once every minute unlike the Heroku scheduler which only runs every 10 mintues. | |
| * To use this scheduler with Laravel 5.4+ add this file to /app/Console/Commands/RunScheduler.php | |
| * Register this file in app/Console/Kernel.php | |
| * protected $commands = [ | |
| * ... |