⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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 | |
/* | |
* Resize images dynamically using wp built in functions | |
* Victor Teixeira | |
* | |
* php 5.2+ | |
* | |
* Exemplo de uso: | |
* | |
* <?php |
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 | |
/** | |
* WordPress Query Comprehensive Reference | |
* Compiled by luetkemj - luetkemj.com | |
* | |
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query | |
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php | |
*/ | |
$args = 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
//set mini cal days as links | |
if( function_exists('tribe_get_linked_day') ) { | |
$date = tribe_get_start_date( '', false, 'Y-m-'.$day.'' ); | |
$return .= ( count($monthView[$day]) ) ? "<a href='" . tribe_get_day_link($date) . "' class='tribe-events-mini-has-event'>$day</a>" : $day; | |
} else { | |
$return .= ( count($monthView[$day]) ) ? "<a class='tribe-events-mini-has-event'>$day</a>" : $day; | |
} |
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 | |
/*-----------------------------------------------------------------------------------*/ | |
/* Conditional Logic to Detect Various Event Related Views/Pages | |
/*-----------------------------------------------------------------------------------*/ | |
if( tribe_is_month() && !is_tax() ) { // Month View Page | |
echo 'were on the month view page'; | |
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page |
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 | |
// Dirty, easy to miss a ' or " or . | |
echo '<a href="' . get_permalink() . '" class="link">' . get_the_title() . '</a>'; | |
// Clean, easier to read | |
printf( '<a href="%s" class="link">%s</a>', get_permalink(), get_the_title() ); | |
// Almost as clean, and more secure, maybe a little paranoic :) | |
printf( '<a href="%s" class="link">%s</a>', esc_url( get_permalink() ), esc_html( get_the_title() ) ); |
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 | |
add_filter('wpseo_title','my_custom_titles'); | |
function my_custom_titles($title) { | |
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page | |
return 'Events Calendar'; | |
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages | |
return 'Events Calendar' . ' » ' . single_term_title('', false); | |
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List | |
return 'Events List'; |
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_filter('tribe_get_events_title','custom_get_events_title'); | |
function custom_get_events_title( $depth=true ) { | |
global $wp_query; | |
$tribe_ecp = TribeEvents::instance(); | |
$title = __('Class Schedule', 'tribe-events-calendar'); | |
// TODO: Use the displayed dates for the title | |
/* | |
if ( tribe_is_upcoming() || isset( $_REQUEST['tribe-bar-date'] ) ) { |
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' => array(TribeEvents::POSTTYPE), // use post_type IN () to avoid old tribe queries | |
'posts_per_page' => -1, | |
'order' => 'ASC', | |
'meta_query' => array( | |
array( | |
'key' => '_EventOrganizerID', | |
'value' => get_the_ID(), |
OlderNewer