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
//Chama a função que cria o meta box | |
add_action( 'add_meta_boxes', 'NOME_meta_box' ); | |
/** | |
* Cria o meta box | |
* Utilizo um array com o nome dos CPT onde o metabox deve ser usado | |
*/ | |
function NOME_meta_box(){ | |
// Array $tipos com o nome dos CPT que devem receber o metabox | |
$tipos = array('cpt_1', 'cpt_2', 'cpt_3'); |
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
add_action( 'restrict_manage_posts', 'my_restrict_manage_posts' ); | |
function my_restrict_manage_posts() { | |
$CPT = "SEU_CPT"; | |
$slug_taxonamy = "SLUG_DA_TAXONOMY"; | |
global $typenow; | |
if ($typenow == $CPT) { | |
$filters = array($slug_taxonamy); | |
foreach ($filters as $tax_slug) { |
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 | |
/** | |
* Shared Linux Hack Quick Fix | |
* ============================= | |
* @author theandystratton | |
* @url http://theandystratton.com/2010/godaddy-shared-linux-hosting-hack-fix | |
* | |
* THIS SCRIPT IS DISTRIBUTED AS IS WITH NO LICENSE, WARRANTY OR LIABILITY. RUN AT YOUR OWN RISK. | |
* | |
* BACK UP YOUR FILES BEFORE RUNNING THIS SCRIPT. |
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
jQuery(function($) { | |
$.data(document.body, 'ajaxUrl', '<?php echo admin_url('admin-ajax.php'); ?>'); | |
FB.init({ | |
appId : '1419904448233697', | |
status : true, // check login status | |
cookie : true, // enable cookies to allow the server to access the session | |
xfbml : true // parse XFBML | |
}); | |
FB.Event.subscribe('comment.create', | |
function(response) { |
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
// Avisar quando houver comentários facebook no post | |
add_action( 'wp_ajax_facebook_comment_post', 'avisar_facebook_comment_post' ); | |
add_action( 'wp_ajax_nopriv_facebook_comment_post', 'avisar_facebook_comment_post' ); | |
function avisar_facebook_comment_post(){ | |
$url = $_GET['post_url']; | |
$nome = "Kiwi!"; | |
$email = "alo@kiwicomcasca.com.br"; | |
$para = "jleonardosmatos@gmail.com"; | |
$assunto = "Novo comentário no Kiwi com Casca"; | |
$conteudo = "Alguém comentou o post <a href='" . $url . "'>" . $url . "</a>"; |
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 remove_menus () { | |
global $menu; | |
$restricted = array( | |
__('Dashboard'), | |
__('Posts'), | |
__('Media'), | |
__('Links'), | |
__('Pages'), | |
__('Appearance'), | |
__('Tools'), |
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
/** | |
* Altera o sistema de arquivos (file system) | |
* isso só deve ser alterado se o usuário estiver com problemas para atualizar | |
* o wordpress ou algum plugin automaticamente, depois da atualização é recomendado | |
* remover esse código. | |
* Valores aceitos: | |
* direct - força o uso de solicitações I/O de dentro de PHP | |
* ssh2 - força o uso de ssh se estiver habilitado | |
* ftpext - força o uso da extensão FTP para acesso via FTP | |
* ftpsockets - utiliza a classe Sockets do PHP para acesso FTP |
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
//-------------DISABLE MOUSE WHEEL SCROLL------------// | |
//--- for IE | |
document.attachEvent('onmousewheel', function(e){ | |
if (!e) var e = window.event; | |
e.returnValue = false; | |
e.cancelBubble = true; | |
return false; | |
}, false); | |
//--- for Safari |
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
UPDATE wp_options | |
SET option_value = replace(option_value, 'http://exemplo1.com/site', 'http://exemplo2.com/site') | |
WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts | |
SET guid = replace(guid, 'http://exemplo1.com/site','http://exemplo2.com/site'); | |
UPDATE wp_posts | |
SET post_content = replace(post_content, 'http://exemplo1.com/site', 'http://exemplo2.com/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
DB | |
DOCS | |
LAYOUT | |
PSD | |
JPG | |
FONTS | |
wp-content | |
uploads | |
project-plugins | |
uploads |
OlderNewer