diff --git a/neuf-events-admin.php b/neuf-events-admin.php
index f0e21ba..522363c 100644
--- a/neuf-events-admin.php
+++ b/neuf-events-admin.php
@@ -9,6 +9,7 @@ function change_columns( $cols ) {
'endtime' => __( 'Ending Date & Time', 'neuf_event'),
'venue' => __( 'Venue', 'neuf_event' ),
'type' => __( 'Type', 'neuf_event' ),
+ 'promoperiod' => __( 'Promo Period', 'neuf_event' ),
'date' => __( 'Date Published', 'neuf_event' ),
'author' => __( 'Author', 'neuf_event' ),
);
@@ -33,6 +34,9 @@ function custom_columns( $column, $post_id ) {
case "venue":
echo get_post_meta( $post_id , '_neuf_events_venue', true);
break;
+ case "promoperiod":
+ echo get_post_meta( $post_id, '_neuf_events_promo_period', true);
+ break;
}
}
add_action( "manage_posts_custom_column" , "custom_columns", 10, 2 );
@@ -44,6 +48,7 @@ function sortable_columns( $cols ) {
'endtime' => 'endtime',
'type' => 'type',
'venue' => 'venue',
+ 'promoperiod' => 'promoperiod',
);
return array_merge($cols, $custom_cols);
}
@@ -93,9 +98,12 @@ function neuf_event_details() {
-
+
+
+
+
Other', 'neuf_event');
echo '
';
}
+/* Promo period */
+function neuf_event_promoperiod(){
+ global $post;
+
+ $promoperiod = array(
+ __('Default', 'neuf_event'), __('Month', 'neuf_event'), __('Semester', 'neuf_event'),
+ );
+ $neuf_event_promoperiod = get_post_meta($post->ID, '_neuf_events_promo_period', true);
+ _e('Promo Period', 'neuf_event');
+ echo '
';
+}
/* Price and additional info. */
function neuf_event_div() {
diff --git a/neuf-events-post-types.php b/neuf-events-post-types.php
index 57af919..b31c307 100644
--- a/neuf-events-post-types.php
+++ b/neuf-events-post-types.php
@@ -68,6 +68,7 @@ function neuf_events_save_info( $post_id ) {
$tosave['_neuf_events_bs_url'] = $_POST['_neuf_events_bs_url'];
$tosave['_neuf_events_fb_url'] = $_POST['_neuf_events_fb_url'];
$tosave['_neuf_events_venue'] = $_POST['_neuf_events_venue'];
+ $tosave['_neuf_events_promo_period'] = $_POST['_neuf_events_promo_period'];
// Update or add post meta
foreach($tosave as $key=>$value)