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 indexAction(){ | |
if($this->_isXmlHttpRequest()) | |
{ | |
//é requisição ajax. | |
} | |
} | |
?> |
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 busca_anexos_post( array $args ) | |
{ | |
$result = array(); | |
$defaults = array( | |
'post_type' => 'attachment', | |
'numberposts' => null, | |
'post_status' => null, |
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 | |
$address = 'Praça Sete de Setembro - Belo Horizonte Minas Gerais '; | |
$lat = null; | |
$lng = null; | |
$request_url = 'http://maps.google.com/maps/geo?output=xml&q='.urlencode( $address ); | |
$xml = simplexml_load_file($request_url) or die("url not loading"); | |
$status = $xml->Response->Status->code; | |
if (strcmp($status, "200") == 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
<!DOCTYPE html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> |
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
//Primeiramente o texto inicial | |
NSString *textoInicialDoCompartilhamento = @"Foto Bacana" | |
//Imagem a ser compartilhada | |
UIImage *imagemASerCompartilhada = [UIImage imageNamed=@"foto.png"]; | |
//Coloca os item em um array | |
NSArray *itensCompartilhados = @[textoInicialDoCompartilhamento, imagemASerCompartilhada]; | |
//Cria o UIActivityViewController |
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
//Cria o ComposeViewController | |
SLComposeViewController *facebookViewController = [SLComposeViewController composeViewControllerForType: SLServiceTypeFAcebook]; | |
//Cria o Texto inicial | |
[facebookViewController setInitialText: @"Foto Bacana"]; | |
//Cria a imagem a ser compartilhada | |
[facebookViewController addImage: [UIImage imageNamed:@"foto.png"]]; |
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
define('WPLANG', 'pt_BR'); | |
date_default_timezone_set('America/Sao_Paulo'); | |
setlocale(LC_ALL, 'pt_BR'); |
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
// 1 - Fazer um backup da pasta uploads | |
$ cp -r wp-content/uploads/ wp-contents/_uploads/ | |
// 2 - Excluir a pasta do svn e dar commit | |
$ svn delete wp-content/uploads/ | |
$ svn commit -m"Pasta uploads excluida" | |
// 3 - Criar uma nova pasta uploads e adicionar ao svn | |
$ mkdir wp-content/uploads/ | |
$ svn add wp-content/uploads/ |
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 | |
$toName = 'Emerson Carvalho'; | |
$toEmail = '[email protected]'; | |
$name = ''; | |
$email = ''; | |
$phone = ''; | |
$subject = ''; |
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
<!DOCTYPE html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> | |
<!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> |