Changeset 2989860
- Timestamp:
- 11/06/2023 12:22:16 PM (2 years ago)
- Location:
- eduadmin-booking/trunk
- Files:
-
- 5 edited
-
CHANGELOG.md (modified) (1 diff)
-
PLUGIN-CHECKSUM (modified) (1 diff)
-
eduadmin.php (modified) (1 diff)
-
includes/edu-shortcodes.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
eduadmin-booking/trunk/CHANGELOG.md
r2976806 r2989860 2 2 3 3 All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 5 ## [4.1.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.0.0...v4.1.0) (2023-11-06) 6 7 8 ### Features 9 10 * Added shortcode [eduadmin-programmeinfo] with limited attributes ([b51a1b1](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/b51a1b102282dd7a23cd96aa9e459f4b116f3af0)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506) 11 12 13 ### Documentation 14 15 * **Shortcodes:** Added info about the new shortcode ([4fe4b80](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/4fe4b8015c095841a75cfd5348ece89bfb90944a)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506) 4 16 5 17 ## [4.0.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.1...v4.0.0) (2023-10-10) -
eduadmin-booking/trunk/PLUGIN-CHECKSUM
r2976806 r2989860 1 f225964c4ebc0fdc2db8e51049e166ae 1 6e9d70ce9d2e8ae3adcc8c9e163fd75f -
eduadmin-booking/trunk/eduadmin.php
r2976806 r2989860 10 10 * Description: EduAdmin plugin to allow visitors to book courses at your website 11 11 * Tags: booking, participants, courses, events, eduadmin, lega online 12 * Version: 4. 0.012 * Version: 4.1.0 13 13 * GitHub Plugin URI: multinetinteractive/eduadmin-wordpress 14 14 * GitHub Plugin URI: https://github.com/multinetinteractive/eduadmin-wordpress -
eduadmin-booking/trunk/includes/edu-shortcodes.php
r2976806 r2989860 206 206 207 207 return $str; 208 } 209 210 function eduadmin_get_programmeinfo( $attributes ) { 211 $t = EDU()->start_timer( __METHOD__ ); 212 global $wp_query; 213 $attributes = shortcode_atts( 214 array( 215 'programmeid' => null, 216 'programmename' => null, 217 'programmepublicname' => null, 218 'programmeimage' => null, 219 'programmeimagetext' => null, 220 'courseprice' => null, 221 'eventprice' => null, 222 'programmedescriptionshort' => null, 223 'programmedescription' => null, 224 'programmegoal' => null, 225 'programmetarget' => null, 226 'programmeprerequisites' => null, 227 'courseafter' => null, 228 'programmequote' => null, 229 'courseeventlist' => null, 230 'showmore' => null, 231 'courseattributeid' => null, 232 'courseattributehasvalue' => null, 233 'courseeventlistfiltercity' => null, 234 'pagetitlejs' => null, 235 'bookurl' => null, 236 'courseinquiryurl' => null, 237 'order' => null, 238 'orderby' => null, 239 'ondemand' => false, 240 'allcourses' => false, 241 ), 242 normalize_empty_atts( $attributes ), 243 'eduadmin-programmeinfo' 244 ); 245 $api_key = EDU()->get_option( 'eduadmin-api-key' ); 246 247 $ret_str = ''; 248 249 if ( empty( $api_key ) ) { 250 EDU()->stop_timer( $t ); 251 252 return 'Please complete the configuration: <a href="' . admin_url() . 'admin.php?page=eduadmin-settings">EduAdmin - Api Authentication</a>'; 253 } 254 255 if ( empty( $attributes['programmeid'] ) || str_replace( array( 256 '”', 257 '″', 258 ), '', $attributes['programmeid'] ) <= 0 ) { 259 if ( isset( $wp_query->query_vars['edu_programme'] ) ) { 260 $exploded_id = explode( '_', $wp_query->query_vars['edu_programme'] )[1]; 261 $programme_id = $exploded_id; 262 } else { 263 EDU()->stop_timer( $t ); 264 265 return 'Missing programmeid in attributes'; 266 } 267 } else { 268 $programme_id = str_replace( 269 array( 270 '”', 271 '″', 272 ), 273 '', 274 $attributes['programmeid'] 275 ); 276 } 277 278 if ( ! empty( $programme_id ) ) { 279 $programme = EDUAPI()->OData->Programmes->GetItem( 280 $programme_id, 281 null, 282 'ProgrammeStarts(' . 283 '$filter=' . 284 'HasPublicPriceName' . 285 ' and StatusId eq 1' . 286 ' and (ApplicationOpenDate le ' . date_i18n( 'c' ) . ' or ApplicationOpenDate eq null)' . 287 ' and StartDate ge ' . date_i18n( 'c' ) . 288 ';' . 289 '$orderby=' . 290 'StartDate' . 291 ';' . 292 '$expand=' . 293 'Courses($orderby=ProgrammeCourseSortIndex),Events($expand=EventDates($orderby=StartDate;$select=StartDate,EndDate;);$orderby=ProgrammeCourseSortIndex),PriceNames' . 294 '),PriceNames' 295 ); 296 297 if ( isset( $programme["@error"] ) ) { 298 EDU()->stop_timer( $t ); 299 300 return $programme["@error"]; 301 } 302 303 if ( isset( $attributes['programmename'] ) ) { 304 $ret_str .= $programme['InternaProgrammeName']; 305 } 306 307 if ( isset( $attributes['programmepublicname'] ) ) { 308 $ret_str .= $programme['ProgrammeName']; 309 } 310 311 if ( isset( $attributes['programmeimage'] ) ) { 312 $ret_str .= $programme['ImageUrl']; 313 } 314 315 if ( isset( $attributes['programmeimagetext'] ) ) { 316 $ret_str .= $programme['ImageText']; 317 } 318 319 if ( isset( $attributes['programmedescriptionshort'] ) ) { 320 $ret_str .= $programme['DescriptionShort']; 321 } 322 323 if ( isset( $attributes['programmedescription'] ) ) { 324 $ret_str .= $programme['Description']; 325 } 326 327 if ( isset( $attributes['programmequote'] ) ) { 328 $ret_str .= $programme['Quote']; 329 } 330 331 if ( isset( $attributes['programmegoal'] ) ) { 332 $ret_str .= $programme['CourseGoal']; 333 } 334 335 if ( isset( $attributes['programmetarget'] ) ) { 336 $ret_str .= $programme['TargetGroup']; 337 } 338 339 if ( isset( $attributes['programmeprerequisites'] ) ) { 340 $ret_str .= $programme['Prerequisites']; 341 } 342 343 if ( isset( $attributes['courseafter'] ) ) { 344 $ret_str .= $programme['CourseAfter']; 345 } 346 347 $ret_str .= print_r( $programme, true ); 348 } 349 350 EDU()->stop_timer( $t ); 351 352 return $ret_str; 208 353 } 209 354 … … 820 965 add_shortcode( 'eduadmin-programme-detail', 'eduadmin_get_programme_details' ); 821 966 add_shortcode( 'eduadmin-programme-book', 'eduadmin_get_programme_booking' ); 822 } 967 add_shortcode( 'eduadmin-programmeinfo', 'eduadmin_get_programmeinfo' ); 968 } -
eduadmin-booking/trunk/readme.txt
r2976806 r2989860 4 4 Requires at least: 5.8 5 5 Tested up to: 6.4 6 Stable tag: 4. 0.06 Stable tag: 4.1.0 7 7 Requires PHP: 7.0 8 8 License: GPL3 … … 46 46 The full changelog available on [GitHub](https://github.com/MultinetInteractive/EduAdmin-WordPress/blob/production/CHANGELOG.md) 47 47 48 ### [4.1.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v4.0.0...v4.1.0) (2023-11-06) 49 50 51 #### Features 52 53 * Added shortcode [eduadmin-programmeinfo] with limited attributes ([b51a1b1](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/b51a1b102282dd7a23cd96aa9e459f4b116f3af0)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506) 54 55 56 #### Documentation 57 58 * **Shortcodes:** Added info about the new shortcode ([4fe4b80](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/4fe4b8015c095841a75cfd5348ece89bfb90944a)), closes [#506](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/506) 59 48 60 ### [4.0.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.11.1...v4.0.0) (2023-10-10) 49 61 … … 74 86 * List number of free spots on programme list ([38529a8](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/38529a86da27169961bb53597a0f6069c4721d1c)) 75 87 76 ### [3.10.0](https://github.com/MultinetInteractive/EduAdmin-WordPress/compare/v3.9.2...v3.10.0) (2023-09-29)77 88 78 89 79 #### Features80 81 * Programme starts now show number of spots left (according to settings) ([0117df4](https://github.com/MultinetInteractive/EduAdmin-WordPress/commit/0117df408a557998bd04d467720e51cef331612a)), closes [#498](https://github.com/MultinetInteractive/EduAdmin-WordPress/issues/498)82 83 84
Note: See TracChangeset
for help on using the changeset viewer.