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 | |
| /* | |
| * Resize images dynamically using wp built in functions | |
| * Victor Teixeira | |
| * | |
| * php 5.2+ | |
| * | |
| * Exemplo de uso: | |
| * | |
| * <?php |
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 | |
| $terms = wp_get_post_terms(get_the_ID(), 'tribe_events_cat'); | |
| $count = count($terms); | |
| if ( $count > 0 ){ | |
| foreach ( $terms as $term ) { | |
| echo '<a href="'. get_term_link($term->slug, 'tribe_events_cat') .'" class="cat_' . $term->slug . '">' . $term->name . '</a>'; | |
| } | |
| } | |
| ?> |
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 | |
| add_filter( 'gettext', 'krogs_event_change_venue_name', 20, 3 ); | |
| /** | |
| * Change comment form default field names. | |
| * | |
| * @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
| */ | |
| function krogs_event_change_venue_name( $translated_text, $text, $domain ) { |
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 | |
| add_filter( 'manage_edit-tribe_events_columns', 'my_columns_filter', 10, 1 ); | |
| function my_columns_filter( $columns ) { | |
| $column_date = array( 'date' => 'Date' ); | |
| $columns = array_slice( $columns, 0, 2, true ) + $column_date + array_slice( $columns, 2, NULL, true ); | |
| return $columns; | |
| } | |
| ?> |
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 remove_styles() { | |
| if(!is_admin()) { | |
| wp_dequeue_style( 'tribe_events-admin-ui' ); | |
| } | |
| } | |
| add_action('wp_print_styles','remove_styles',1); | |
| ?> |
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
| UPDATE wp_options SET option_value = replace(option_value, 'http://potters.local', 'http://www.potterscrackers.com/dev') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
| UPDATE wp_posts SET guid = replace(guid, 'http://potters.local', 'http://www.potterscrackers.com/dev'); | |
| UPDATE wp_posts SET post_content = replace(post_content, 'http://potters.local', 'http://www.potterscrackers.com/dev'); | |
| UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://potters.local', 'http://www.potterscrackers.com/dev'); |
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 | |
| global $post; | |
| $CurrentDate = date('Y-m-d'); | |
| echo $CurrentDate; | |
| $events_today = tribe_get_events( | |
| array( | |
| 'start_date'=>$CurrentDate, | |
| 'end_date'=>$CurrentDate | |
| ) | |
| ); |
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 if (tribe_get_start_date() !== tribe_get_end_date() ) { ?> | |
| <dt class="event-label event-label-start"><?php _e('Starts:', 'tribe-events-calendar') ?></dt> | |
| <dd class="event-meta event-meta-start"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date( null, false, 'F j, Y' ); ?></dd> | |
| <dt class="event-label event-label-from"><?php _e('From:', 'tribe-events-calendar') ?></dt> | |
| <dd class="event-meta event-meta-from"><meta itemprop="fromTime" content="<?php echo tribe_get_start_date( null, false, 'g:ia' ); ?>"/><?php echo tribe_get_start_date( null, false, 'g:ia' ); ?> to <?php echo tribe_get_end_date( null, false, 'g:ia'); ?></dd> | |
| <?php } else { ?> | |
| <dt class="event-label event-label-date"><?php _e('Date:', 'tribe-events-calendar') ?></dt> | |
| <dd class="event-meta event-meta-date"><meta itemprop="startDate" content="<?php echo tribe_get_start_date( null, false, 'Y-m-d' ); ?>"/><?php echo tribe_get_start_date(); ?></d |
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 | |
| global $post; | |
| $get_posts = tribe_get_events(array('posts_per_page'=>-1, 'eventDisplay'=>'past') ); | |
| foreach($get_posts as $post) { setup_postdata($post); | |
| ?> | |
| <?php if ( has_post_thumbnail() ) { ?> | |
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
| <ul> | |
| <?php | |
| global $post; | |
| $events_query = tribe_get_events( | |
| array( | |
| 'eventDisplay'=>'upcoming', | |
| 'posts_per_page'=>10, | |
| 'tax_query'=> array( | |
| array( |