Version Description
Download this release
Release Info
Developer | MotoPress |
Plugin | Timetable and Event Schedule by MotoPress |
Version | 2.3.9 |
Comparing to | |
See all releases |
Code changes from version 2.3.8 to 2.3.9
- admin/help/index.php +1 -0
- admin/import/import.php +6 -2
- admin/import/index.php +6 -2
- classes/blocks/class-timetable-block.php +4 -0
- classes/class-core.php +4 -3
- classes/class-hooks.php +2 -2
- classes/class-preprocessor.php +8 -8
- classes/class-shortcode.php +10 -4
- classes/class-view.php +5 -7
- classes/controllers/class-controller-column.php +2 -0
- classes/controllers/class-controller-events.php +45 -22
- classes/controllers/class-controller-popup.php +11 -5
- classes/controllers/class-controller-settings.php +27 -6
- classes/models/class-column.php +14 -2
- classes/models/class-export.php +6 -2
- languages/mp-timetable.pot +186 -165
- media/js/blocks/dist/index.min.js +1 -1
- media/js/blocks/src/timetable/inspector.js +11 -0
- media/js/mce-timeTable-buttons.js +3 -0
- media/js/mptt-functions.js +1 -1
- media/js/mptt-functions.min.js +1 -1
- mp-timetable.php +1 -1
- readme.txt +4 -0
- templates-functions/action-shortcode-functions.php +32 -11
- templates/events/column-category.php +4 -3
- templates/events/metabox-event-data.php +7 -4
- templates/events/metabox-event-options.php +7 -7
- templates/popup/index.php +10 -0
admin/help/index.php
CHANGED
@@ -48,6 +48,7 @@
|
|
48 |
<li><code>row_height</code> - event block height in pixels; example <kbd>45</kbd></li>
|
49 |
<li><code>font_size</code> - base font size for the table; example <kbd>12px</kbd>, <kbd>2em</kbd>, <kbd>80%</kbd>.</li>
|
50 |
<li><code>view</code> - filter style; possible values <kbd>dropdown_list</kbd> or <kbd>tabs</kbd>.</li>
|
|
|
51 |
<li><code>label</code> - filter label; default is <kbd>All Events</kbd>.</li>
|
52 |
<li><code>hide_label</code> - display 'All Events' label or not; possible values <kbd>1</kbd> or <kbd>0</kbd>.</li>
|
53 |
<li><code>hide_hrs</code> - hide first (hours) column; possible values <kbd>1</kbd> or <kbd>0</kbd>.</li>
|
48 |
<li><code>row_height</code> - event block height in pixels; example <kbd>45</kbd></li>
|
49 |
<li><code>font_size</code> - base font size for the table; example <kbd>12px</kbd>, <kbd>2em</kbd>, <kbd>80%</kbd>.</li>
|
50 |
<li><code>view</code> - filter style; possible values <kbd>dropdown_list</kbd> or <kbd>tabs</kbd>.</li>
|
51 |
+
<li><code>view_sort</code> - order of items in filter; possible values <kbd><i>empty string</i></kbd>, <kbd>menu_order</kbd>, <kbd>post_title</kbd>.</li>
|
52 |
<li><code>label</code> - filter label; default is <kbd>All Events</kbd>.</li>
|
53 |
<li><code>hide_label</code> - display 'All Events' label or not; possible values <kbd>1</kbd> or <kbd>0</kbd>.</li>
|
54 |
<li><code>hide_hrs</code> - hide first (hours) column; possible values <kbd>1</kbd> or <kbd>0</kbd>.</li>
|
admin/import/import.php
CHANGED
@@ -1,2 +1,6 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( current_user_can('import') ) { ?>
|
4 |
+
<h3><?php _e('Import', 'mp-timetable') ?></h3><?php
|
5 |
+
wp_import_upload_form('admin.php?import=mptt-importer&step=1');
|
6 |
+
}
|
admin/import/index.php
CHANGED
@@ -3,8 +3,12 @@ use mp_timetable\plugin_core\classes\View as View;
|
|
3 |
|
4 |
View::get_instance()->render_html('../admin/import/header', $data);
|
5 |
|
6 |
-
|
|
|
|
|
7 |
|
8 |
-
|
|
|
|
|
9 |
|
10 |
View::get_instance()->render_html('../admin/import/footer', $data);
|
3 |
|
4 |
View::get_instance()->render_html('../admin/import/header', $data);
|
5 |
|
6 |
+
if ( current_user_can('export') ) {
|
7 |
+
View::get_instance()->render_html('../admin/import/export', $data);
|
8 |
+
}
|
9 |
|
10 |
+
if ( current_user_can('import') ) {
|
11 |
+
View::get_instance()->render_html('../admin/import/import', $data);
|
12 |
+
}
|
13 |
|
14 |
View::get_instance()->render_html('../admin/import/footer', $data);
|
classes/blocks/class-timetable-block.php
CHANGED
@@ -70,6 +70,10 @@ class Timetable_Block {
|
|
70 |
'type' => 'string',
|
71 |
'default' => 'dropdown_list',
|
72 |
),
|
|
|
|
|
|
|
|
|
73 |
'label' => array(
|
74 |
'type' => 'string',
|
75 |
'default' => __( "All Events", 'mp-timetable' ),
|
70 |
'type' => 'string',
|
71 |
'default' => 'dropdown_list',
|
72 |
),
|
73 |
+
'view_sort' => array(
|
74 |
+
'type' => 'string',
|
75 |
+
'default' => '',
|
76 |
+
),
|
77 |
'label' => array(
|
78 |
'type' => 'string',
|
79 |
'default' => __( "All Events", 'mp-timetable' ),
|
classes/class-core.php
CHANGED
@@ -307,13 +307,14 @@ class Core {
|
|
307 |
* Route plugin url
|
308 |
*/
|
309 |
public function wp_ajax_route_url() {
|
|
|
310 |
$controller = isset( $_REQUEST[ "controller" ] ) ? $_REQUEST[ "controller" ] : null;
|
311 |
$action = isset( $_REQUEST[ "mptt_action" ] ) ? $_REQUEST[ "mptt_action" ] : null;
|
312 |
-
|
313 |
-
if ( ! empty( $action ) ) {
|
314 |
// call controller
|
315 |
Preprocessor::get_instance()->call_controller( $action, $controller );
|
316 |
-
|
317 |
}
|
318 |
}
|
319 |
|
307 |
* Route plugin url
|
308 |
*/
|
309 |
public function wp_ajax_route_url() {
|
310 |
+
|
311 |
$controller = isset( $_REQUEST[ "controller" ] ) ? $_REQUEST[ "controller" ] : null;
|
312 |
$action = isset( $_REQUEST[ "mptt_action" ] ) ? $_REQUEST[ "mptt_action" ] : null;
|
313 |
+
|
314 |
+
if ( ! empty( $action ) && current_user_can('edit_posts') ) {
|
315 |
// call controller
|
316 |
Preprocessor::get_instance()->call_controller( $action, $controller );
|
317 |
+
wp_die();
|
318 |
}
|
319 |
}
|
320 |
|
classes/class-hooks.php
CHANGED
@@ -204,14 +204,14 @@ class Hooks extends Core {
|
|
204 |
|
205 |
//Settings
|
206 |
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Settings', 'mp-timetable' ), __( 'Settings', 'mp-timetable' ),
|
207 |
-
'
|
208 |
|
209 |
//Export / Import
|
210 |
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Export / Import', 'mp-timetable' ), __( 'Export / Import', 'mp-timetable' ),
|
211 |
'import', 'mptt-import', array( $this->get_controller( 'import' ), 'action_content' ) );
|
212 |
|
213 |
//Help
|
214 |
-
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Help', 'mp-timetable' ), __( 'Help', 'mp-timetable' ),
|
215 |
'edit_posts', 'mptt-help', array( $this->get_controller( 'help' ), 'action_content' ) );
|
216 |
}
|
217 |
|
204 |
|
205 |
//Settings
|
206 |
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Settings', 'mp-timetable' ), __( 'Settings', 'mp-timetable' ),
|
207 |
+
'manage_options', 'mptt-settings', array( $this->get_controller( 'settings' ), 'action_content' ) );
|
208 |
|
209 |
//Export / Import
|
210 |
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Export / Import', 'mp-timetable' ), __( 'Export / Import', 'mp-timetable' ),
|
211 |
'import', 'mptt-import', array( $this->get_controller( 'import' ), 'action_content' ) );
|
212 |
|
213 |
//Help
|
214 |
+
add_submenu_page( 'edit.php?post_type=mp-event', __( 'Help & Shortcode', 'mp-timetable' ), __( 'Help & Shortcode', 'mp-timetable' ),
|
215 |
'edit_posts', 'mptt-help', array( $this->get_controller( 'help' ), 'action_content' ) );
|
216 |
}
|
217 |
|
classes/class-preprocessor.php
CHANGED
@@ -61,29 +61,29 @@ class Preprocessor extends GUMP {
|
|
61 |
* Call controller
|
62 |
*
|
63 |
* @param string $action
|
64 |
-
* @param bool|false $
|
65 |
*
|
66 |
* @return mixed
|
67 |
*/
|
68 |
-
public function call_controller($action = 'content', $
|
69 |
-
if (empty($
|
70 |
trigger_error("Wrong controller ");
|
71 |
}
|
72 |
$path = Mp_Time_Table::get_plugin_part_path('classes/controllers/');
|
73 |
// if controller exists
|
74 |
-
if ('controller' != $
|
75 |
-
$ControllerName = 'Controller_' . ucfirst($
|
76 |
if (class_exists($ControllerName)) {
|
77 |
-
trigger_error("Wrong controller {$path}class-controller-{$
|
78 |
}
|
79 |
}
|
80 |
$action = "action_$action";
|
81 |
-
$controller = Core::get_instance()->get_state()->get_controller($
|
82 |
// if method exists
|
83 |
if (method_exists($controller, $action)) {
|
84 |
return $controller->$action();
|
85 |
} else {
|
86 |
-
trigger_error("Wrong {$action} in {$path}class-controller-{$
|
87 |
}
|
88 |
}
|
89 |
|
61 |
* Call controller
|
62 |
*
|
63 |
* @param string $action
|
64 |
+
* @param bool|false $controller
|
65 |
*
|
66 |
* @return mixed
|
67 |
*/
|
68 |
+
public function call_controller($action = 'content', $controller = false) {
|
69 |
+
if (empty($controller)) {
|
70 |
trigger_error("Wrong controller ");
|
71 |
}
|
72 |
$path = Mp_Time_Table::get_plugin_part_path('classes/controllers/');
|
73 |
// if controller exists
|
74 |
+
if ('controller' != $controller && !file_exists("{$path}class-controller-{$controller}.php")) {
|
75 |
+
$ControllerName = 'Controller_' . ucfirst($controller);
|
76 |
if (class_exists($ControllerName)) {
|
77 |
+
trigger_error("Wrong controller {$path}class-controller-{$controller}.php");
|
78 |
}
|
79 |
}
|
80 |
$action = "action_$action";
|
81 |
+
$controller = Core::get_instance()->get_state()->get_controller($controller);
|
82 |
// if method exists
|
83 |
if (method_exists($controller, $action)) {
|
84 |
return $controller->$action();
|
85 |
} else {
|
86 |
+
trigger_error("Wrong {$action} in {$path}class-controller-{$controller}.php");
|
87 |
}
|
88 |
}
|
89 |
|
classes/class-shortcode.php
CHANGED
@@ -64,8 +64,9 @@ class Shortcode extends Core {
|
|
64 |
'events' => "",
|
65 |
'event_categ' => "",
|
66 |
'col' => "",
|
67 |
-
'increment' => "1",
|
68 |
-
'view' => "dropdown_list",
|
|
|
69 |
'label' => __( "All Events", 'mp-timetable' ),
|
70 |
'hide_label' => "0",
|
71 |
'title' => "0",
|
@@ -76,11 +77,11 @@ class Shortcode extends Core {
|
|
76 |
'user' => "0",
|
77 |
'hide_hrs' => "0",
|
78 |
'hide_empty_rows' => "1",
|
79 |
-
'text_align_vertical' => "default",
|
80 |
'row_height' => "45",
|
81 |
'font_size' => "",
|
82 |
'disable_event_url' => "0",
|
83 |
-
'text_align' => "center",
|
84 |
'id' => "",
|
85 |
'custom_class' => "",
|
86 |
'responsive' => "1"
|
@@ -273,6 +274,11 @@ class Shortcode extends Core {
|
|
273 |
'label' => __( 'Filter style', 'mp-timetable' ),
|
274 |
'list' => array( 'dropdown_list' => __( 'Dropdown list', 'mp-timetable' ), 'tabs' => __( 'Tabs', 'mp-timetable' ) )
|
275 |
),
|
|
|
|
|
|
|
|
|
|
|
276 |
'label' => array(
|
277 |
'type' => 'text',
|
278 |
'label' => __( 'Filter label', 'mp-timetable' ),
|
64 |
'events' => "",
|
65 |
'event_categ' => "",
|
66 |
'col' => "",
|
67 |
+
'increment' => "1", // 1 | 0.5 | 0.25
|
68 |
+
'view' => "dropdown_list", // dropdown_list | tabs
|
69 |
+
'view_sort' => "", // '' | menu_order || post_title
|
70 |
'label' => __( "All Events", 'mp-timetable' ),
|
71 |
'hide_label' => "0",
|
72 |
'title' => "0",
|
77 |
'user' => "0",
|
78 |
'hide_hrs' => "0",
|
79 |
'hide_empty_rows' => "1",
|
80 |
+
'text_align_vertical' => "default", // default | top | middle | bottom
|
81 |
'row_height' => "45",
|
82 |
'font_size' => "",
|
83 |
'disable_event_url' => "0",
|
84 |
+
'text_align' => "center", // left | center | right
|
85 |
'id' => "",
|
86 |
'custom_class' => "",
|
87 |
'responsive' => "1"
|
274 |
'label' => __( 'Filter style', 'mp-timetable' ),
|
275 |
'list' => array( 'dropdown_list' => __( 'Dropdown list', 'mp-timetable' ), 'tabs' => __( 'Tabs', 'mp-timetable' ) )
|
276 |
),
|
277 |
+
'view_sort' => array(
|
278 |
+
'type' => 'select',
|
279 |
+
'label' => __( 'Order of items in filter', 'mp-timetable' ),
|
280 |
+
'list' => array( '' => __( 'Default', 'mp-timetable' ), 'menu_order' => __( 'Menu Order', 'mp-timetable' ), 'post_title' => __( 'Title', 'mp-timetable' ) )
|
281 |
+
),
|
282 |
'label' => array(
|
283 |
'type' => 'text',
|
284 |
'label' => __( 'Filter label', 'mp-timetable' ),
|
classes/class-view.php
CHANGED
@@ -60,18 +60,16 @@ class View {
|
|
60 |
* @return string
|
61 |
*/
|
62 |
public function render_html($template, $data = null, $output = true) {
|
63 |
-
$includeFile = $this->templates_path . $template . '.php';
|
64 |
-
|
65 |
-
ob_start();
|
66 |
|
67 |
-
|
68 |
-
|
|
|
69 |
}
|
70 |
|
71 |
-
$this->
|
72 |
|
|
|
73 |
include($includeFile);
|
74 |
-
|
75 |
$out = ob_get_clean();
|
76 |
|
77 |
if ($output) {
|
60 |
* @return string
|
61 |
*/
|
62 |
public function render_html($template, $data = null, $output = true) {
|
|
|
|
|
|
|
63 |
|
64 |
+
$this->data = $data;
|
65 |
+
if ( is_array($data) ) {
|
66 |
+
extract($data, EXTR_SKIP);
|
67 |
}
|
68 |
|
69 |
+
$includeFile = $this->templates_path . $template . '.php';
|
70 |
|
71 |
+
ob_start();
|
72 |
include($includeFile);
|
|
|
73 |
$out = ob_get_clean();
|
74 |
|
75 |
if ($output) {
|
classes/controllers/class-controller-column.php
CHANGED
@@ -26,6 +26,7 @@ class Controller_Column extends Controller {
|
|
26 |
* Action template
|
27 |
*/
|
28 |
public function action_template() {
|
|
|
29 |
$this->data = $_REQUEST;
|
30 |
$this->get_view()->render_html("events/index", $this->data);
|
31 |
}
|
@@ -34,6 +35,7 @@ class Controller_Column extends Controller {
|
|
34 |
* @param $post
|
35 |
*/
|
36 |
public function action_page_view($post) {
|
|
|
37 |
$events = $this->get('events')->get_event_data(array('field' => 'column_id', 'id' => $post->ID));
|
38 |
return $events;
|
39 |
}
|
26 |
* Action template
|
27 |
*/
|
28 |
public function action_template() {
|
29 |
+
|
30 |
$this->data = $_REQUEST;
|
31 |
$this->get_view()->render_html("events/index", $this->data);
|
32 |
}
|
35 |
* @param $post
|
36 |
*/
|
37 |
public function action_page_view($post) {
|
38 |
+
|
39 |
$events = $this->get('events')->get_event_data(array('field' => 'column_id', 'id' => $post->ID));
|
40 |
return $events;
|
41 |
}
|
classes/controllers/class-controller-events.php
CHANGED
@@ -11,10 +11,10 @@ use mp_timetable\plugin_core\classes\Controller as Controller;
|
|
11 |
* Time: 5:34 PM
|
12 |
*/
|
13 |
class Controller_Events extends Controller {
|
14 |
-
|
15 |
protected static $instance;
|
16 |
private $data;
|
17 |
-
|
18 |
/**
|
19 |
* @return Controller_Events
|
20 |
*/
|
@@ -22,43 +22,58 @@ class Controller_Events extends Controller {
|
|
22 |
if (null === self::$instance) {
|
23 |
self::$instance = new self();
|
24 |
}
|
25 |
-
|
26 |
return self::$instance;
|
27 |
}
|
28 |
-
|
29 |
/**
|
30 |
* Action template
|
31 |
*/
|
32 |
public function action_template() {
|
|
|
33 |
$this->data = $_REQUEST;
|
34 |
$this->get_view()->render_html("events/index", $this->data);
|
35 |
}
|
36 |
-
|
37 |
/**
|
38 |
* Delete event data by ID
|
39 |
*/
|
40 |
public function action_delete() {
|
41 |
-
|
42 |
-
if (
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
} else {
|
45 |
-
|
46 |
}
|
47 |
}
|
48 |
-
|
49 |
/**
|
50 |
* Get single event data
|
51 |
*/
|
52 |
public function action_get_event_data() {
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
} else {
|
58 |
-
|
59 |
}
|
60 |
}
|
61 |
-
|
62 |
/**
|
63 |
* Get events by column id
|
64 |
*
|
@@ -67,11 +82,11 @@ class Controller_Events extends Controller {
|
|
67 |
* @return mixed
|
68 |
*/
|
69 |
public function get_all_event_by_post($post) {
|
|
|
70 |
// Show draft timeslots on preview
|
71 |
$show_public_only = ((get_post_status($post->ID) == 'draft') && is_preview()) ? false : true;
|
72 |
-
|
73 |
$result = $this->get('events')->get_event_data(array('field' => 'event_id', 'id' => $post->ID), 'event_start', $show_public_only);
|
74 |
-
|
75 |
return $result;
|
76 |
}
|
77 |
|
@@ -79,12 +94,20 @@ class Controller_Events extends Controller {
|
|
79 |
* Update Single Event data
|
80 |
*/
|
81 |
public function action_update_event_data() {
|
|
|
82 |
$request = $_REQUEST;
|
83 |
-
|
84 |
-
if (
|
85 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
86 |
} else {
|
87 |
-
|
88 |
}
|
89 |
}
|
90 |
}
|
11 |
* Time: 5:34 PM
|
12 |
*/
|
13 |
class Controller_Events extends Controller {
|
14 |
+
|
15 |
protected static $instance;
|
16 |
private $data;
|
17 |
+
|
18 |
/**
|
19 |
* @return Controller_Events
|
20 |
*/
|
22 |
if (null === self::$instance) {
|
23 |
self::$instance = new self();
|
24 |
}
|
25 |
+
|
26 |
return self::$instance;
|
27 |
}
|
28 |
+
|
29 |
/**
|
30 |
* Action template
|
31 |
*/
|
32 |
public function action_template() {
|
33 |
+
|
34 |
$this->data = $_REQUEST;
|
35 |
$this->get_view()->render_html("events/index", $this->data);
|
36 |
}
|
37 |
+
|
38 |
/**
|
39 |
* Delete event data by ID
|
40 |
*/
|
41 |
public function action_delete() {
|
42 |
+
|
43 |
+
if ( current_user_can('edit_posts') ) {
|
44 |
+
|
45 |
+
$result = $this->get('events')->delete_event( filter_input(INPUT_POST, 'id', FILTER_VALIDATE_INT) );
|
46 |
+
|
47 |
+
if ($result === false) {
|
48 |
+
wp_send_json_error(array('status' => $result));
|
49 |
+
} else {
|
50 |
+
wp_send_json_success(array('status' => $result));
|
51 |
+
}
|
52 |
} else {
|
53 |
+
wp_die('Access denied');
|
54 |
}
|
55 |
}
|
56 |
+
|
57 |
/**
|
58 |
* Get single event data
|
59 |
*/
|
60 |
public function action_get_event_data() {
|
61 |
+
|
62 |
+
if ( current_user_can('edit_posts') ) {
|
63 |
+
|
64 |
+
$id = filter_input(INPUT_POST, 'id', FILTER_VALIDATE_INT);
|
65 |
+
$result = $this->get('events')->get_event_data(array('field' => 'id', 'id' => $id), 'event_start', false);
|
66 |
+
|
67 |
+
if (!empty($result)) {
|
68 |
+
wp_send_json_success($result[ 0 ]);
|
69 |
+
} else {
|
70 |
+
wp_send_json_error(array('status' => false));
|
71 |
+
}
|
72 |
} else {
|
73 |
+
wp_die('Access denied');
|
74 |
}
|
75 |
}
|
76 |
+
|
77 |
/**
|
78 |
* Get events by column id
|
79 |
*
|
82 |
* @return mixed
|
83 |
*/
|
84 |
public function get_all_event_by_post($post) {
|
85 |
+
|
86 |
// Show draft timeslots on preview
|
87 |
$show_public_only = ((get_post_status($post->ID) == 'draft') && is_preview()) ? false : true;
|
|
|
88 |
$result = $this->get('events')->get_event_data(array('field' => 'event_id', 'id' => $post->ID), 'event_start', $show_public_only);
|
89 |
+
|
90 |
return $result;
|
91 |
}
|
92 |
|
94 |
* Update Single Event data
|
95 |
*/
|
96 |
public function action_update_event_data() {
|
97 |
+
|
98 |
$request = $_REQUEST;
|
99 |
+
|
100 |
+
if ( current_user_can('edit_posts') ) {
|
101 |
+
|
102 |
+
$result = $this->get('events')->update_event_data($request[ 'data' ]);
|
103 |
+
|
104 |
+
if ($result === false) {
|
105 |
+
wp_send_json_error(array('status' => false));
|
106 |
+
} else {
|
107 |
+
wp_send_json_success(array('data' => $result));
|
108 |
+
}
|
109 |
} else {
|
110 |
+
wp_die('Access denied');
|
111 |
}
|
112 |
}
|
113 |
}
|
classes/controllers/class-controller-popup.php
CHANGED
@@ -25,11 +25,17 @@ class Controller_Popup extends Controller {
|
|
25 |
* Action template
|
26 |
*/
|
27 |
public function action_get_popup_html_content() {
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
|
25 |
* Action template
|
26 |
*/
|
27 |
public function action_get_popup_html_content() {
|
28 |
+
|
29 |
+
if ( current_user_can('edit_posts') ) {
|
30 |
+
|
31 |
+
$this->data['column'] = $this->get('column')->get_all_column();
|
32 |
+
$this->data['events'] = $this->get('events')->get_all_events();
|
33 |
+
$this->data['category'] = get_terms('mp-event_category', 'orderby=count&hide_empty=0');
|
34 |
+
$data["html"] = $this->get_view()->render_html("popup/index", $this->data, false);
|
35 |
+
$this->send_json(Model::get_instance()->get_arr($data, true));
|
36 |
+
} else {
|
37 |
+
wp_die('Access denied');
|
38 |
+
}
|
39 |
}
|
40 |
|
41 |
|
classes/controllers/class-controller-settings.php
CHANGED
@@ -28,20 +28,41 @@ class Controller_Settings extends Controller {
|
|
28 |
* Action template
|
29 |
*/
|
30 |
public function action_content() {
|
31 |
-
|
32 |
-
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
38 |
* Save settings
|
39 |
*/
|
40 |
public function action_save() {
|
41 |
-
$redirect = Settings::get_instance()->save_settings();
|
42 |
|
43 |
-
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
die();
|
46 |
}
|
47 |
|
28 |
* Action template
|
29 |
*/
|
30 |
public function action_content() {
|
31 |
+
|
32 |
+
if ( current_user_can('manage_options') ) {
|
33 |
|
34 |
+
$data = Settings::get_instance()->get_settings();
|
35 |
+
$theme_supports = $this->get('Settings')->is_theme_supports();
|
36 |
+
|
37 |
+
View::get_instance()->render_html('../templates/settings/general', array('settings' => $data, 'theme_supports' => $theme_supports));
|
38 |
+
} else {
|
39 |
+
wp_die('Access denied');
|
40 |
+
}
|
41 |
}
|
42 |
|
43 |
/**
|
44 |
* Save settings
|
45 |
*/
|
46 |
public function action_save() {
|
|
|
47 |
|
48 |
+
$redirect = false;
|
49 |
+
|
50 |
+
if ( current_user_can('manage_options') ) {
|
51 |
+
$redirect = Settings::get_instance()->save_settings();
|
52 |
+
} else {
|
53 |
+
wp_die('Access denied');
|
54 |
+
}
|
55 |
+
|
56 |
+
if ( $redirect ) {
|
57 |
+
wp_redirect(
|
58 |
+
add_query_arg(
|
59 |
+
array(
|
60 |
+
'page' => $_GET['page'],
|
61 |
+
'settings-updated' => 'true'
|
62 |
+
)
|
63 |
+
)
|
64 |
+
);
|
65 |
+
|
66 |
die();
|
67 |
}
|
68 |
|
classes/models/class-column.php
CHANGED
@@ -50,14 +50,15 @@ class Column extends Model {
|
|
50 |
* @param $column
|
51 |
*/
|
52 |
public function get_column_columns($column) {
|
|
|
53 |
global $post;
|
|
|
54 |
switch ($column) {
|
55 |
case 'mp-column_timeslots_number':
|
56 |
$metaData = $this->count_events($post);
|
57 |
echo empty($metaData) ? "—" : $metaData;
|
58 |
break;
|
59 |
}
|
60 |
-
|
61 |
}
|
62 |
|
63 |
/**
|
@@ -68,8 +69,19 @@ class Column extends Model {
|
|
68 |
* @return int
|
69 |
*/
|
70 |
public function count_events($post) {
|
|
|
71 |
$table_name = $this->get('events')->table_name;
|
72 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
return intval($count);
|
75 |
}
|
50 |
* @param $column
|
51 |
*/
|
52 |
public function get_column_columns($column) {
|
53 |
+
|
54 |
global $post;
|
55 |
+
|
56 |
switch ($column) {
|
57 |
case 'mp-column_timeslots_number':
|
58 |
$metaData = $this->count_events($post);
|
59 |
echo empty($metaData) ? "—" : $metaData;
|
60 |
break;
|
61 |
}
|
|
|
62 |
}
|
63 |
|
64 |
/**
|
69 |
* @return int
|
70 |
*/
|
71 |
public function count_events($post) {
|
72 |
+
|
73 |
$table_name = $this->get('events')->table_name;
|
74 |
+
$event_ids = $this->wpdb->get_results("SELECT `event_id` FROM {$table_name} WHERE `column_id` = {$post->ID}", ARRAY_A);
|
75 |
+
|
76 |
+
$count = 0;
|
77 |
+
if ( !empty( $event_ids ) ) {
|
78 |
+
foreach( $event_ids as $event ) {
|
79 |
+
$event_id = $event['event_id'];
|
80 |
+
if ( get_post_type( $event_id ) == 'mp-event' ) {
|
81 |
+
$count++;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
}
|
85 |
|
86 |
return intval($count);
|
87 |
}
|
classes/models/class-export.php
CHANGED
@@ -27,13 +27,17 @@ class Export extends Model {
|
|
27 |
* Export file
|
28 |
*/
|
29 |
public function export() {
|
|
|
30 |
global $wpdb, $post;
|
31 |
|
32 |
-
if (!defined('ABSPATH')) exit;
|
|
|
|
|
33 |
|
34 |
-
if (!function_exists('export_wp')) {
|
35 |
include_once(ABSPATH . 'wp-admin/includes/export.php');
|
36 |
}
|
|
|
37 |
$args = array('content' => $this->post_types, 'author' => false, 'category' => false,
|
38 |
'start_date' => false, 'end_date' => false, 'status' => false);
|
39 |
|
27 |
* Export file
|
28 |
*/
|
29 |
public function export() {
|
30 |
+
|
31 |
global $wpdb, $post;
|
32 |
|
33 |
+
if ( !defined('ABSPATH') ) exit;
|
34 |
+
|
35 |
+
if ( !current_user_can('export') ) exit;
|
36 |
|
37 |
+
if ( !function_exists('export_wp') ) {
|
38 |
include_once(ABSPATH . 'wp-admin/includes/export.php');
|
39 |
}
|
40 |
+
|
41 |
$args = array('content' => $this->post_types, 'author' => false, 'category' => false,
|
42 |
'start_date' => false, 'end_date' => false, 'status' => false);
|
43 |
|
languages/mp-timetable.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Timetable and Event Schedule Plugin\n"
|
5 |
-
"POT-Creation-Date: 2020-
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: MotoPress <info@getmotopress.com>\n"
|
@@ -36,177 +36,177 @@ msgstr ""
|
|
36 |
msgid "Import / Export Timetable Plugin Data"
|
37 |
msgstr ""
|
38 |
|
39 |
-
#: admin/import/import.php:
|
40 |
msgid "Import"
|
41 |
msgstr ""
|
42 |
|
43 |
-
#: classes/blocks/class-timetable-block.php:
|
44 |
-
#: classes/class-shortcode.php:
|
45 |
-
#: templates-functions/action-shortcode-functions.php:
|
46 |
-
#: templates-functions/action-shortcode-functions.php:
|
47 |
-
#: templates-functions/action-shortcode-functions.php:
|
48 |
msgid "All Events"
|
49 |
msgstr ""
|
50 |
|
51 |
-
#: classes/class-core.php:
|
52 |
-
#: classes/class-core.php:
|
53 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
54 |
msgid "Event categories"
|
55 |
msgstr ""
|
56 |
|
57 |
-
#: classes/class-core.php:
|
58 |
msgid "Event category"
|
59 |
msgstr ""
|
60 |
|
61 |
-
#: classes/class-core.php:
|
62 |
msgid "Add New Event category"
|
63 |
msgstr ""
|
64 |
|
65 |
-
#: classes/class-core.php:
|
66 |
msgid "Edit Event category"
|
67 |
msgstr ""
|
68 |
|
69 |
-
#: classes/class-core.php:
|
70 |
msgid "New Event category"
|
71 |
msgstr ""
|
72 |
|
73 |
-
#: classes/class-core.php:
|
74 |
msgid "All Event categories"
|
75 |
msgstr ""
|
76 |
|
77 |
-
#: classes/class-core.php:
|
78 |
msgid "View Event category"
|
79 |
msgstr ""
|
80 |
|
81 |
-
#: classes/class-core.php:
|
82 |
msgid "Search Event category"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: classes/class-core.php:
|
86 |
msgid "No Event categories found"
|
87 |
msgstr ""
|
88 |
|
89 |
-
#: classes/class-core.php:
|
90 |
msgid "No Event categories found in Trash"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: classes/class-core.php:
|
94 |
-
#: classes/class-core.php:
|
95 |
msgid "Event tags"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: classes/class-core.php:
|
99 |
msgid "Event tag"
|
100 |
msgstr ""
|
101 |
|
102 |
-
#: classes/class-core.php:
|
103 |
msgid "Add New Event tag"
|
104 |
msgstr ""
|
105 |
|
106 |
-
#: classes/class-core.php:
|
107 |
msgid "Edit Event tag"
|
108 |
msgstr ""
|
109 |
|
110 |
-
#: classes/class-core.php:
|
111 |
msgid "New Event tag"
|
112 |
msgstr ""
|
113 |
|
114 |
-
#: classes/class-core.php:
|
115 |
msgid "All Event tags"
|
116 |
msgstr ""
|
117 |
|
118 |
-
#: classes/class-core.php:
|
119 |
msgid "View Event tag"
|
120 |
msgstr ""
|
121 |
|
122 |
-
#: classes/class-core.php:
|
123 |
msgid "Search Event tag"
|
124 |
msgstr ""
|
125 |
|
126 |
-
#: classes/class-core.php:
|
127 |
msgid "No Event tags found"
|
128 |
msgstr ""
|
129 |
|
130 |
-
#: classes/class-core.php:
|
131 |
msgid "No Event tags found in Trash"
|
132 |
msgstr ""
|
133 |
|
134 |
-
#: classes/class-core.php:
|
135 |
-
#: classes/class-hooks.php:182 classes/class-shortcode.php:
|
136 |
msgid "Events"
|
137 |
msgstr ""
|
138 |
|
139 |
-
#: classes/class-core.php:
|
140 |
msgid "Event"
|
141 |
msgstr ""
|
142 |
|
143 |
-
#: classes/class-core.php:
|
144 |
msgid "Add New Event"
|
145 |
msgstr ""
|
146 |
|
147 |
-
#: classes/class-core.php:
|
148 |
msgid "Edit Event"
|
149 |
msgstr ""
|
150 |
|
151 |
-
#: classes/class-core.php:
|
152 |
msgid "New Event"
|
153 |
msgstr ""
|
154 |
|
155 |
-
#: classes/class-core.php:
|
156 |
msgid "View Event"
|
157 |
msgstr ""
|
158 |
|
159 |
-
#: classes/class-core.php:
|
160 |
msgid "Search Event"
|
161 |
msgstr ""
|
162 |
|
163 |
-
#: classes/class-core.php:
|
164 |
msgid "No Events found"
|
165 |
msgstr ""
|
166 |
|
167 |
-
#: classes/class-core.php:
|
168 |
msgid "No Events found in Trash"
|
169 |
msgstr ""
|
170 |
|
171 |
-
#: classes/class-core.php:
|
172 |
-
#: classes/class-hooks.php:190 media/js/blocks/src/timetable/inspector.js:
|
173 |
msgid "Columns"
|
174 |
msgstr ""
|
175 |
|
176 |
-
#: classes/class-core.php:
|
177 |
#: templates/events/event-data.php:4
|
178 |
msgid "Column"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: classes/class-core.php:
|
182 |
msgid "Add New Column"
|
183 |
msgstr ""
|
184 |
|
185 |
-
#: classes/class-core.php:
|
186 |
msgid "Edit Column"
|
187 |
msgstr ""
|
188 |
|
189 |
-
#: classes/class-core.php:
|
190 |
msgid "New Column"
|
191 |
msgstr ""
|
192 |
|
193 |
-
#: classes/class-core.php:
|
194 |
msgid "All Columns"
|
195 |
msgstr ""
|
196 |
|
197 |
-
#: classes/class-core.php:
|
198 |
msgid "View Column"
|
199 |
msgstr ""
|
200 |
|
201 |
-
#: classes/class-core.php:
|
202 |
msgid "Search Column"
|
203 |
msgstr ""
|
204 |
|
205 |
-
#: classes/class-core.php:
|
206 |
msgid "No Columns found"
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: classes/class-core.php:
|
210 |
msgid "No Columns found in Trash"
|
211 |
msgstr ""
|
212 |
|
@@ -215,7 +215,7 @@ msgid "Timetable Sidebar"
|
|
215 |
msgstr ""
|
216 |
|
217 |
#: classes/class-hooks.php:70 classes/class-hooks.php:178
|
218 |
-
#: classes/class-shortcode.php:
|
219 |
msgid "Timetable"
|
220 |
msgstr ""
|
221 |
|
@@ -240,7 +240,7 @@ msgid "Event Tags"
|
|
240 |
msgstr ""
|
241 |
|
242 |
#: classes/class-hooks.php:206 classes/modules/class-post.php:41
|
243 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
244 |
msgid "Settings"
|
245 |
msgstr ""
|
246 |
|
@@ -248,14 +248,18 @@ msgstr ""
|
|
248 |
msgid "Export / Import"
|
249 |
msgstr ""
|
250 |
|
251 |
-
#: classes/class-hooks.php:214
|
252 |
-
msgid "Help"
|
253 |
msgstr ""
|
254 |
|
255 |
#: classes/class-hooks.php:278
|
256 |
msgid "Quick Start Guide"
|
257 |
msgstr ""
|
258 |
|
|
|
|
|
|
|
|
|
259 |
#: classes/class-hooks.php:280
|
260 |
msgid "Leave a Review"
|
261 |
msgstr ""
|
@@ -280,155 +284,172 @@ msgstr ""
|
|
280 |
msgid "Event Tag base"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: classes/class-shortcode.php:
|
284 |
msgid "Hour measure"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: classes/class-shortcode.php:
|
288 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
289 |
msgid "Hour (1h)"
|
290 |
msgstr ""
|
291 |
|
292 |
-
#: classes/class-shortcode.php:
|
293 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
294 |
msgid "Half hour (30min)"
|
295 |
msgstr ""
|
296 |
|
297 |
-
#: classes/class-shortcode.php:
|
298 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
299 |
msgid "Quarter hour (15min)"
|
300 |
msgstr ""
|
301 |
|
302 |
-
#: classes/class-shortcode.php:
|
303 |
msgid "Filter style"
|
304 |
msgstr ""
|
305 |
|
306 |
-
#: classes/class-shortcode.php:
|
307 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
308 |
msgid "Dropdown list"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: classes/class-shortcode.php:
|
312 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
313 |
msgid "Tabs"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: classes/class-shortcode.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
317 |
msgid "Filter label"
|
318 |
msgstr ""
|
319 |
|
320 |
-
#: classes/class-shortcode.php:
|
321 |
msgid "Hide 'All Events' view"
|
322 |
msgstr ""
|
323 |
|
324 |
-
#: classes/class-shortcode.php:
|
325 |
-
#: classes/class-shortcode.php:
|
326 |
-
#: classes/class-shortcode.php:
|
327 |
-
#: classes/class-shortcode.php:
|
328 |
-
#: classes/class-shortcode.php:
|
329 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
330 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
331 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
332 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
333 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
334 |
-
#: templates/events/metabox-event-options.php:45 templates/popup/index.php:
|
335 |
-
#: templates/popup/index.php:
|
336 |
-
#: templates/popup/index.php:
|
337 |
#: templates/widgets/gallery-list.php:60
|
338 |
msgid "No"
|
339 |
msgstr ""
|
340 |
|
341 |
-
#: classes/class-shortcode.php:
|
342 |
-
#: classes/class-shortcode.php:
|
343 |
-
#: classes/class-shortcode.php:
|
344 |
-
#: classes/class-shortcode.php:
|
345 |
-
#: classes/class-shortcode.php:
|
346 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
347 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
348 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
349 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
350 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
351 |
-
#: templates/events/metabox-event-options.php:46 templates/popup/index.php:
|
352 |
-
#: templates/popup/index.php:
|
353 |
-
#: templates/popup/index.php:
|
354 |
#: templates/widgets/gallery-list.php:62
|
355 |
msgid "Yes"
|
356 |
msgstr ""
|
357 |
|
358 |
-
#: classes/class-shortcode.php:
|
359 |
msgid "Hide first (hours) column"
|
360 |
msgstr ""
|
361 |
|
362 |
-
#: classes/class-shortcode.php:
|
363 |
msgid "Hide empty rows"
|
364 |
msgstr ""
|
365 |
|
366 |
-
#: classes/class-shortcode.php:
|
367 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
368 |
-
#: templates/widgets/gallery-list.php:3
|
369 |
-
msgid "Title"
|
370 |
-
msgstr ""
|
371 |
-
|
372 |
-
#: classes/class-shortcode.php:303
|
373 |
-
#: media/js/blocks/src/timetable/inspector.js:117 templates/popup/index.php:41
|
374 |
msgid "Time"
|
375 |
msgstr ""
|
376 |
|
377 |
-
#: classes/class-shortcode.php:
|
378 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
379 |
msgid "Subtitle"
|
380 |
msgstr ""
|
381 |
|
382 |
-
#: classes/class-shortcode.php:
|
383 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
384 |
#: templates/events/event-data.php:7 templates/popup/index.php:43
|
385 |
msgid "Description"
|
386 |
msgstr ""
|
387 |
|
388 |
-
#: classes/class-shortcode.php:
|
389 |
msgid "User"
|
390 |
msgstr ""
|
391 |
|
392 |
-
#: classes/class-shortcode.php:
|
393 |
msgid "Disable event URL"
|
394 |
msgstr ""
|
395 |
|
396 |
-
#: classes/class-shortcode.php:
|
397 |
msgid "Text align"
|
398 |
msgstr ""
|
399 |
|
400 |
-
#: classes/class-shortcode.php:
|
401 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
402 |
msgid "center"
|
403 |
msgstr ""
|
404 |
|
405 |
-
#: classes/class-shortcode.php:
|
406 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
407 |
msgid "left"
|
408 |
msgstr ""
|
409 |
|
410 |
-
#: classes/class-shortcode.php:
|
411 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
412 |
msgid "right"
|
413 |
msgstr ""
|
414 |
|
415 |
-
#: classes/class-shortcode.php:
|
416 |
msgid "Id"
|
417 |
msgstr ""
|
418 |
|
419 |
-
#: classes/class-shortcode.php:
|
420 |
msgid "Row height (in px)"
|
421 |
msgstr ""
|
422 |
|
423 |
-
#: classes/class-shortcode.php:
|
424 |
msgid "Base Font Size"
|
425 |
msgstr ""
|
426 |
|
427 |
-
#: classes/class-shortcode.php:
|
428 |
msgid "Responsive"
|
429 |
msgstr ""
|
430 |
|
431 |
-
#: classes/controllers/class-controller-settings.php:
|
432 |
msgid "Settings saved."
|
433 |
msgstr ""
|
434 |
|
@@ -608,112 +629,108 @@ msgstr ""
|
|
608 |
msgid "Timetable Events"
|
609 |
msgstr ""
|
610 |
|
611 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
612 |
#: templates/popup/index.php:23 templates/popup/index.php:34
|
613 |
msgid "In order to display multiple points hold ctrl/cmd button."
|
614 |
msgstr ""
|
615 |
|
616 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
617 |
msgid "Specific events"
|
618 |
msgstr ""
|
619 |
|
620 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
621 |
msgid "Event Head"
|
622 |
msgstr ""
|
623 |
|
624 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
625 |
msgid "Block height in pixels"
|
626 |
msgstr ""
|
627 |
|
628 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
629 |
msgid "Base font size"
|
630 |
msgstr ""
|
631 |
|
632 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
633 |
msgid "Base font size for the table. Example 12px, 2em, 80%."
|
634 |
msgstr ""
|
635 |
|
636 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
637 |
msgid "Time frame for event"
|
638 |
msgstr ""
|
639 |
|
640 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
641 |
msgid "Filter events style"
|
642 |
msgstr ""
|
643 |
|
644 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
645 |
msgid "Filter title to display all events"
|
646 |
msgstr ""
|
647 |
|
648 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
649 |
msgid "Hide 'All Events' option"
|
650 |
msgstr ""
|
651 |
|
652 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
653 |
msgid "Hide column with hours"
|
654 |
msgstr ""
|
655 |
|
656 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
657 |
msgid "Do not display empty rows"
|
658 |
msgstr ""
|
659 |
|
660 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
661 |
msgid "Merge cells with common events"
|
662 |
msgstr ""
|
663 |
|
664 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
665 |
#: templates/widgets/gallery-list.php:56
|
666 |
msgid "Disable event link"
|
667 |
msgstr ""
|
668 |
|
669 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
670 |
msgid "Horizontal align"
|
671 |
msgstr ""
|
672 |
|
673 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
674 |
msgid "Vertical align"
|
675 |
msgstr ""
|
676 |
|
677 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
678 |
-
msgid "Default"
|
679 |
-
msgstr ""
|
680 |
-
|
681 |
-
#: media/js/blocks/src/timetable/inspector.js:237 templates/popup/index.php:147
|
682 |
msgid "top"
|
683 |
msgstr ""
|
684 |
|
685 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
686 |
msgid "middle"
|
687 |
msgstr ""
|
688 |
|
689 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
690 |
msgid "bottom"
|
691 |
msgstr ""
|
692 |
|
693 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
694 |
msgid "Unique ID"
|
695 |
msgstr ""
|
696 |
|
697 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
698 |
msgid ""
|
699 |
"If you use more than one table on a page specify the unique ID for a "
|
700 |
"timetable. It is usually all lowercase and contains only letters, numbers, "
|
701 |
"and hyphens."
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
705 |
msgid "CSS class"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
709 |
msgid "Mobile behavior"
|
710 |
msgstr ""
|
711 |
|
712 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
713 |
msgid "Table"
|
714 |
msgstr ""
|
715 |
|
716 |
-
#: media/js/blocks/src/timetable/inspector.js:
|
717 |
msgid "List"
|
718 |
msgstr ""
|
719 |
|
@@ -788,45 +805,49 @@ msgid "Delete"
|
|
788 |
msgstr ""
|
789 |
|
790 |
#: templates/events/metabox-event-data.php:10
|
|
|
|
|
|
|
|
|
791 |
msgid "Column:"
|
792 |
msgstr ""
|
793 |
|
794 |
-
#: templates/events/metabox-event-data.php:
|
795 |
#, php-format
|
796 |
msgid "Select column or <a target=\"_blank\" href=\"%s\">Add New</a>."
|
797 |
msgstr ""
|
798 |
|
799 |
-
#: templates/events/metabox-event-data.php:
|
800 |
#, php-format
|
801 |
msgid "No columns found. <a href=\"%s\">Create at least one column first.</a>"
|
802 |
msgstr ""
|
803 |
|
804 |
-
#: templates/events/metabox-event-data.php:
|
805 |
msgid "Start Time:"
|
806 |
msgstr ""
|
807 |
|
808 |
-
#: templates/events/metabox-event-data.php:
|
809 |
-
#: templates/events/metabox-event-data.php:
|
810 |
msgid "hh:mm"
|
811 |
msgstr ""
|
812 |
|
813 |
-
#: templates/events/metabox-event-data.php:
|
814 |
msgid "End Time:"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: templates/events/metabox-event-data.php:
|
818 |
msgid "Description:"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: templates/events/metabox-event-data.php:
|
822 |
msgid "Event Head:"
|
823 |
msgstr ""
|
824 |
|
825 |
-
#: templates/events/metabox-event-data.php:
|
826 |
msgid "none"
|
827 |
msgstr ""
|
828 |
|
829 |
-
#: templates/events/metabox-event-data.php:
|
830 |
msgid "Add New"
|
831 |
msgstr ""
|
832 |
|
@@ -890,17 +911,17 @@ msgstr ""
|
|
890 |
msgid "None"
|
891 |
msgstr ""
|
892 |
|
893 |
-
#: templates/popup/index.php:
|
894 |
msgid "default"
|
895 |
msgstr ""
|
896 |
|
897 |
-
#: templates/popup/index.php:
|
898 |
msgid ""
|
899 |
"Tick \"List\" to display events in a list view on mobile devices. Tick "
|
900 |
"\"Table\" to display events in a table."
|
901 |
msgstr ""
|
902 |
|
903 |
-
#: templates/popup/index.php:
|
904 |
msgid "Add Timetable"
|
905 |
msgstr ""
|
906 |
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Timetable and Event Schedule Plugin\n"
|
5 |
+
"POT-Creation-Date: 2020-04-21 18:40+0300\n"
|
6 |
"PO-Revision-Date: \n"
|
7 |
"Last-Translator: \n"
|
8 |
"Language-Team: MotoPress <info@getmotopress.com>\n"
|
36 |
msgid "Import / Export Timetable Plugin Data"
|
37 |
msgstr ""
|
38 |
|
39 |
+
#: admin/import/import.php:4
|
40 |
msgid "Import"
|
41 |
msgstr ""
|
42 |
|
43 |
+
#: classes/blocks/class-timetable-block.php:79 classes/class-core.php:442
|
44 |
+
#: classes/class-shortcode.php:70 classes/class-shortcode.php:285
|
45 |
+
#: templates-functions/action-shortcode-functions.php:57
|
46 |
+
#: templates-functions/action-shortcode-functions.php:71
|
47 |
+
#: templates-functions/action-shortcode-functions.php:72
|
48 |
msgid "All Events"
|
49 |
msgstr ""
|
50 |
|
51 |
+
#: classes/class-core.php:331 classes/class-core.php:342
|
52 |
+
#: classes/class-core.php:346 classes/class-shortcode.php:264
|
53 |
+
#: media/js/blocks/src/timetable/inspector.js:105
|
54 |
msgid "Event categories"
|
55 |
msgstr ""
|
56 |
|
57 |
+
#: classes/class-core.php:332
|
58 |
msgid "Event category"
|
59 |
msgstr ""
|
60 |
|
61 |
+
#: classes/class-core.php:333 classes/class-core.php:334
|
62 |
msgid "Add New Event category"
|
63 |
msgstr ""
|
64 |
|
65 |
+
#: classes/class-core.php:335
|
66 |
msgid "Edit Event category"
|
67 |
msgstr ""
|
68 |
|
69 |
+
#: classes/class-core.php:336
|
70 |
msgid "New Event category"
|
71 |
msgstr ""
|
72 |
|
73 |
+
#: classes/class-core.php:337
|
74 |
msgid "All Event categories"
|
75 |
msgstr ""
|
76 |
|
77 |
+
#: classes/class-core.php:338
|
78 |
msgid "View Event category"
|
79 |
msgstr ""
|
80 |
|
81 |
+
#: classes/class-core.php:339
|
82 |
msgid "Search Event category"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: classes/class-core.php:340
|
86 |
msgid "No Event categories found"
|
87 |
msgstr ""
|
88 |
|
89 |
+
#: classes/class-core.php:341
|
90 |
msgid "No Event categories found in Trash"
|
91 |
msgstr ""
|
92 |
|
93 |
+
#: classes/class-core.php:375 classes/class-core.php:386
|
94 |
+
#: classes/class-core.php:390
|
95 |
msgid "Event tags"
|
96 |
msgstr ""
|
97 |
|
98 |
+
#: classes/class-core.php:376
|
99 |
msgid "Event tag"
|
100 |
msgstr ""
|
101 |
|
102 |
+
#: classes/class-core.php:377 classes/class-core.php:378
|
103 |
msgid "Add New Event tag"
|
104 |
msgstr ""
|
105 |
|
106 |
+
#: classes/class-core.php:379
|
107 |
msgid "Edit Event tag"
|
108 |
msgstr ""
|
109 |
|
110 |
+
#: classes/class-core.php:380
|
111 |
msgid "New Event tag"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: classes/class-core.php:381
|
115 |
msgid "All Event tags"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: classes/class-core.php:382
|
119 |
msgid "View Event tag"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: classes/class-core.php:383
|
123 |
msgid "Search Event tag"
|
124 |
msgstr ""
|
125 |
|
126 |
+
#: classes/class-core.php:384
|
127 |
msgid "No Event tags found"
|
128 |
msgstr ""
|
129 |
|
130 |
+
#: classes/class-core.php:385
|
131 |
msgid "No Event tags found in Trash"
|
132 |
msgstr ""
|
133 |
|
134 |
+
#: classes/class-core.php:436 classes/class-core.php:447
|
135 |
+
#: classes/class-hooks.php:182 classes/class-shortcode.php:259
|
136 |
msgid "Events"
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: classes/class-core.php:437
|
140 |
msgid "Event"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: classes/class-core.php:438 classes/class-core.php:439
|
144 |
msgid "Add New Event"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: classes/class-core.php:440
|
148 |
msgid "Edit Event"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: classes/class-core.php:441
|
152 |
msgid "New Event"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: classes/class-core.php:443
|
156 |
msgid "View Event"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: classes/class-core.php:444
|
160 |
msgid "Search Event"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: classes/class-core.php:445
|
164 |
msgid "No Events found"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: classes/class-core.php:446
|
168 |
msgid "No Events found in Trash"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: classes/class-core.php:475 classes/class-core.php:486
|
172 |
+
#: classes/class-hooks.php:190 media/js/blocks/src/timetable/inspector.js:88
|
173 |
msgid "Columns"
|
174 |
msgstr ""
|
175 |
|
176 |
+
#: classes/class-core.php:476 classes/class-shortcode.php:254
|
177 |
#: templates/events/event-data.php:4
|
178 |
msgid "Column"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: classes/class-core.php:477 classes/class-core.php:478
|
182 |
msgid "Add New Column"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: classes/class-core.php:479
|
186 |
msgid "Edit Column"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: classes/class-core.php:480
|
190 |
msgid "New Column"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: classes/class-core.php:481
|
194 |
msgid "All Columns"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: classes/class-core.php:482
|
198 |
msgid "View Column"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: classes/class-core.php:483
|
202 |
msgid "Search Column"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: classes/class-core.php:484
|
206 |
msgid "No Columns found"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: classes/class-core.php:485
|
210 |
msgid "No Columns found in Trash"
|
211 |
msgstr ""
|
212 |
|
215 |
msgstr ""
|
216 |
|
217 |
#: classes/class-hooks.php:70 classes/class-hooks.php:178
|
218 |
+
#: classes/class-shortcode.php:364 media/js/blocks/src/timetable/index.js:12
|
219 |
msgid "Timetable"
|
220 |
msgstr ""
|
221 |
|
240 |
msgstr ""
|
241 |
|
242 |
#: classes/class-hooks.php:206 classes/modules/class-post.php:41
|
243 |
+
#: media/js/blocks/src/timetable/inspector.js:83
|
244 |
msgid "Settings"
|
245 |
msgstr ""
|
246 |
|
248 |
msgid "Export / Import"
|
249 |
msgstr ""
|
250 |
|
251 |
+
#: classes/class-hooks.php:214
|
252 |
+
msgid "Help & Shortcode"
|
253 |
msgstr ""
|
254 |
|
255 |
#: classes/class-hooks.php:278
|
256 |
msgid "Quick Start Guide"
|
257 |
msgstr ""
|
258 |
|
259 |
+
#: classes/class-hooks.php:279
|
260 |
+
msgid "Help"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
#: classes/class-hooks.php:280
|
264 |
msgid "Leave a Review"
|
265 |
msgstr ""
|
284 |
msgid "Event Tag base"
|
285 |
msgstr ""
|
286 |
|
287 |
+
#: classes/class-shortcode.php:269
|
288 |
msgid "Hour measure"
|
289 |
msgstr ""
|
290 |
|
291 |
+
#: classes/class-shortcode.php:270
|
292 |
+
#: media/js/blocks/src/timetable/inspector.js:158 templates/popup/index.php:66
|
293 |
msgid "Hour (1h)"
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: classes/class-shortcode.php:270
|
297 |
+
#: media/js/blocks/src/timetable/inspector.js:159 templates/popup/index.php:67
|
298 |
msgid "Half hour (30min)"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: classes/class-shortcode.php:270
|
302 |
+
#: media/js/blocks/src/timetable/inspector.js:160 templates/popup/index.php:68
|
303 |
msgid "Quarter hour (15min)"
|
304 |
msgstr ""
|
305 |
|
306 |
+
#: classes/class-shortcode.php:274
|
307 |
msgid "Filter style"
|
308 |
msgstr ""
|
309 |
|
310 |
+
#: classes/class-shortcode.php:275
|
311 |
+
#: media/js/blocks/src/timetable/inspector.js:168
|
312 |
msgid "Dropdown list"
|
313 |
msgstr ""
|
314 |
|
315 |
+
#: classes/class-shortcode.php:275
|
316 |
+
#: media/js/blocks/src/timetable/inspector.js:169 templates/popup/index.php:77
|
317 |
msgid "Tabs"
|
318 |
msgstr ""
|
319 |
|
320 |
+
#: classes/class-shortcode.php:279
|
321 |
+
#: media/js/blocks/src/timetable/inspector.js:173 templates/popup/index.php:83
|
322 |
+
msgid "Order of items in filter"
|
323 |
+
msgstr ""
|
324 |
+
|
325 |
+
#: classes/class-shortcode.php:280
|
326 |
+
#: media/js/blocks/src/timetable/inspector.js:177
|
327 |
+
#: media/js/blocks/src/timetable/inspector.js:247 templates/popup/index.php:86
|
328 |
+
msgid "Default"
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: classes/class-shortcode.php:280
|
332 |
+
#: media/js/blocks/src/timetable/inspector.js:178 templates/popup/index.php:87
|
333 |
+
msgid "Menu Order"
|
334 |
+
msgstr ""
|
335 |
+
|
336 |
+
#: classes/class-shortcode.php:280 classes/class-shortcode.php:305
|
337 |
+
#: media/js/blocks/src/timetable/inspector.js:111
|
338 |
+
#: media/js/blocks/src/timetable/inspector.js:179 templates/popup/index.php:40
|
339 |
+
#: templates/popup/index.php:88 templates/widgets/gallery-list.php:3
|
340 |
+
msgid "Title"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: classes/class-shortcode.php:284
|
344 |
msgid "Filter label"
|
345 |
msgstr ""
|
346 |
|
347 |
+
#: classes/class-shortcode.php:289
|
348 |
msgid "Hide 'All Events' view"
|
349 |
msgstr ""
|
350 |
|
351 |
+
#: classes/class-shortcode.php:290 classes/class-shortcode.php:295
|
352 |
+
#: classes/class-shortcode.php:300 classes/class-shortcode.php:307
|
353 |
+
#: classes/class-shortcode.php:313 classes/class-shortcode.php:319
|
354 |
+
#: classes/class-shortcode.php:325 classes/class-shortcode.php:331
|
355 |
+
#: classes/class-shortcode.php:336 classes/class-shortcode.php:360
|
356 |
+
#: media/js/blocks/src/timetable/inspector.js:192
|
357 |
+
#: media/js/blocks/src/timetable/inspector.js:201
|
358 |
+
#: media/js/blocks/src/timetable/inspector.js:210
|
359 |
+
#: media/js/blocks/src/timetable/inspector.js:219
|
360 |
+
#: media/js/blocks/src/timetable/inspector.js:228
|
361 |
+
#: templates/events/metabox-event-options.php:45 templates/popup/index.php:103
|
362 |
+
#: templates/popup/index.php:112 templates/popup/index.php:122
|
363 |
+
#: templates/popup/index.php:130 templates/popup/index.php:139
|
364 |
#: templates/widgets/gallery-list.php:60
|
365 |
msgid "No"
|
366 |
msgstr ""
|
367 |
|
368 |
+
#: classes/class-shortcode.php:290 classes/class-shortcode.php:295
|
369 |
+
#: classes/class-shortcode.php:300 classes/class-shortcode.php:307
|
370 |
+
#: classes/class-shortcode.php:313 classes/class-shortcode.php:319
|
371 |
+
#: classes/class-shortcode.php:325 classes/class-shortcode.php:331
|
372 |
+
#: classes/class-shortcode.php:336 classes/class-shortcode.php:360
|
373 |
+
#: media/js/blocks/src/timetable/inspector.js:193
|
374 |
+
#: media/js/blocks/src/timetable/inspector.js:202
|
375 |
+
#: media/js/blocks/src/timetable/inspector.js:211
|
376 |
+
#: media/js/blocks/src/timetable/inspector.js:220
|
377 |
+
#: media/js/blocks/src/timetable/inspector.js:229
|
378 |
+
#: templates/events/metabox-event-options.php:46 templates/popup/index.php:104
|
379 |
+
#: templates/popup/index.php:113 templates/popup/index.php:121
|
380 |
+
#: templates/popup/index.php:131 templates/popup/index.php:140
|
381 |
#: templates/widgets/gallery-list.php:62
|
382 |
msgid "Yes"
|
383 |
msgstr ""
|
384 |
|
385 |
+
#: classes/class-shortcode.php:294
|
386 |
msgid "Hide first (hours) column"
|
387 |
msgstr ""
|
388 |
|
389 |
+
#: classes/class-shortcode.php:299
|
390 |
msgid "Hide empty rows"
|
391 |
msgstr ""
|
392 |
|
393 |
+
#: classes/class-shortcode.php:311
|
394 |
+
#: media/js/blocks/src/timetable/inspector.js:118 templates/popup/index.php:41
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
msgid "Time"
|
396 |
msgstr ""
|
397 |
|
398 |
+
#: classes/class-shortcode.php:317
|
399 |
+
#: media/js/blocks/src/timetable/inspector.js:123 templates/popup/index.php:42
|
400 |
msgid "Subtitle"
|
401 |
msgstr ""
|
402 |
|
403 |
+
#: classes/class-shortcode.php:323
|
404 |
+
#: media/js/blocks/src/timetable/inspector.js:128
|
405 |
#: templates/events/event-data.php:7 templates/popup/index.php:43
|
406 |
msgid "Description"
|
407 |
msgstr ""
|
408 |
|
409 |
+
#: classes/class-shortcode.php:329
|
410 |
msgid "User"
|
411 |
msgstr ""
|
412 |
|
413 |
+
#: classes/class-shortcode.php:335
|
414 |
msgid "Disable event URL"
|
415 |
msgstr ""
|
416 |
|
417 |
+
#: classes/class-shortcode.php:340
|
418 |
msgid "Text align"
|
419 |
msgstr ""
|
420 |
|
421 |
+
#: classes/class-shortcode.php:341
|
422 |
+
#: media/js/blocks/src/timetable/inspector.js:237 templates/popup/index.php:147
|
423 |
msgid "center"
|
424 |
msgstr ""
|
425 |
|
426 |
+
#: classes/class-shortcode.php:341
|
427 |
+
#: media/js/blocks/src/timetable/inspector.js:238 templates/popup/index.php:148
|
428 |
msgid "left"
|
429 |
msgstr ""
|
430 |
|
431 |
+
#: classes/class-shortcode.php:341
|
432 |
+
#: media/js/blocks/src/timetable/inspector.js:239 templates/popup/index.php:149
|
433 |
msgid "right"
|
434 |
msgstr ""
|
435 |
|
436 |
+
#: classes/class-shortcode.php:345
|
437 |
msgid "Id"
|
438 |
msgstr ""
|
439 |
|
440 |
+
#: classes/class-shortcode.php:349
|
441 |
msgid "Row height (in px)"
|
442 |
msgstr ""
|
443 |
|
444 |
+
#: classes/class-shortcode.php:354
|
445 |
msgid "Base Font Size"
|
446 |
msgstr ""
|
447 |
|
448 |
+
#: classes/class-shortcode.php:359
|
449 |
msgid "Responsive"
|
450 |
msgstr ""
|
451 |
|
452 |
+
#: classes/controllers/class-controller-settings.php:74
|
453 |
msgid "Settings saved."
|
454 |
msgstr ""
|
455 |
|
629 |
msgid "Timetable Events"
|
630 |
msgstr ""
|
631 |
|
632 |
+
#: media/js/blocks/src/timetable/inspector.js:89 templates/popup/index.php:12
|
633 |
#: templates/popup/index.php:23 templates/popup/index.php:34
|
634 |
msgid "In order to display multiple points hold ctrl/cmd button."
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: media/js/blocks/src/timetable/inspector.js:97
|
638 |
msgid "Specific events"
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: media/js/blocks/src/timetable/inspector.js:133 templates/popup/index.php:44
|
642 |
msgid "Event Head"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: media/js/blocks/src/timetable/inspector.js:138 templates/popup/index.php:49
|
646 |
msgid "Block height in pixels"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: media/js/blocks/src/timetable/inspector.js:148 templates/popup/index.php:56
|
650 |
msgid "Base font size"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: media/js/blocks/src/timetable/inspector.js:149 templates/popup/index.php:59
|
654 |
msgid "Base font size for the table. Example 12px, 2em, 80%."
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: media/js/blocks/src/timetable/inspector.js:154 templates/popup/index.php:63
|
658 |
msgid "Time frame for event"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: media/js/blocks/src/timetable/inspector.js:164 templates/popup/index.php:73
|
662 |
msgid "Filter events style"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: media/js/blocks/src/timetable/inspector.js:183 templates/popup/index.php:93
|
666 |
msgid "Filter title to display all events"
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: media/js/blocks/src/timetable/inspector.js:188 templates/popup/index.php:99
|
670 |
msgid "Hide 'All Events' option"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: media/js/blocks/src/timetable/inspector.js:197 templates/popup/index.php:109
|
674 |
msgid "Hide column with hours"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: media/js/blocks/src/timetable/inspector.js:206 templates/popup/index.php:118
|
678 |
msgid "Do not display empty rows"
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: media/js/blocks/src/timetable/inspector.js:215 templates/popup/index.php:127
|
682 |
msgid "Merge cells with common events"
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: media/js/blocks/src/timetable/inspector.js:224 templates/popup/index.php:136
|
686 |
#: templates/widgets/gallery-list.php:56
|
687 |
msgid "Disable event link"
|
688 |
msgstr ""
|
689 |
|
690 |
+
#: media/js/blocks/src/timetable/inspector.js:233 templates/popup/index.php:145
|
691 |
msgid "Horizontal align"
|
692 |
msgstr ""
|
693 |
|
694 |
+
#: media/js/blocks/src/timetable/inspector.js:243 templates/popup/index.php:154
|
695 |
msgid "Vertical align"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: media/js/blocks/src/timetable/inspector.js:248 templates/popup/index.php:157
|
|
|
|
|
|
|
|
|
699 |
msgid "top"
|
700 |
msgstr ""
|
701 |
|
702 |
+
#: media/js/blocks/src/timetable/inspector.js:249 templates/popup/index.php:158
|
703 |
msgid "middle"
|
704 |
msgstr ""
|
705 |
|
706 |
+
#: media/js/blocks/src/timetable/inspector.js:250 templates/popup/index.php:159
|
707 |
msgid "bottom"
|
708 |
msgstr ""
|
709 |
|
710 |
+
#: media/js/blocks/src/timetable/inspector.js:254 templates/popup/index.php:164
|
711 |
msgid "Unique ID"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: media/js/blocks/src/timetable/inspector.js:255 templates/popup/index.php:167
|
715 |
msgid ""
|
716 |
"If you use more than one table on a page specify the unique ID for a "
|
717 |
"timetable. It is usually all lowercase and contains only letters, numbers, "
|
718 |
"and hyphens."
|
719 |
msgstr ""
|
720 |
|
721 |
+
#: media/js/blocks/src/timetable/inspector.js:260 templates/popup/index.php:171
|
722 |
msgid "CSS class"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: media/js/blocks/src/timetable/inspector.js:265 templates/popup/index.php:177
|
726 |
msgid "Mobile behavior"
|
727 |
msgstr ""
|
728 |
|
729 |
+
#: media/js/blocks/src/timetable/inspector.js:269 templates/popup/index.php:181
|
730 |
msgid "Table"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: media/js/blocks/src/timetable/inspector.js:270 templates/popup/index.php:180
|
734 |
msgid "List"
|
735 |
msgstr ""
|
736 |
|
805 |
msgstr ""
|
806 |
|
807 |
#: templates/events/metabox-event-data.php:10
|
808 |
+
msgid "Add New / Edit Timeslot"
|
809 |
+
msgstr ""
|
810 |
+
|
811 |
+
#: templates/events/metabox-event-data.php:13
|
812 |
msgid "Column:"
|
813 |
msgstr ""
|
814 |
|
815 |
+
#: templates/events/metabox-event-data.php:21
|
816 |
#, php-format
|
817 |
msgid "Select column or <a target=\"_blank\" href=\"%s\">Add New</a>."
|
818 |
msgstr ""
|
819 |
|
820 |
+
#: templates/events/metabox-event-data.php:23
|
821 |
#, php-format
|
822 |
msgid "No columns found. <a href=\"%s\">Create at least one column first.</a>"
|
823 |
msgstr ""
|
824 |
|
825 |
+
#: templates/events/metabox-event-data.php:29
|
826 |
msgid "Start Time:"
|
827 |
msgstr ""
|
828 |
|
829 |
+
#: templates/events/metabox-event-data.php:32
|
830 |
+
#: templates/events/metabox-event-data.php:39
|
831 |
msgid "hh:mm"
|
832 |
msgstr ""
|
833 |
|
834 |
+
#: templates/events/metabox-event-data.php:36
|
835 |
msgid "End Time:"
|
836 |
msgstr ""
|
837 |
|
838 |
+
#: templates/events/metabox-event-data.php:43
|
839 |
msgid "Description:"
|
840 |
msgstr ""
|
841 |
|
842 |
+
#: templates/events/metabox-event-data.php:47
|
843 |
msgid "Event Head:"
|
844 |
msgstr ""
|
845 |
|
846 |
+
#: templates/events/metabox-event-data.php:55
|
847 |
msgid "none"
|
848 |
msgstr ""
|
849 |
|
850 |
+
#: templates/events/metabox-event-data.php:78
|
851 |
msgid "Add New"
|
852 |
msgstr ""
|
853 |
|
911 |
msgid "None"
|
912 |
msgstr ""
|
913 |
|
914 |
+
#: templates/popup/index.php:156
|
915 |
msgid "default"
|
916 |
msgstr ""
|
917 |
|
918 |
+
#: templates/popup/index.php:183
|
919 |
msgid ""
|
920 |
"Tick \"List\" to display events in a list view on mobile devices. Tick "
|
921 |
"\"Table\" to display events in a table."
|
922 |
msgstr ""
|
923 |
|
924 |
+
#: templates/popup/index.php:189
|
925 |
msgid "Add Timetable"
|
926 |
msgstr ""
|
927 |
|
media/js/blocks/dist/index.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(l,o,function(t){return e[t]}.bind(null,o));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=lodash},,,function(e,t,n){"use strict";n.r(t);var l=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function i(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=wp.i18n.__,b=wp.element.Component,f=wp.editor.InspectorControls,v=wp.components,h=v.SelectControl,y=v.CheckboxControl,d=v.PanelBody,g=v.TextControl,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(_,e);var t,n,o,b,v=(t=_,function(){var e,n=p(t);if(c()){var l=p(this).constructor;e=Reflect.construct(n,arguments,l)}else e=n.apply(this,arguments);return i(this,e)});function _(){var e;return r(this,_),(e=v.apply(this,arguments)).setOptions=e.setOptions.bind(u(e)),e}return n=_,(o=[{key:"setOptions",value:function(e){var t=[];return e&&(t=e.map((function(e){return{value:e.id.toString(),label:Object(l.get)(e,["title","raw"])||Object(l.get)(e,["name"])}}))),t}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=t.col,l=t.events,o=t.event_categ,r=t.increment,a=t.view,i=t.label,u=t.hide_label,c=t.hide_hrs,p=t.hide_empty_rows,s=t.title,b=t.time,v=t.sub_title,_=t.description,w=t.user,E=t.group,R=t.disable_event_url,C=t.text_align,O=t.text_align_vertical,S=t.id,j=t.custom_class,k=t.row_height,x=t.font_size,P=t.responsive,T=e.selectedEvents,D=e.selectedColumns,I=e.selectedEventCategories,z=e.setAttributes;return React.createElement(f,null,React.createElement(d,{title:m("Settings","mp-timetable")},React.createElement(h,{multiple:!0,size:"7",label:m("Columns","mp-timetable"),help:m("In order to display multiple points hold ctrl/cmd button.","mp-timetable"),value:n,onChange:function(e){return z({col:e})},options:this.setOptions(D)}),React.createElement(h,{multiple:!0,size:"7",label:m("Specific events","mp-timetable"),value:l,onChange:function(e){return z({events:e})},options:this.setOptions(T)}),React.createElement(h,{multiple:!0,size:"7",label:m("Event categories","mp-timetable"),value:o,onChange:function(e){return z({event_categ:e})},options:this.setOptions(I)}),React.createElement(y,{label:m("Title","mp-timetable"),checked:"1"==s,onChange:function(e){z({title:e?"1":"0"})}}),React.createElement(y,{label:m("Time","mp-timetable"),checked:"1"==b,onChange:function(e){z({time:e?"1":"0"})}}),React.createElement(y,{label:m("Subtitle","mp-timetable"),checked:"1"==v,onChange:function(e){z({sub_title:e?"1":"0"})}}),React.createElement(y,{label:m("Description","mp-timetable"),checked:"1"==_,onChange:function(e){z({description:e?"1":"0"})}}),React.createElement(y,{label:m("Event Head","mp-timetable"),checked:"1"==w,onChange:function(e){z({user:e?"1":"0"})}}),React.createElement(g,{label:m("Block height in pixels","mp-timetable"),type:"number",value:isNaN(k)?0:parseInt(k),onChange:function(e){z({row_height:e.toString()})},min:1,step:1}),React.createElement(g,{label:m("Base font size","mp-timetable"),help:m("Base font size for the table. Example 12px, 2em, 80%.","mp-timetable"),value:x,onChange:function(e){return z({font_size:e})}}),React.createElement(h,{label:m("Time frame for event","mp-timetable"),value:r,onChange:function(e){return z({increment:e})},options:[{value:"1",label:m("Hour (1h)","mp-timetable")},{value:"0.5",label:m("Half hour (30min)","mp-timetable")},{value:"0.25",label:m("Quarter hour (15min)","mp-timetable")}]}),React.createElement(h,{label:m("Filter events style","mp-timetable"),value:a,onChange:function(e){return z({view:e})},options:[{value:"dropdown_list",label:m("Dropdown list","mp-timetable")},{value:"tabs",label:m("Tabs","mp-timetable")}]}),React.createElement(g,{label:m("Filter title to display all events","mp-timetable"),value:i,onChange:function(e){return z({label:e})}}),React.createElement(h,{label:m("Hide 'All Events' option","mp-timetable"),value:u,onChange:function(e){return z({hide_label:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Hide column with hours","mp-timetable"),value:c,onChange:function(e){return z({hide_hrs:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Do not display empty rows","mp-timetable"),value:p,onChange:function(e){return z({hide_empty_rows:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Merge cells with common events","mp-timetable"),value:E,onChange:function(e){return z({group:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Disable event link","mp-timetable"),value:R,onChange:function(e){return z({disable_event_url:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Horizontal align","mp-timetable"),value:C,onChange:function(e){return z({text_align:e})},options:[{value:"center",label:m("center","mp-timetable")},{value:"left",label:m("left","mp-timetable")},{value:"right",label:m("right","mp-timetable")}]}),React.createElement(h,{label:m("Vertical align","mp-timetable"),value:O,onChange:function(e){return z({text_align_vertical:e})},options:[{value:"default",label:m("Default","mp-timetable")},{value:"top",label:m("top","mp-timetable")},{value:"middle",label:m("middle","mp-timetable")},{value:"bottom",label:m("bottom","mp-timetable")}]}),React.createElement(g,{label:m("Unique ID","mp-timetable"),help:m("If you use more than one table on a page specify the unique ID for a timetable. It is usually all lowercase and contains only letters, numbers, and hyphens.","mp-timetable"),value:S,onChange:function(e){return z({id:e})}}),React.createElement(g,{label:m("CSS class","mp-timetable"),value:j,onChange:function(e){return z({custom_class:e})}}),React.createElement(h,{label:m("Mobile behavior","mp-timetable"),value:P,onChange:function(e){return z({responsive:e})},options:[{value:"0",label:m("Table","mp-timetable")},{value:"1",label:m("List","mp-timetable")}]})))}}])&&a(n.prototype,o),b&&a(n,b),_}(b);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function C(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}wp.i18n.__;var k=wp.element,x=k.Component,P=k.Fragment,T=wp.compose.compose,D=wp.components,I=D.Disabled,z=D.ServerSideRender,M=wp.data.withSelect,N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(i,e);var t,n,o,r,a=(t=i,function(){var e,n=S(t);if(O()){var l=S(this).constructor;e=Reflect.construct(n,arguments,l)}else e=n.apply(this,arguments);return C(this,e)});function i(){return E(this,i),a.apply(this,arguments)}return n=i,(o=[{key:"initTable",value:function(){var e=setInterval((function(){jQuery(".mptt-shortcode-wrapper").length&&!jQuery(".mptt-shortcode-wrapper").hasClass("table-init")&&(clearInterval(e),window.mptt.tableInit())}),1)}},{key:"componentDidUpdate",value:function(e,t){Object(l.isEqual)(this.props.attributes,e.attributes)||this.initTable()}},{key:"componentDidMount",value:function(){this.initTable()}},{key:"render",value:function(){var e=this.props.attributes;return e.events,e.event_categ,React.createElement(P,null,React.createElement(_,this.props),React.createElement(I,null,React.createElement(z,{block:"mp-timetable/timetable",attributes:this.props.attributes})))}}])&&R(n.prototype,o),r&&R(n,r),i}(x),H=T([M((function(e,t){var n=e("core"),o=n.getEntityRecords,r=(n.getCategories,o("postType","mp-event",{per_page:-1,orderby:"title",order:"asc"})),a=o("postType","mp-column",{per_page:-1}),i=o("taxonomy","mp-event_category",{per_page:-1});return{selectedEvents:r?r.map((function(e){return Object(l.pick)(e,["id","title"])})):null,selectedColumns:a?a.map((function(e){return Object(l.pick)(e,["id","title"])})):null,selectedEventCategories:i?i.map((function(e){return Object(l.pick)(e,["id","name"])})):null}}))])(N);(0,wp.blocks.registerBlockType)("mp-timetable/timetable",{title:(0,wp.i18n.__)("Timetable","mp-timetable"),category:"common",icon:"calendar",supports:{align:["wide","full"]},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t}},edit:H,save:function(){return null}})}]);
|
1 |
+
!function(e){var t={};function n(l){if(t[l])return t[l].exports;var o=t[l]={i:l,l:!1,exports:{}};return e[l].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,l){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:l})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(n.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(l,o,function(t){return e[t]}.bind(null,o));return l},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=lodash},,,function(e,t,n){"use strict";n.r(t);var l=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function i(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var m=wp.i18n.__,b=wp.element.Component,f=wp.editor.InspectorControls,v=wp.components,h=v.SelectControl,y=v.CheckboxControl,d=v.PanelBody,g=v.TextControl,_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(_,e);var t,n,o,b,v=(t=_,function(){var e,n=p(t);if(c()){var l=p(this).constructor;e=Reflect.construct(n,arguments,l)}else e=n.apply(this,arguments);return i(this,e)});function _(){var e;return r(this,_),(e=v.apply(this,arguments)).setOptions=e.setOptions.bind(u(e)),e}return n=_,(o=[{key:"setOptions",value:function(e){var t=[];return e&&(t=e.map((function(e){return{value:e.id.toString(),label:Object(l.get)(e,["title","raw"])||Object(l.get)(e,["name"])}}))),t}},{key:"render",value:function(){var e=this.props,t=e.attributes,n=t.col,l=t.events,o=t.event_categ,r=t.increment,a=t.view,i=t.view_sort,u=t.label,c=t.hide_label,p=t.hide_hrs,s=t.hide_empty_rows,b=t.title,v=t.time,_=t.sub_title,w=t.description,E=t.user,R=t.group,C=t.disable_event_url,O=t.text_align,S=t.text_align_vertical,j=t.id,k=t.custom_class,x=t.row_height,T=t.font_size,P=t.responsive,D=e.selectedEvents,I=e.selectedColumns,z=e.selectedEventCategories,M=e.setAttributes;return React.createElement(f,null,React.createElement(d,{title:m("Settings","mp-timetable")},React.createElement(h,{multiple:!0,size:"7",label:m("Columns","mp-timetable"),help:m("In order to display multiple points hold ctrl/cmd button.","mp-timetable"),value:n,onChange:function(e){return M({col:e})},options:this.setOptions(I)}),React.createElement(h,{multiple:!0,size:"7",label:m("Specific events","mp-timetable"),value:l,onChange:function(e){return M({events:e})},options:this.setOptions(D)}),React.createElement(h,{multiple:!0,size:"7",label:m("Event categories","mp-timetable"),value:o,onChange:function(e){return M({event_categ:e})},options:this.setOptions(z)}),React.createElement(y,{label:m("Title","mp-timetable"),checked:"1"==b,onChange:function(e){M({title:e?"1":"0"})}}),React.createElement(y,{label:m("Time","mp-timetable"),checked:"1"==v,onChange:function(e){M({time:e?"1":"0"})}}),React.createElement(y,{label:m("Subtitle","mp-timetable"),checked:"1"==_,onChange:function(e){M({sub_title:e?"1":"0"})}}),React.createElement(y,{label:m("Description","mp-timetable"),checked:"1"==w,onChange:function(e){M({description:e?"1":"0"})}}),React.createElement(y,{label:m("Event Head","mp-timetable"),checked:"1"==E,onChange:function(e){M({user:e?"1":"0"})}}),React.createElement(g,{label:m("Block height in pixels","mp-timetable"),type:"number",value:isNaN(x)?0:parseInt(x),onChange:function(e){M({row_height:e.toString()})},min:1,step:1}),React.createElement(g,{label:m("Base font size","mp-timetable"),help:m("Base font size for the table. Example 12px, 2em, 80%.","mp-timetable"),value:T,onChange:function(e){return M({font_size:e})}}),React.createElement(h,{label:m("Time frame for event","mp-timetable"),value:r,onChange:function(e){return M({increment:e})},options:[{value:"1",label:m("Hour (1h)","mp-timetable")},{value:"0.5",label:m("Half hour (30min)","mp-timetable")},{value:"0.25",label:m("Quarter hour (15min)","mp-timetable")}]}),React.createElement(h,{label:m("Filter events style","mp-timetable"),value:a,onChange:function(e){return M({view:e})},options:[{value:"dropdown_list",label:m("Dropdown list","mp-timetable")},{value:"tabs",label:m("Tabs","mp-timetable")}]}),React.createElement(h,{label:m("Order of items in filter","mp-timetable"),value:i,onChange:function(e){return M({view_sort:e})},options:[{value:"",label:m("Default","mp-timetable")},{value:"menu_order",label:m("Menu Order","mp-timetable")},{value:"post_title",label:m("Title","mp-timetable")}]}),React.createElement(g,{label:m("Filter title to display all events","mp-timetable"),value:u,onChange:function(e){return M({label:e})}}),React.createElement(h,{label:m("Hide 'All Events' option","mp-timetable"),value:c,onChange:function(e){return M({hide_label:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Hide column with hours","mp-timetable"),value:p,onChange:function(e){return M({hide_hrs:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Do not display empty rows","mp-timetable"),value:s,onChange:function(e){return M({hide_empty_rows:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Merge cells with common events","mp-timetable"),value:R,onChange:function(e){return M({group:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Disable event link","mp-timetable"),value:C,onChange:function(e){return M({disable_event_url:e})},options:[{value:"0",label:m("No","mp-timetable")},{value:"1",label:m("Yes","mp-timetable")}]}),React.createElement(h,{label:m("Horizontal align","mp-timetable"),value:O,onChange:function(e){return M({text_align:e})},options:[{value:"center",label:m("center","mp-timetable")},{value:"left",label:m("left","mp-timetable")},{value:"right",label:m("right","mp-timetable")}]}),React.createElement(h,{label:m("Vertical align","mp-timetable"),value:S,onChange:function(e){return M({text_align_vertical:e})},options:[{value:"default",label:m("Default","mp-timetable")},{value:"top",label:m("top","mp-timetable")},{value:"middle",label:m("middle","mp-timetable")},{value:"bottom",label:m("bottom","mp-timetable")}]}),React.createElement(g,{label:m("Unique ID","mp-timetable"),help:m("If you use more than one table on a page specify the unique ID for a timetable. It is usually all lowercase and contains only letters, numbers, and hyphens.","mp-timetable"),value:j,onChange:function(e){return M({id:e})}}),React.createElement(g,{label:m("CSS class","mp-timetable"),value:k,onChange:function(e){return M({custom_class:e})}}),React.createElement(h,{label:m("Mobile behavior","mp-timetable"),value:P,onChange:function(e){return M({responsive:e})},options:[{value:"0",label:m("Table","mp-timetable")},{value:"1",label:m("List","mp-timetable")}]})))}}])&&a(n.prototype,o),b&&a(n,b),_}(b);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function C(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function O(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function j(e,t){return(j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}wp.i18n.__;var k=wp.element,x=k.Component,T=k.Fragment,P=wp.compose.compose,D=wp.components,I=D.Disabled,z=D.ServerSideRender,M=wp.data.withSelect,N=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&j(e,t)}(i,e);var t,n,o,r,a=(t=i,function(){var e,n=S(t);if(O()){var l=S(this).constructor;e=Reflect.construct(n,arguments,l)}else e=n.apply(this,arguments);return C(this,e)});function i(){return E(this,i),a.apply(this,arguments)}return n=i,(o=[{key:"initTable",value:function(){var e=setInterval((function(){jQuery(".mptt-shortcode-wrapper").length&&!jQuery(".mptt-shortcode-wrapper").hasClass("table-init")&&(clearInterval(e),window.mptt.tableInit())}),1)}},{key:"componentDidUpdate",value:function(e,t){Object(l.isEqual)(this.props.attributes,e.attributes)||this.initTable()}},{key:"componentDidMount",value:function(){this.initTable()}},{key:"render",value:function(){var e=this.props.attributes;return e.events,e.event_categ,React.createElement(T,null,React.createElement(_,this.props),React.createElement(I,null,React.createElement(z,{block:"mp-timetable/timetable",attributes:this.props.attributes})))}}])&&R(n.prototype,o),r&&R(n,r),i}(x),H=P([M((function(e,t){var n=e("core"),o=n.getEntityRecords,r=(n.getCategories,o("postType","mp-event",{per_page:-1,orderby:"title",order:"asc"})),a=o("postType","mp-column",{per_page:-1}),i=o("taxonomy","mp-event_category",{per_page:-1});return{selectedEvents:r?r.map((function(e){return Object(l.pick)(e,["id","title"])})):null,selectedColumns:a?a.map((function(e){return Object(l.pick)(e,["id","title"])})):null,selectedEventCategories:i?i.map((function(e){return Object(l.pick)(e,["id","name"])})):null}}))])(N);(0,wp.blocks.registerBlockType)("mp-timetable/timetable",{title:(0,wp.i18n.__)("Timetable","mp-timetable"),category:"common",icon:"calendar",supports:{align:["wide","full"]},getEditWrapperProps:function(e){var t=e.align;if(["wide","full"].includes(t))return{"data-align":t}},edit:H,save:function(){return null}})}]);
|
media/js/blocks/src/timetable/inspector.js
CHANGED
@@ -45,6 +45,7 @@ class Inspector extends Component {
|
|
45 |
|
46 |
increment,
|
47 |
view,
|
|
|
48 |
label,
|
49 |
|
50 |
hide_label,
|
@@ -168,6 +169,16 @@ class Inspector extends Component {
|
|
168 |
{ value: 'tabs' , label: __( 'Tabs' , 'mp-timetable' ) },
|
169 |
]}
|
170 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
<TextControl
|
172 |
label={__('Filter title to display all events', 'mp-timetable')}
|
173 |
value={label}
|
45 |
|
46 |
increment,
|
47 |
view,
|
48 |
+
view_sort,
|
49 |
label,
|
50 |
|
51 |
hide_label,
|
169 |
{ value: 'tabs' , label: __( 'Tabs' , 'mp-timetable' ) },
|
170 |
]}
|
171 |
/>
|
172 |
+
<SelectControl
|
173 |
+
label={__('Order of items in filter', 'mp-timetable')}
|
174 |
+
value={view_sort}
|
175 |
+
onChange={view_sort => setAttributes({ view_sort })}
|
176 |
+
options={[
|
177 |
+
{ value: '' , label: __( 'Default', 'mp-timetable' ) },
|
178 |
+
{ value: 'menu_order' , label: __( 'Menu Order', 'mp-timetable' ) },
|
179 |
+
{ value: 'post_title' , label: __( 'Title', 'mp-timetable' ) },
|
180 |
+
]}
|
181 |
+
/>
|
182 |
<TextControl
|
183 |
label={__('Filter title to display all events', 'mp-timetable')}
|
184 |
value={label}
|
media/js/mce-timeTable-buttons.js
CHANGED
@@ -59,6 +59,9 @@
|
|
59 |
case 'filter_style':
|
60 |
shortcode_obj.attrs.view = parameters.value;
|
61 |
break;
|
|
|
|
|
|
|
62 |
case 'filter_label':
|
63 |
shortcode_obj.attrs.label = parameters.value;
|
64 |
break;
|
59 |
case 'filter_style':
|
60 |
shortcode_obj.attrs.view = parameters.value;
|
61 |
break;
|
62 |
+
case 'filter_style_sort':
|
63 |
+
shortcode_obj.attrs.view_sort = parameters.value;
|
64 |
+
break;
|
65 |
case 'filter_label':
|
66 |
shortcode_obj.attrs.label = parameters.value;
|
67 |
break;
|
media/js/mptt-functions.js
CHANGED
@@ -150,7 +150,7 @@ Registry.register("adminFunctions", (function($) {
|
|
150 |
* @param args
|
151 |
*/
|
152 |
callModal: function(start_content, open_callback, args) {
|
153 |
-
var height = $(window).outerHeight() -
|
154 |
width = $(window).outerWidth() - 60,
|
155 |
spinner = wp.html.string({
|
156 |
'tag': "span",
|
150 |
* @param args
|
151 |
*/
|
152 |
callModal: function(start_content, open_callback, args) {
|
153 |
+
var height = $(window).outerHeight() - 100,
|
154 |
width = $(window).outerWidth() - 60,
|
155 |
spinner = wp.html.string({
|
156 |
'tag': "span",
|
media/js/mptt-functions.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t){window.Registry=function(){"use strict";var e={};function t(e){var t=!1;return"function"==typeof e.getInstance&&(t=!0),t}return{register:function(n,i){if(!t(i))throw new Error('Invalide module "'+n+'". The function "getInstance" is not defined.');e[n]=i},unregister:function(t){delete e[t]},_get:function(t){var n=e[t];if(!n)throw new Error('The module "'+t+'" has not been registered or it was unregistered.');if("function"!=typeof n.getInstance)throw new Error('The module "'+t+'" can not be instantiated. The function "getInstance" is not defined.');return e[t].getInstance()},registryMap:function(n){for(var i in n)if(n.hasOwnProperty(i)){if(!t(n[i]))throw new Error('Invalide module "'+i+'" inside the collection. The function "getInstance" is not defined.');e[i]=n[i]}}}}(),Registry.register("adminFunctions",function(e){"use strict";var t,n;return{getInstance:function(){return t||(t={wpAjax:function(e,t,n){e.mptt_action=e.action,delete e.action,wp.ajax.send("route_url",{success:function(e){!_.isUndefined(n)&&_.isFunction(n)&&t(e)},error:function(e){!_.isUndefined(n)&&_.isFunction(n)?n(e):console.log(e)},data:e})},initJBox:function(e,i,r){e,n=i,t.buttonEvents(r)},buttonEvents:function(t){n.find("#insert-into").off("click").on("click",(function(){t(e(this).parents("form").serializeArray())}))},callModal:function(t,n,i){var r=e(window).outerHeight()-
|
1 |
+
!function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([,function(e,t){window.Registry=function(){"use strict";var e={};function t(e){var t=!1;return"function"==typeof e.getInstance&&(t=!0),t}return{register:function(n,i){if(!t(i))throw new Error('Invalide module "'+n+'". The function "getInstance" is not defined.');e[n]=i},unregister:function(t){delete e[t]},_get:function(t){var n=e[t];if(!n)throw new Error('The module "'+t+'" has not been registered or it was unregistered.');if("function"!=typeof n.getInstance)throw new Error('The module "'+t+'" can not be instantiated. The function "getInstance" is not defined.');return e[t].getInstance()},registryMap:function(n){for(var i in n)if(n.hasOwnProperty(i)){if(!t(n[i]))throw new Error('Invalide module "'+i+'" inside the collection. The function "getInstance" is not defined.');e[i]=n[i]}}}}(),Registry.register("adminFunctions",function(e){"use strict";var t,n;return{getInstance:function(){return t||(t={wpAjax:function(e,t,n){e.mptt_action=e.action,delete e.action,wp.ajax.send("route_url",{success:function(e){!_.isUndefined(n)&&_.isFunction(n)&&t(e)},error:function(e){!_.isUndefined(n)&&_.isFunction(n)?n(e):console.log(e)},data:e})},initJBox:function(e,i,r){e,n=i,t.buttonEvents(r)},buttonEvents:function(t){n.find("#insert-into").off("click").on("click",(function(){t(e(this).parents("form").serializeArray())}))},callModal:function(t,n,i){var r=e(window).outerHeight()-100,o=e(window).outerWidth()-60,s=(wp.html.string({tag:"span",attrs:{class:"spinner is-active"},content:""}),{content:t,closeOnEsc:!0,animation:{open:"zoomIn",close:"zoomOut"},width:o,height:r,closeButton:"title",title:"Shortcode Settings",onOpen:function(){var t=e("#"+this.id);n.call(this,t)},onClose:function(){e("#"+this.id).remove()}});_.isUndefined(i)||e.extend(s,i),new jBox("Modal",s).open()},parseRequest:function(t){var n,i=location.search,r={};return _.isEmpty(i)||"?"===i?r:(n=(i=i.replace("?","")).split("&"),e.each(n,(function(){var e=this;e=e.split("="),r[e[0]]=e[1]})),_.isUndefined(t)?r:r[t])},generateHTML:function(n){var i,r="";if(_.isObject(n)){var o=document.createElement(n.tag);_.isUndefined(n.attrs)||e.each(n.attrs,(function(e,t){_.isUndefined(t)||""===t||o.setAttribute(e,t)})),_.isArray(n.content)?(e.each(n.content,(function(e,n){r+=t.generateHTML(n)})),e(o).html(r)):_.isObject(n.content)?(r=t.generateHTML(n.content),e(o).html(r)):_.isUndefined(n.content)?e(o).html(""):e(o).html(n.content),i=e(o).get(0).outerHTML}else i=!!_.isString(n)&&n;return i},getHtml:function(n,i){if(_.isUndefined(n))return!1;var r=!1;if(_.isUndefined(i)&&(_.isArray(n)?(r="",e.each(n,(function(e,n){r+=t.generateHTML(n)}))):r=t.generateHTML(n)),_.isObject(i)){var o=_.template(r);r=o(i)}return r}}),t}}}(jQuery)),function(e){"use strict";e(document).ready((function(){var t=function(){var t=e("body");!function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return parseInt(e.substring(n+3,e.indexOf(".",n)),10)}return!1}()?t.removeClass("mprm_ie_browser"):t.hasClass("mprm_ie_browser")||t.addClass("mprm_ie_browser");var n=e(".mptt-shortcode-wrapper");if("undefined"!=typeof typenow&&pagenow===typenow)switch(typenow){case"mp-event":Registry._get("Event").init();break;case"mp-column":Registry._get("Event").initDatePicker(),Registry._get("Event").columnRadioBox()}n.length&&(Registry._get("Event").initTableData(),Registry._get("Event").filterShortcodeEvents(),Registry._get("Event").getFilterByHash(),n.show(),n.addClass("table-init")),(e(".upcoming-events-widget").length||n.length)&&Registry._get("Event").setColorSettings()};window.mptt={},window.mptt.tableInit=t,t()}))}(jQuery)}]);
|
mp-timetable.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Timetable and Event Schedule
|
5 |
* Plugin URI: https://motopress.com/products/timetable-event-schedule/
|
6 |
* Description: Smart time-management tool with a clean minimalist design for featuring your timetables and upcoming events.
|
7 |
-
* Version: 2.3.
|
8 |
* Author: MotoPress
|
9 |
* Author URI: https://motopress.com
|
10 |
* License: GPLv2 or later
|
4 |
* Plugin Name: Timetable and Event Schedule
|
5 |
* Plugin URI: https://motopress.com/products/timetable-event-schedule/
|
6 |
* Description: Smart time-management tool with a clean minimalist design for featuring your timetables and upcoming events.
|
7 |
+
* Version: 2.3.9
|
8 |
* Author: MotoPress
|
9 |
* Author URI: https://motopress.com
|
10 |
* License: GPLv2 or later
|
readme.txt
CHANGED
@@ -79,6 +79,10 @@ Plugin bundles the following third-party resources:
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
|
|
82 |
= 2.3.8, Apr 1 2020 =
|
83 |
* Bug fix: fixed an issue with the missing Event tags field.
|
84 |
* Bug fix: fixed an issue when a user with the read capability could access a Help menu page.
|
79 |
|
80 |
== Changelog ==
|
81 |
|
82 |
+
= 2.3.9, Apr 21 2020 =
|
83 |
+
* Added the ability to sort events in the dropdown list or tabs.
|
84 |
+
* Improved user capability check.
|
85 |
+
|
86 |
= 2.3.8, Apr 1 2020 =
|
87 |
* Bug fix: fixed an issue with the missing Event tags field.
|
88 |
* Bug fix: fixed an issue when a user with the read capability could access a Help menu page.
|
templates-functions/action-shortcode-functions.php
CHANGED
@@ -25,37 +25,58 @@ function mptt_shortcode_template_after_content() { ?>
|
|
25 |
* Filter contents
|
26 |
*/
|
27 |
function mptt_shortcode_template_content_filter() {
|
|
|
28 |
global $mptt_shortcode_data;
|
|
|
29 |
$unique_events = empty( $mptt_shortcode_data[ 'unique_events' ] ) ? array() : $mptt_shortcode_data[ 'unique_events' ];
|
30 |
-
$style
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
if ( isset( $mptt_shortcode_data[ 'events_data' ][ 'unique_events' ]) && count( $mptt_shortcode_data[ 'events_data' ][ 'unique_events' ] ) < 2 ) {
|
32 |
$style = ' style="display:none;"';
|
33 |
}
|
34 |
-
$display_label = $
|
35 |
-
|
36 |
-
if ( $
|
37 |
<select class="<?php echo apply_filters( 'mptt_shortcode_navigation_select_class', 'mptt-menu mptt-navigation-select' ) ?>"<?php echo $style ?>>
|
38 |
-
<?php if ( ! $
|
39 |
-
<option value="all"><?php echo ( strlen( trim( $
|
|
|
40 |
<?php } else { ?>
|
41 |
<option value="all"></option>
|
42 |
<?php }
|
43 |
if ( ! empty( $unique_events ) ):
|
44 |
foreach ( $unique_events as $event ): ?>
|
45 |
-
<option value="<?php echo $event->post->post_name ?>"><?php echo $event->post->post_title ?></option>
|
46 |
<?php endforeach;
|
47 |
endif; ?>
|
48 |
</select>
|
49 |
-
<?php } elseif ( $
|
50 |
<ul class="<?php echo apply_filters( 'mptt_shortcode_navigation_tabs_class', 'mptt-menu mptt-navigation-tabs' ) ?>" <?php echo $style ?>>
|
51 |
<li style="<?php echo $display_label ?>">
|
52 |
-
<a title="<?php echo ( strlen( trim( $
|
53 |
-
|
|
|
54 |
</a>
|
55 |
</li>
|
56 |
<?php if ( ! empty( $unique_events ) ): ?>
|
57 |
<?php foreach ( $unique_events as $event ): ?>
|
58 |
-
<li><a title="<?php echo $event->post->post_title ?>" href="#<?php
|
|
|
|
|
59 |
<?php endforeach;
|
60 |
endif; ?>
|
61 |
</ul>
|
25 |
* Filter contents
|
26 |
*/
|
27 |
function mptt_shortcode_template_content_filter() {
|
28 |
+
|
29 |
global $mptt_shortcode_data;
|
30 |
+
|
31 |
$unique_events = empty( $mptt_shortcode_data[ 'unique_events' ] ) ? array() : $mptt_shortcode_data[ 'unique_events' ];
|
32 |
+
$style = '';
|
33 |
+
$params = $mptt_shortcode_data[ 'params' ];
|
34 |
+
|
35 |
+
//sort events in filter
|
36 |
+
if ( !empty( $unique_events ) && function_exists('usort') && !empty($params['view_sort']) ) {
|
37 |
+
if ( $params['view_sort'] == 'menu_order' ) {
|
38 |
+
usort($unique_events, function($a, $b) {
|
39 |
+
return ($a->post->menu_order > $b->post->menu_order);
|
40 |
+
});
|
41 |
+
} elseif ( $params['view_sort'] == 'post_title' ) {
|
42 |
+
usort($unique_events, function($a, $b) {
|
43 |
+
return strcmp($a->post->post_title, $b->post->post_title);
|
44 |
+
});
|
45 |
+
}
|
46 |
+
}
|
47 |
+
|
48 |
if ( isset( $mptt_shortcode_data[ 'events_data' ][ 'unique_events' ]) && count( $mptt_shortcode_data[ 'events_data' ][ 'unique_events' ] ) < 2 ) {
|
49 |
$style = ' style="display:none;"';
|
50 |
}
|
51 |
+
$display_label = $params[ 'hide_label' ] ? 'display: none' : '';
|
52 |
+
|
53 |
+
if ( $params[ 'view' ] == 'dropdown_list' ) { ?>
|
54 |
<select class="<?php echo apply_filters( 'mptt_shortcode_navigation_select_class', 'mptt-menu mptt-navigation-select' ) ?>"<?php echo $style ?>>
|
55 |
+
<?php if ( ! $params[ 'hide_label' ] ) { ?>
|
56 |
+
<option value="all"><?php echo ( strlen( trim( $params[ 'label' ] ) ) ) ?
|
57 |
+
trim( $params[ 'label' ] ) : __( 'All Events', 'mp-timetable' ) ?></option>
|
58 |
<?php } else { ?>
|
59 |
<option value="all"></option>
|
60 |
<?php }
|
61 |
if ( ! empty( $unique_events ) ):
|
62 |
foreach ( $unique_events as $event ): ?>
|
63 |
+
<option value="<?php echo esc_attr( $event->post->post_name); ?>"><?php echo esc_html($event->post->post_title); ?></option>
|
64 |
<?php endforeach;
|
65 |
endif; ?>
|
66 |
</select>
|
67 |
+
<?php } elseif ( $params[ 'view' ] == 'tabs' ) { ?>
|
68 |
<ul class="<?php echo apply_filters( 'mptt_shortcode_navigation_tabs_class', 'mptt-menu mptt-navigation-tabs' ) ?>" <?php echo $style ?>>
|
69 |
<li style="<?php echo $display_label ?>">
|
70 |
+
<a title="<?php echo ( strlen( trim( $params[ 'label' ] ) ) ) ?
|
71 |
+
trim( $params[ 'label' ] ) : __( 'All Events', 'mp-timetable' ) ?>" href="#all" onclick="event.preventDefault();"><?php
|
72 |
+
echo ( strlen( trim( $params[ 'label' ] ) ) ) ? trim( $params[ 'label' ] ) : __( 'All Events', 'mp-timetable' ) ?>
|
73 |
</a>
|
74 |
</li>
|
75 |
<?php if ( ! empty( $unique_events ) ): ?>
|
76 |
<?php foreach ( $unique_events as $event ): ?>
|
77 |
+
<li><a title="<?php echo esc_attr($event->post->post_title); ?>" href="#<?php
|
78 |
+
echo esc_attr($event->post->post_name); ?>" onclick="event.preventDefault();"><?php
|
79 |
+
echo esc_html($event->post->post_title); ?></a></li>
|
80 |
<?php endforeach;
|
81 |
endif; ?>
|
82 |
</ul>
|
templates/events/column-category.php
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
<?php
|
|
|
2 |
foreach ($terms as $term) {
|
3 |
-
?>
|
4 |
-
|
5 |
-
|
6 |
}
|
1 |
<?php
|
2 |
+
|
3 |
foreach ($terms as $term) {
|
4 |
+
?><a href="<?php echo get_term_link($term->term_id) ?>" rel="tag" title="<?php echo $term->name; ?>"><?php
|
5 |
+
echo $term->name ?></a><?php echo ($term !== end($terms)) ? ', ' : '' ?>
|
6 |
+
<?php
|
7 |
}
|
templates/events/metabox-event-data.php
CHANGED
@@ -2,9 +2,12 @@
|
|
2 |
<input type="hidden" name="events[place]" id="eventmeta_place" value=""/>
|
3 |
<input type="hidden" name="events[leading_event]" id="eventmeta_leading_event" value="'.<?php wp_create_nonce(plugin_basename(__FILE__)) ?>.'"/>
|
4 |
<input type="hidden" id="time_format" value="<?php echo $date["time_format"]["am_pm"] === true ? '1' : '0' ?>"/>
|
|
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
8 |
<table id="add_event_table" class="widefat">
|
9 |
<tr>
|
10 |
<td><label for="weekday_id"><?php _e('Column:', 'mp-timetable') ?></label></td>
|
@@ -44,10 +47,10 @@
|
|
44 |
<td><label for="user_id"><?php _e('Event Head:', 'mp-timetable') ?></label></td>
|
45 |
<td>
|
46 |
<?php
|
47 |
-
|
48 |
global $wp_version;
|
49 |
$wp_dropdown_users_show = (version_compare($wp_version, '4.5', '<')) ? 'user_login' : 'display_name_with_login';
|
50 |
-
|
51 |
wp_dropdown_users(array(
|
52 |
'show_option_none' => __('none', 'mp-timetable'),
|
53 |
'show_option_all' => null,
|
2 |
<input type="hidden" name="events[place]" id="eventmeta_place" value=""/>
|
3 |
<input type="hidden" name="events[leading_event]" id="eventmeta_leading_event" value="'.<?php wp_create_nonce(plugin_basename(__FILE__)) ?>.'"/>
|
4 |
<input type="hidden" id="time_format" value="<?php echo $date["time_format"]["am_pm"] === true ? '1' : '0' ?>"/>
|
5 |
+
<?php
|
6 |
|
7 |
+
\mp_timetable\plugin_core\classes\View::get_instance()->render_html('events/event-data', array('event_data' => $event_data), true);
|
8 |
+
|
9 |
+
?>
|
10 |
+
<h4><?php _e('Add New / Edit Timeslot', 'mp-timetable'); ?></h4>
|
11 |
<table id="add_event_table" class="widefat">
|
12 |
<tr>
|
13 |
<td><label for="weekday_id"><?php _e('Column:', 'mp-timetable') ?></label></td>
|
47 |
<td><label for="user_id"><?php _e('Event Head:', 'mp-timetable') ?></label></td>
|
48 |
<td>
|
49 |
<?php
|
50 |
+
|
51 |
global $wp_version;
|
52 |
$wp_dropdown_users_show = (version_compare($wp_version, '4.5', '<')) ? 'user_login' : 'display_name_with_login';
|
53 |
+
|
54 |
wp_dropdown_users(array(
|
55 |
'show_option_none' => __('none', 'mp-timetable'),
|
56 |
'show_option_all' => null,
|
templates/events/metabox-event-options.php
CHANGED
@@ -8,28 +8,28 @@
|
|
8 |
<td><label for="color"><?php _e('Background Color:', 'mp-timetable'); ?></label></td>
|
9 |
<td>
|
10 |
<input type="hidden" class="clr-picker" value="<?php echo esc_attr( $post->color ); ?>">
|
11 |
-
<input type="text" id="color" name="event_meta[color]" value="<?php echo $post->color ?>" data-default-color="transparent">
|
12 |
</td>
|
13 |
</tr>
|
14 |
<tr class="select-color">
|
15 |
<td><label for="hover_color"><?php _e('Background Hover Color:', 'mp-timetable'); ?></label></td>
|
16 |
<td>
|
17 |
-
<input type="hidden" class="clr-picker" value="<?php echo $post->hover_color ?>">
|
18 |
-
<input type="text" id="hover_color" name="event_meta[hover_color]" value="<?php echo $post->hover_color ?>" data-default-color="transparent">
|
19 |
</td>
|
20 |
</tr>
|
21 |
<tr class="select-color">
|
22 |
<td><label for="text_color"><?php _e('Text Color:', 'mp-timetable'); ?></label></td>
|
23 |
<td>
|
24 |
-
<input type="hidden" class="clr-picker" value="<?php echo $post->text_color ?>">
|
25 |
-
<input type="text" id="text_color" name="event_meta[text_color]" value="<?php echo $post->text_color ?>" data-default-color="transparent">
|
26 |
</td>
|
27 |
</tr>
|
28 |
<tr class="select-color">
|
29 |
<td><label for="hover_text_color"><?php _e('Text Hover Color:', 'mp-timetable'); ?></label></td>
|
30 |
<td>
|
31 |
-
<input type="hidden" class="clr-picker" value="<?php echo $post->hover_text_color ?>">
|
32 |
-
<input type="text" id="hover_text_color" name="event_meta[hover_text_color]" value="<?php echo $post->hover_text_color ?>" data-default-color="transparent">
|
33 |
</td>
|
34 |
</tr>
|
35 |
<tr>
|
8 |
<td><label for="color"><?php _e('Background Color:', 'mp-timetable'); ?></label></td>
|
9 |
<td>
|
10 |
<input type="hidden" class="clr-picker" value="<?php echo esc_attr( $post->color ); ?>">
|
11 |
+
<input type="text" id="color" name="event_meta[color]" value="<?php echo esc_attr( $post->color ); ?>" data-default-color="transparent">
|
12 |
</td>
|
13 |
</tr>
|
14 |
<tr class="select-color">
|
15 |
<td><label for="hover_color"><?php _e('Background Hover Color:', 'mp-timetable'); ?></label></td>
|
16 |
<td>
|
17 |
+
<input type="hidden" class="clr-picker" value="<?php echo esc_attr( $post->hover_color ); ?>">
|
18 |
+
<input type="text" id="hover_color" name="event_meta[hover_color]" value="<?php echo esc_attr( $post->hover_color ); ?>" data-default-color="transparent">
|
19 |
</td>
|
20 |
</tr>
|
21 |
<tr class="select-color">
|
22 |
<td><label for="text_color"><?php _e('Text Color:', 'mp-timetable'); ?></label></td>
|
23 |
<td>
|
24 |
+
<input type="hidden" class="clr-picker" value="<?php echo esc_attr( $post->text_color ); ?>">
|
25 |
+
<input type="text" id="text_color" name="event_meta[text_color]" value="<?php echo esc_attr( $post->text_color ); ?>" data-default-color="transparent">
|
26 |
</td>
|
27 |
</tr>
|
28 |
<tr class="select-color">
|
29 |
<td><label for="hover_text_color"><?php _e('Text Hover Color:', 'mp-timetable'); ?></label></td>
|
30 |
<td>
|
31 |
+
<input type="hidden" class="clr-picker" value="<?php echo esc_attr( $post->hover_text_color ); ?>">
|
32 |
+
<input type="text" id="hover_text_color" name="event_meta[hover_text_color]" value="<?php echo esc_attr( $post->hover_text_color ); ?>" data-default-color="transparent">
|
33 |
</td>
|
34 |
</tr>
|
35 |
<tr>
|
templates/popup/index.php
CHANGED
@@ -79,6 +79,16 @@
|
|
79 |
</select>
|
80 |
</td>
|
81 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
<tr>
|
83 |
<td><label for="filter_label"><?php _e('Filter title to display all events', 'mp-timetable'); ?></label></td>
|
84 |
<td>
|
79 |
</select>
|
80 |
</td>
|
81 |
</tr>
|
82 |
+
<tr>
|
83 |
+
<td><label for="filter_style_sort"><?php _e('Order of items in filter', 'mp-timetable'); ?> </label></td>
|
84 |
+
<td>
|
85 |
+
<select id="filter_style_sort" name="filter_style_sort">
|
86 |
+
<option value=""><?php _e('Default', 'mp-timetable'); ?></option>
|
87 |
+
<option value="menu_order"><?php _e('Menu Order', 'mp-timetable'); ?></option>
|
88 |
+
<option value="post_title"><?php _e('Title', 'mp-timetable'); ?></option>
|
89 |
+
</select>
|
90 |
+
</td>
|
91 |
+
</tr>
|
92 |
<tr>
|
93 |
<td><label for="filter_label"><?php _e('Filter title to display all events', 'mp-timetable'); ?></label></td>
|
94 |
<td>
|