Apply hooks to event details

This commit is contained in:
Brian Miyaji
2015-09-18 12:20:25 +10:00
parent ce879e88b2
commit a39a05830a
3 changed files with 4 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ class SP_Meta_Box_Event_Details {
$taxonomies = get_object_taxonomies( 'sp_event' );
$minutes = get_post_meta( $post->ID, 'sp_minutes', true );
?>
<?php do_action( 'sportspress_event_details_meta_box', $post ); ?>
<div class="sp-event-minutes-field">
<p><strong><?php _e( 'Full Time', 'sportspress' ); ?></strong></p>
<p>

View File

@@ -75,7 +75,7 @@ class SP_Event extends SP_Custom_Post{
public function performance( $admin = false ) {
$teams = get_post_meta( $this->ID, 'sp_team', false );
$performance = (array)get_post_meta( $this->ID, 'sp_players', true );
$labels = sp_get_var_labels( 'sp_performance' );
$labels = apply_filters( 'sportspress_event_performance_labels', sp_get_var_labels( 'sp_performance' ), $this );
$columns = get_post_meta( $this->ID, 'sp_columns', true );
if ( is_array( $teams ) ):
foreach( $teams as $i => $team_id ):

View File

@@ -29,6 +29,8 @@ foreach ( $taxonomies as $taxonomy => $post_type ):
$data[ $obj->labels->singular_name ] = $term->name;
endif;
endforeach;
$data = apply_filters( 'sportspress_event_details', $data, $id );
?>
<div class="sp-template sp-template-event-details">
<h4 class="sp-table-caption"><?php _e( 'Details', 'sportspress' ); ?></h4>