Skip to content

Commit

Permalink
* Support for sold out events
Browse files Browse the repository at this point in the history
* Custom text on ticket-buttons
  • Loading branch information
slimndap committed Jan 10, 2014
1 parent 3bff720 commit be27451
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 29 deletions.
4 changes: 2 additions & 2 deletions functions/wpt_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ function meta_box_tickets($event) {
echo ' checked="checked"';
}
echo '> ';
echo '<span>'.__('on sale','wp_theatre').'</span>';
echo '<span>'.__('On sale','wp_theatre').'</span>';
echo '</label><br />';

echo '<label>';
Expand All @@ -240,7 +240,7 @@ function meta_box_tickets($event) {
echo ' checked="checked"';
}
echo '> ';
echo '<span>'.__('sold out','wp_theatre').'</span>';
echo '<span>'.__('Sold out','wp_theatre').'</span>';
echo '</label><br />';

echo '</td>';
Expand Down
2 changes: 1 addition & 1 deletion functions/wpt_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function init() {
'labels' => array(
'name' => __( 'Productions','wp_theatre'),
'singular_name' => __( 'Production','wp_theatre'),
'add_new' => _x('Add New', 'product','wp_theatre'),
'add_new' => _x('Add New', 'production','wp_theatre'),
'new_item' => __('New'),' '.__('production','wp_theatre'),
'add_new_item' => __('Add new').' '.__('production','wp_theatre'),
'edit_item' => __('Edit production','wp_theatre')
Expand Down
Binary file modified lang/wp_theatre-nl_NL.mo
Binary file not shown.
92 changes: 70 additions & 22 deletions lang/wp_theatre-nl_NL.po
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
msgid ""
msgstr ""
"Project-Id-Version: Theatre v0.2.1\n"
"Project-Id-Version: Theatre v0.2.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2014-01-04 22:06:54+0000\n"
"PO-Revision-Date: 2014-01-10 14:26:56+0000\n"
"Last-Translator: slimndap <[email protected]>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -39,50 +39,49 @@ msgid "Theatre"
msgstr "Theater"

#: functions/wpt_admin.php:43
#: functions/wpt_admin.php:374
#: functions/wpt_admin.php:409
#@ default
msgid "Settings"
msgstr "Instellingen"

#: functions/wpt_admin.php:60
#: functions/wpt_admin.php:56
#@ wp_theatre
msgid "Event data"
msgstr "Voorstellingsgegevens"

#: functions/wpt_admin.php:67
#: functions/wpt_production.php:197
#: theatre.php:149
#: functions/wpt_admin.php:63
#: functions/wpt_production.php:207
#: theatre.php:158
#@ wp_theatre
#@ default
msgid "Tickets"
msgstr "Tickets"

#: functions/wpt_admin.php:85
#: functions/wpt_admin.php:81
#@ wp_theatre
msgid "You need to save this production before you can add events."
msgstr "Je moet deze productie opslaan voordat je voorstellingen kan toevoegen."

#: functions/wpt_admin.php:106
#: functions/wpt_admin.php:102
#@ wp_theatre
msgid "Past events"
msgstr "Oudere voorstellingen"

#: functions/wpt_admin.php:187
#: functions/wpt_admin.php:183
#@ wp_theatre
msgid "Event date"
msgstr "Speeldatum"

#: functions/wpt_admin.php:195
#: functions/wpt_admin.php:191
#@ wp_theatre
msgid "Venue"
msgstr "Locatie"

#: functions/wpt_admin.php:203
#: functions/wpt_admin.php:199
#@ wp_theatre
msgid "City"
msgstr "Stad"

#: functions/wpt_admin.php:219
#: functions/wpt_admin.php:215
#@ wp_theatre
msgid "Tickets URL"
msgstr "Tickets URL"
Expand Down Expand Up @@ -123,37 +122,37 @@ msgstr "Producties"
msgid "Production"
msgstr "Productie"

#: functions/wpt_setup.php:39
#: functions/wpt_setup.php:43
#@ wp_theatre
msgid "Events"
msgstr "Voorstellingen"

#: functions/wpt_setup.php:40
#: functions/wpt_setup.php:44
#@ wp_theatre
msgid "Event"
msgstr "Voorstelling"

#: functions/wpt_setup.php:41
#: functions/wpt_setup.php:45
#@ wp_theatre
msgid "New event"
msgstr "Nieuwe voorstelling"

#: functions/wpt_setup.php:42
#: functions/wpt_setup.php:46
#@ wp_theatre
msgid "Add new event"
msgstr "Nieuwe voorstelling toevoegen"

#: functions/wpt_setup.php:43
#: functions/wpt_setup.php:47
#@ wp_theatre
msgid "Edit event"
msgstr "Voorstelling bewerken"

#: functions/wpt_setup.php:56
#: functions/wpt_setup.php:60
#@ wp_theatre
msgid "Seasons"
msgstr "Seizoenen"

#: functions/wpt_setup.php:57
#: functions/wpt_setup.php:61
#@ wp_theatre
msgid "Season"
msgstr "Seizoen"
Expand Down Expand Up @@ -182,9 +181,58 @@ msgstr ""
msgid "http://slimndap.com/"
msgstr ""

#: functions/wpt_admin.php:223
#@ wp_theatre
msgid "Status"
msgstr "Status"

#: functions/wpt_admin.php:250
#@ wp_theatre
msgid "Text on button"
msgstr "Knoptekst"

#: functions/wpt_admin.php:243
#: functions/wpt_production.php:198
#: theatre.php:149
#@ wp_theatre
msgid "Sold out"
msgstr "Uitverkocht"

#: functions/wpt_setup.php:25
#@ default
msgid "New"
msgstr ""

#: functions/wpt_setup.php:25
#: functions/wpt_setup.php:26
#@ wp_theatre
msgid "production"
msgstr "Productie"

#: functions/wpt_setup.php:26
#@ default
msgid "Add new"
msgstr ""

#: functions/wpt_setup.php:27
#@ wp_theatre
msgid "Edit production"
msgstr "Productie bewerken"

#. translators: plugin header field 'Version'
#: theatre.php:0
#@ wp_theatre
msgid "0.2.1"
msgid "0.2.2"
msgstr ""

#: functions/wpt_admin.php:234
#@ wp_theatre
msgid "On sale"
msgstr "In de verkoop"

#: functions/wpt_setup.php:24
#@ wp_theatre
msgctxt "production"
msgid "Add New"
msgstr "Toevoegen"

4 changes: 4 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ This section describes how to install the plugin and get it working.

== Changelog ==

= 0.2.3 =
* Support for sold out events
* Custom text on ticket-buttons

= 0.2.2 =
* Support for Dutch language.

Expand Down
22 changes: 18 additions & 4 deletions theatre.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Plugin URI: http://wordpress.org/plugins/theatre/
Description: Turn your Wordpress website into a theatre website.
Author: Jeroen Schmit, Slim & Dapper
Version: 0.2.2
Version: 0.2.3
Author URI: http://slimndap.com/
Text Domain: wp_theatre
Domain Path: /lang
Expand Down Expand Up @@ -145,9 +145,23 @@ function render_events() {
$html.= '</span>';

$html.= '<br />';
$html.= '<a href="'.get_post_meta($event->ID,'tickets_url',true).'">';
$html.= __('Tickets');
$html.= '</a>';
if (get_post_meta($event->ID,'tickets_status',true) == 'soldout') {
$html.= __('Sold out', 'wp_theatre');
} else {
$url = get_post_meta($event->ID,'tickets_url',true);
if ($url!='') {
$html.= '<a href="'.get_post_meta($event->ID,'tickets_url',true).'">';
$button_text = get_post_meta($event->ID,'tickets_button',true);
if ($button_text!='') {
$html.= $button_text;
} else {
$html.= __('Tickets','wp_theatre');
}
$html.= '</a>';

}
}

$html.= '</li>';
}
$html.= '</ul>';
Expand Down

0 comments on commit be27451

Please sign in to comment.