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
/** | |
* Extra styles to template | |
* author: marcos freitas at c4network.com.br; | |
*/ | |
/* SUMMARY */ | |
/* | |
1 - Extra configurations to use on site | |
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 | |
/* | |
* Password protect a WordPress site, with a redirect to the requested URL after successful login | |
* | |
* Based on: | |
* http://wordpress.stackexchange.com/a/64999 | |
* http://kovshenin.com/2012/current-url-in-wordpress/ | |
* | |
**/ |
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
<script type="text/javascript"> | |
// See MDN: https://developer.mozilla.org/en-US/docs/DOM/MutationObserver?redirectlocale=en-US&redirectslug=DOM%2FDOM_Mutation_Observers | |
(function(){ | |
// select the target node | |
var target = document.querySelector('body'); | |
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; | |
var i=0; | |
// create an observer instance | |
var observer = new MutationObserver(function(mutations) { |
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 | |
/** | |
* Part of archive-product.php - add_to_cart button | |
* Template to apply ajax in button add to cart | |
* Original way to do add_to_cart button | |
*/ | |
echo apply_filters( 'woocommerce_loop_add_to_cart_link', | |
sprintf( '<a href="%s" rel="nofollow" data-product_id="%s" data-product_sku="%s" class="button %s product_type_%s"><i class="icon icon-white icon-shopping-cart"></i> %s</a>', | |
esc_url( $product->add_to_cart_url() ), | |
esc_attr( $product->id ), |
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 | |
/** | |
* Loop Price | |
* Overriding original price.php | |
* @author Marcos Freitas - WooThemes | |
* @package WooCommerce/Templates | |
* @version 1.6.4 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
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 | |
$start = microtime(true); | |
header('Content-Type: text/html; charset=ISO-8859-1'); | |
echo '<h3 style="color: #2e8ece; font-family: sans-serif; font-weight: normal !important; margin: 10px; width: 100%; text-align: center; clear:both;">Tempo inicial de execução do script: '.$start.'</h3>'; | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
?> |
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 | |
/** | |
* Plugin Name: Woocommerce PagSeguro Price and 18 installments | |
* Description: Add the price with 18 installments with interest calculated using the factor of pagseguro. | |
* Adiciona o valor do produto dividido em 18 parcelas, que é a quantidade máxima no pagseguro. | |
* Esse cálculo é feito com os fatores correspondentes a cada bandeira de cartão. Dados originais do pagseguro. | |
* Author: Marcos Freitas http://fb.me/marcoosfreitas | |
* Version: 1.2 | |
* -- changed names of functions and the order of the product price | |
* License: GPLv2 or later |
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 | |
/** | |
* Carregando um módulo pelo nome | |
*/ | |
if(!empty($anunciante_gk5)): | |
$modName = "mod_news_pro_gk5"; | |
$modTitle = $anunciante_gk5; | |
$document = JFactory::getDocument(); | |
$renderer = $document->loadRenderer('module'); |
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 | |
/*É preciso tratar a string da descrição do câmbio pq o html vem sujo com IDs duplicados*/ | |
$item['n_content'] = trim((string) $attr->description); | |
/* | |
exemplo de conteúdo: | |
<img src='http://imguol.com/c/noticias/2014/07/17/17jul2014---um-aviao-de-passageiros-da-malaysia-airlines-com-295-pessoas-bordo-caiu-na-ucrania-na-regiao-de-fronteira-com-a-russia-de-acordo-com-informacoes-da-agencia-russa-de-noticias-interfax-1405612628026_142x100.jpg' align="left" /> | |
Veja o Álbum de fotos | |
*/ |
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
/* @author: Marcos Freitas */ | |
/* | |
* Into function triggerSlider() replace the call for the function triggerEffects() | |
*/ | |
// passing the limite of recursive executions | |
triggerEffects(10); | |
/* |
OlderNewer