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
+function ($) { | |
'use strict'; | |
// BOOTSTRAP | |
var Bootstrap = $.fn.modal.Constructor; | |
// MODAL CLASS DEFINITION | |
// ====================== |
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
function sayIt(ms, def) { | |
setTimeout(function() { | |
console.log('middle'); | |
def.resolve(); | |
return 10; | |
}, ms); | |
} | |
function slowPromise() { |
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 var|default('index') ~ '_foo.html' %} |
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
(function () { | |
var language = { | |
delimiters: { | |
thousands: ',', | |
decimal: '.' | |
}, | |
abbreviations: { | |
thousand: 'k', | |
million: 'm', | |
billion: 'b', |
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
{{ "text.rating_counter"|transchoice(votes)|desc("{0} 0 ratings|{1} 1 rate|]1,Inf] %votes% ratings") }} {# :) #} | |
{{ "text.month_counter"|transchoice(months)|desc("{0} 0 months|{1} 1 month|]1,Inf] %months% months") }} {# :( #} |
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
<!-- SOCIAL NETWORK CODE --> | |
<script type="text/javascript" src="http://connect.facebook.net/<?php echo Mage::app()->getLocale()->getLocaleCode() ?>/all.js#xfbml=1"></script> | |
<script type="text/javascript" src="http://static.ak.fbcdn.net/connect.php/js/FB.Share"></script> | |
<?php $_product = Mage::registry('current_product'); if($_product): ?> | |
<?php $_header = new Mage_Page_Block_Html_Header(); ?> | |
<meta property="og:title" content="<?php echo $this->stripTags($_product->getName(), null, true) ?>"/> | |
<meta property="og:url" content="<?php echo $this->helper('core/url')->getCurrentUrl();?>"/> | |
<meta property="og:type" content="product"/> | |
<meta property="og:image" content="<?php echo $this->helper('catalog/image')->init($_product, 'image') ;?>"/> | |
<meta property="og:site_name" content="<?php echo $_header->getLogoAlt() ?>" /> |
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
<!--[if lte IE 6]> | |
<link rel="stylesheet" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" media="screen, projection" /> | |
<![endif]--> |
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
function aboriginal_theme_option($atts) { | |
// EXAMPLE USAGE: | |
// [theme_option show="company_address"] | |
$options = aboriginal_get_theme_options(); | |
extract(shortcode_atts(array( | |
'show' => '' | |
), $atts)); | |
return $options[$show] ? $options[$show] : false; | |
} | |
add_shortcode('theme_option', 'aboriginal_theme_option'); |
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 | |
function kepek_author_rewrite() { | |
global $wp_rewrite; | |
$wp_rewrite->author_base = 'autor'; | |
$wp_rewrite->flush_rules(); | |
} | |
add_action('init', 'kepek_author_rewrite'); |
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 | |
/* Vritual Helper Function */ | |
public function translate($text = false, $lang = false) { | |
$lang = $lang ? $lang : Mage::app()->getLocale()->getLocaleCode(); | |
if($text) { | |
preg_match('#\[translate lang="'.$lang.'"\](.*?)\[/translate\]#si', $text, $match); | |
if($match) { | |
$output = trim($match[1]); |
OlderNewer