This file contains hidden or 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: Your Shipping plugin | |
Plugin URI: https://woocommerce.com/ | |
Description: Your shipping method plugin | |
Version: 1.0.0 | |
Author: WooThemes | |
Author URI: https://woocommerce.com/ | |
*/ |
This file contains hidden or 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
RewriteEngine On | |
RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in.*$ [NC] | |
RewriteRule ^.*/uploads/.*$ http://domain.com/protected.jpg [L,R=301] |
This file contains hidden or 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
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin | |
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril | |
animation: "fade", //String: Select your animation type, "fade" or "slide" | |
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! | |
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" | |
reverse: false, //{NEW} Boolean: Reverse the animation direction | |
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end | |
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode | |
startAt: 0, //Integer: The slide that the slider should start on. Array nota |
This file contains hidden or 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
<filesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|svg|js|css|swf)$"> | |
Header set Cache-Control "max-age=84600, public" | |
</filesMatch> |
This file contains hidden or 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 | |
// https://rudrastyh.com/woocommerce/my-account-menu.html | |
/* add CSS | |
body.woocommerce-account ul li.woocommerce-MyAccount-navigation-link--log-history a:before{ | |
content: "\f1da"; | |
} | |
*/ | |
/* | |
* Step 1. Add Link to My Account menu |
This file contains hidden or 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 | |
$cep = '17013021'; | |
$token = 'API_KEY'; | |
// Recebe o CEP | |
$curl = curl_init( 'http://www.cepaberto.com/api/v2/ceps.json?cep='.$cep ); | |
// Adiciona o token no cabeçalho | |
curl_setopt( $curl, CURLOPT_HTTPHEADER, array( 'Authorization: Token token="'.$token.'"' ) ); |
This file contains hidden or 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 $instagram = simplexml_load_file( 'https://instawidget.net/feed/user/google' ) ?> | |
<?php foreach ( $instagram->channel->item as $key => $value ): ?> | |
<a href="<?php echo $value->link ?>"> | |
<img src="<?php echo $value->enclosure['url'] ?>" alt=""> | |
</a> | |
<?php endforeach ?> |
This file contains hidden or 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 wpsx_redefine_locale( $locale ) { | |
$lang = $_GET['lang']; | |
if( $lang == 'en'){ | |
$locale = 'en_US'; | |
} else { | |
$locale = 'pt_BR'; | |
} | |
return $locale; | |
} |
This file contains hidden or 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
setInterval(function(){ | |
botao = jQuery('#wp-smush-bulk-wrap-box > div.box-container > div.wp-smush-bulk-wrapper > button'); | |
if( botao.attr('disabled') != 'disabled' ) { | |
botao.trigger('click'); | |
} | |
}, 1000); |
This file contains hidden or 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 $instagram = json_decode( file_get_contents( 'https://www.instagram.com/user_name/media/' ) ) ?> | |
<?php for ( $i=0; $i<4; $i++ ): ?> | |
<a href="https://www.instagram.com/p/<?php echo $instagram->items[$i]->code ?>" target="_blank"><img src="<?php echo $instagram->items[$i]->images->low_resolution->url ?>" alt=""></a> | |
<?php endfor ?> |
NewerOlder