- Modificado (modified);
- Preparado (staged/index)
- Consolidado (comitted);
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 you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
Make sure your modal has an id: | |
<div class="modal" id="myModal" ... > | |
Then stick this bit of Javascript at at the end of your document: | |
*/ | |
$(document).ready(function() { |
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 | |
/** | |
* Hide editor on specific pages. | |
* | |
*/ | |
add_action( 'admin_init', 'hide_editor' ); | |
function hide_editor() { | |
// Get the Post 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 | |
function enqueue_scripts() { | |
wp_enqueue_script( 'jquery-ui-core' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'enqueue_scripts' ); |
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 | |
/* | |
Use para chamar qualquer arquivo dentro do tema. | |
Ex: echo theme_url( 'assets/images/logo.png' ); | |
*/ | |
function theme_url( $path = null ) { | |
return get_template_directory_uri() . '/' . $path; | |
} |
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('admin_bar_menu', 'show_template'); | |
function show_template() { | |
global $template; | |
print_r($template); | |
} |
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 | |
$args = array( | |
'post_type' => "eventos", | |
'posts_per_page' => -1, | |
'meta_key' => 'data', | |
'orderby' => 'data', | |
'order' => 'ASC' | |
); | |
setlocale( LC_ALL, 'pt_BR', 'pt_BR.iso-8859-1', 'pt_BR.utf-8', 'portuguese' ); | |
date_default_timezone_set( 'America/Sao_Paulo' ); |
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 filter_search( $query ) { | |
if ( !is_admin() && $query->is_main_query() && $query->is_search ) { | |
$tax_query = array( | |
array( | |
'taxonomy' => 'frutas', | |
'field' => 'slug', | |
'terms' => 'laranja' | |
), | |
array( |
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 | |
// ... include at the end of functions.php | |
// 1. Add google maps -- REQUIRED GOOGLE MAPS API KEY | |
function wp_google_scripts() { | |
$API_KEY = "AIzaSyAj1hqhXwaUnJDZzisebduqKg2QFsCYCS4"; | |
wp_enqueue_script( 'google-maps-native', "http://maps.googleapis.com/maps/api/js?key=".$API_KEY); | |
} | |
add_action( 'admin_enqueue_scripts', 'wp_google_scripts' ); |
OlderNewer