Changeset 2511130
- Timestamp:
- 04/07/2021 11:14:22 PM (5 years ago)
- Location:
- microtango
- Files:
-
- 7 added
- 4 edited
-
tags/0.9.6 (added)
-
tags/0.9.6/microtango-init.php (added)
-
tags/0.9.6/microtango-settings-init.php (added)
-
tags/0.9.6/microtango.php (added)
-
tags/0.9.6/readme.txt (added)
-
tags/0.9.6/scripts (added)
-
tags/0.9.6/styles (added)
-
trunk/microtango-init.php (modified) (2 diffs)
-
trunk/microtango-settings-init.php (modified) (2 diffs)
-
trunk/microtango.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
microtango/trunk/microtango-init.php
r2332975 r2511130 1 1 <?php 2 2 3 add_action( 'wp_enqueue_scripts', 'microtango_enqueue_files' );3 add_action('wp_enqueue_scripts', 'microtango_enqueue_files' ); 4 4 add_shortcode('mt_courses', 'microtango_shortcode_courses'); 5 5 add_shortcode('mt_reservation', 'microtango_shortcode_reservation'); 6 add_shortcode('mt_video', 'microtango_shortcode_video'); 6 7 add_shortcode('mt_form', 'microtango_shortcode_form'); 7 8 8 9 function microtango_enqueue_files() 9 10 { 10 wp_enqueue_script( 'microtango', 'https://cdn.microtango.de/scripts/mtrest-2.0.0.min.js', null);11 wp_enqueue_script( 'microtango-cms-init', 'https://cdn.microtango.de/scripts/mt-cms-init-1.0.0.min.js', array('microtango'), false, true);11 wp_enqueue_script('microtango', 'https://cdn.microtango.de/scripts/mtrest-2.0.0.min.js', null); 12 wp_enqueue_script('microtango-cms-init', 'https://cdn.microtango.de/scripts/mt-cms-init-1.0.0.min.js', array('microtango'), false, true); 12 13 } 13 14 … … 110 111 } 111 112 113 function microtango_shortcode_video($atts, $content = "") 114 { 115 global $microtango_settings; 116 117 // Attributes 118 $atts = shortcode_atts( 119 array( 120 'videogroup' => '', 121 'restkey' => get_option($microtango_settings['settings'])['restkey'], 122 'showvideotext' => get_option($microtango_settings['settings'])['showvideotext'], 123 'videonotfoundtext' => get_option($microtango_settings['settings'])['videonotfoundtext'], 124 'logintext' => get_option($microtango_settings['settings'])['logintext'], 125 'loadcss' => isset(get_option($microtango_settings['settings'])['loadcss']) ? get_option($microtango_settings['settings'])['loadcss'] : '0' === '1', 126 ), 127 $atts, 128 'mt_reservation' 129 ); 130 131 if ( empty ($content) ) { 132 $content = get_option($microtango_settings['settings'])['defaultrowtemplate']; 133 } 134 135 if ( empty ($content) ) { 136 $content = "Kurs|{{Subject}}#Start|{{StartDateText}}#Von|{{Timespan}}#Stunden|{{RepeatCount}}#Verfügbarkeit|{{AvailabilityText}}#|{{Attend}}"; 137 } 138 139 $columns = "\"" . str_replace("#", "\", \"", $content) . "\""; 140 141 // Code 142 $return = <<<EOT 143 <script>MicrotangoCMSHelper.addVideo( 144 { 145 "restKey": "{$atts['restkey']}", 146 "showVideoText": "{$atts['showvideotext']}", 147 "videoNotFoundText": "{$atts['videonotfoundtext']}", 148 "loginText": "{$atts['logintext']}", 149 "loadCSS": "{$atts['loadcss']}", 150 "templates": { "id": "mtuserdefined", "columns": [{$columns}] }, 151 "update": [{"videoGroup": "{$atts['videogroup']}"}], 152 }); 153 </script> 154 EOT; 155 156 return htmlspecialchars_decode($return); 157 } 158 112 159 function microtango_shortcode_form($atts, $content = "") 113 160 { -
microtango/trunk/microtango-settings-init.php
r2322385 r2511130 34 34 'fullybookedtext' => '', 35 35 'reservationtext' => '', 36 'logintext' => '', 37 'showvideotext' => '', 38 'videonotfoundtext' => '', 36 39 'loadcss' => '', 37 40 'loadtemplate' => '' … … 64 67 microtango_settings_add_text_field('fullybookedtext', 'Course is sould out', 40, null, 'Default: Not free space', $data, 'optional'); 65 68 microtango_settings_add_text_field('reservationtext', 'Reservation text', 20, null, 'Default: My Reservations', $data, 'optional'); 69 microtango_settings_add_text_field('logintext', 'Login text', 20, null, 'Default: Einloggen', $data, 'optional'); 70 microtango_settings_add_text_field('showvideotext', 'Show video text', 20, null, 'Default: Play Video', $data, 'optional'); 71 microtango_settings_add_text_field('videonotfoundtext', 'No video found text', 40, null, 'Default: No video found', $data, 'optional'); 66 72 microtango_settings_add_checkbox_field('loadcss', 'Load CSS', 'Load custom styles', $data, 'optional'); 67 73 microtango_settings_add_checkbox_field('loadtemplate', 'Load Templates', 'Load custom templates', $data, 'optional'); -
microtango/trunk/microtango.php
r2332975 r2511130 4 4 Plugin URI: https://microtango.de/ 5 5 Description: Microtango WP integration. Requires subscription from DMS. Will include the Microtango REST API to show your cloud data. 6 Version: 0.9. 56 Version: 0.9.6 7 7 Author: microtango 8 8 Author URI: https://profiles.wordpress.org/microtango/ … … 11 11 Text Domain: microtango 12 12 13 Copyright 2019-202 0DMS Computer Contor13 Copyright 2019-2021 DMS Computer Contor 14 14 15 15 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), … … 30 30 "settings_page_title" => "Microtango Options", 31 31 "settings" => "microtango_settings", 32 "version" => "0.9. 5"32 "version" => "0.9.6" 33 33 ); 34 34 -
microtango/trunk/readme.txt
r2358584 r2511130 4 4 Requires at least: 4.8.0 5 5 Requires PHP: 5.6.0 6 Tested up to: 5. 5.07 Stable tag: 0.9. 56 Tested up to: 5.7.0 7 Stable tag: 0.9.6 8 8 License: MIT License 9 9 License URI: http://opensource.org/licenses/MIT … … 93 93 == Changelog == 94 94 95 = 0.9.6 = 96 * Add video function 97 95 98 = 0.9.5 = 96 99 * Fix for missing default value (load css, load template)
Note: See TracChangeset
for help on using the changeset viewer.