Changeset 3357920
- Timestamp:
- 09/08/2025 12:57:39 PM (7 months ago)
- Location:
- cs-integration
- Files:
-
- 84 added
- 4 edited
-
tags/1.0.6 (added)
-
tags/1.0.6/LICENSE.txt (added)
-
tags/1.0.6/README.md (added)
-
tags/1.0.6/README.txt (added)
-
tags/1.0.6/admin (added)
-
tags/1.0.6/admin/class-cs-integration-admin.php (added)
-
tags/1.0.6/admin/css (added)
-
tags/1.0.6/admin/css/cs-integration-admin.css (added)
-
tags/1.0.6/admin/index.php (added)
-
tags/1.0.6/admin/js (added)
-
tags/1.0.6/admin/js/cs-integration-admin.js (added)
-
tags/1.0.6/admin/partials (added)
-
tags/1.0.6/admin/partials/cs-integration-admin-display.php (added)
-
tags/1.0.6/assets (added)
-
tags/1.0.6/assets/arrow-back.svg (added)
-
tags/1.0.6/assets/arrow-forward.svg (added)
-
tags/1.0.6/assets/calendar.svg (added)
-
tags/1.0.6/assets/caret-down-filled.svg (added)
-
tags/1.0.6/assets/clock.svg (added)
-
tags/1.0.6/assets/close.svg (added)
-
tags/1.0.6/assets/icon-256x256.png (added)
-
tags/1.0.6/assets/location.svg (added)
-
tags/1.0.6/cs-integration.php (added)
-
tags/1.0.6/fonts (added)
-
tags/1.0.6/fonts/glyphs (added)
-
tags/1.0.6/fonts/glyphs/LICENSE.txt (added)
-
tags/1.0.6/fonts/glyphs/README.txt (added)
-
tags/1.0.6/fonts/glyphs/config.json (added)
-
tags/1.0.6/fonts/glyphs/css (added)
-
tags/1.0.6/fonts/glyphs/css/animation.css (added)
-
tags/1.0.6/fonts/glyphs/css/glyphs-codes.css (added)
-
tags/1.0.6/fonts/glyphs/css/glyphs-embedded.css (added)
-
tags/1.0.6/fonts/glyphs/css/glyphs-ie7-codes.css (added)
-
tags/1.0.6/fonts/glyphs/css/glyphs-ie7.css (added)
-
tags/1.0.6/fonts/glyphs/css/glyphs.css (added)
-
tags/1.0.6/fonts/glyphs/demo.html (added)
-
tags/1.0.6/fonts/glyphs/font (added)
-
tags/1.0.6/fonts/glyphs/font/glyphs.eot (added)
-
tags/1.0.6/fonts/glyphs/font/glyphs.svg (added)
-
tags/1.0.6/fonts/glyphs/font/glyphs.ttf (added)
-
tags/1.0.6/fonts/glyphs/font/glyphs.woff (added)
-
tags/1.0.6/fonts/glyphs/font/glyphs.woff2 (added)
-
tags/1.0.6/includes (added)
-
tags/1.0.6/includes/class-cs-integration-activator.php (added)
-
tags/1.0.6/includes/class-cs-integration-deactivator.php (added)
-
tags/1.0.6/includes/class-cs-integration-i18n.php (added)
-
tags/1.0.6/includes/class-cs-integration-loader.php (added)
-
tags/1.0.6/includes/class-cs-integration.php (added)
-
tags/1.0.6/includes/index.php (added)
-
tags/1.0.6/index.php (added)
-
tags/1.0.6/languages (added)
-
tags/1.0.6/languages/cs-integration.pot (added)
-
tags/1.0.6/languages/en_GB.mo (added)
-
tags/1.0.6/languages/en_GB.po (added)
-
tags/1.0.6/languages/fr.mo (added)
-
tags/1.0.6/languages/fr.po (added)
-
tags/1.0.6/public (added)
-
tags/1.0.6/public/class-cs-integration-public.php (added)
-
tags/1.0.6/public/css (added)
-
tags/1.0.6/public/css/cs-integration-public.css (added)
-
tags/1.0.6/public/index.php (added)
-
tags/1.0.6/public/js (added)
-
tags/1.0.6/public/js/cs-integration-public-orig.js (added)
-
tags/1.0.6/public/js/cs-integration-public.js (added)
-
tags/1.0.6/public/partials (added)
-
tags/1.0.6/public/partials/cs-integration-public-display.php (added)
-
tags/1.0.6/public/shortcodes (added)
-
tags/1.0.6/public/shortcodes/class-churchsuite.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-calendar-event-view.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-calendar-shortcode.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-compact-event-view.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-event-card-view.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-event-cards-shortcode.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-event-list-shortcode.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-event.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-group-view.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-group.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-item.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-json-api.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-shortcode.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-smallgroups-shortcode.php (added)
-
tags/1.0.6/public/shortcodes/class-cs-view.php (added)
-
tags/1.0.6/public/shortcodes/index.php (added)
-
tags/1.0.6/uninstall.php (added)
-
trunk/README.md (modified) (3 diffs)
-
trunk/README.txt (modified) (3 diffs)
-
trunk/cs-integration.php (modified) (1 diff)
-
trunk/public/shortcodes/class-cs-event-list-shortcode.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cs-integration/trunk/README.md
r3354836 r3357920 4 4 * Requires at least: 6.4 5 5 * Tested up to: 6.8 6 * Stable tag: 1.0. 56 * Stable tag: 1.0.6 7 7 * License: GPLv2 or later 8 8 … … 184 184 You can use a shortcode parameter for showing a particular number of events: 185 185 186 [cs-events-list church_name="mychurch" num_results="6"] 186 [cs-events-list church_name="mychurch" num_results="6"] 187 188 ### Events List is not showing any results 189 190 By default the Events List only looks ahead 5 days. If your future events 191 are beyond that nothing will show. So just use the days_ahead attribute: 192 193 [cs-events-list church_name="mychurch" num_results="6" days_ahead="30"] 187 194 188 195 ### I want to change how the output looks: … … 202 209 ## Changelog 203 210 211 ### 1.0.6 212 213 **2025-09-08** 214 * Added a new attribute 'days_ahead' to cs-event-list so that you can specify 215 more than the default 5 days looking ahead for events. Use like this: 216 217 [cs-event-list church_name="mychurch" num_results="5" days_ahead="30"] 218 204 219 ### 1.0.5 205 220 -
cs-integration/trunk/README.txt
r3354836 r3357920 4 4 * Requires at least: 6.4 5 5 * Tested up to: 6.8 6 * Stable tag: 1.0. 56 * Stable tag: 1.0.6 7 7 * License: GPLv2 or later 8 8 … … 186 186 [cs-events-list church_name="mychurch" num_results="6"] 187 187 188 = Events List is not showing any results 189 190 By default the Events List only looks ahead 5 days. If your future events 191 are beyond that nothing will show. So just use the days_ahead attribute: 192 193 [cs-events-list church_name="mychurch" num_results="6" days_ahead="30"] 194 188 195 = I want to change how the output looks: = 189 196 … … 201 208 202 209 == Changelog == 210 211 = 1.0.6 = 212 213 **2025-09-08** 214 * Added a new attribute 'days_ahead' to cs-event-list so that you can specify 215 more than the default 5 days looking ahead for events. Use like this: 216 217 [cs-event-list church_name="mychurch" num_results="5" days_ahead="30"] 203 218 204 219 = 1.0.5 = -
cs-integration/trunk/cs-integration.php
r3354836 r3357920 20 20 * Plugin URI: https://github.com/AlwynBarry/cs-integration 21 21 * Description: CS Integration provides shortcodes to request and display JSON data from the public JSON ChurchSuite feeds. 22 * Version: 1.0. 522 * Version: 1.0.6 23 23 * Author: Alwyn Barry 24 24 * Author URI: https://github.com/AlwynBarry/ -
cs-integration/trunk/public/shortcodes/class-cs-event-list-shortcode.php
r3257115 r3357920 135 135 * church_name="mychurch" is required - with "mychurch" replaced with your church name 136 136 * num_results="10" is strongly advised - int range 0..n; 0=all, 1..n = number of events specificed 137 * TO DO - replace default end date with a number_of_days parameter 137 * By default this only lists dates from within the next 5 days. To override this you 138 * can add the attribute 'days_ahead' (e.g. days_ahead="30") to look ahead further. 139 * Do note, however, that if you have a lot of upcoming events the response can be slow. 138 140 */ 139 141 function cs_event_list_shortcode( $atts ) { 140 142 // Defaulting the end date to anything decreases the JSON request time considerably 141 $date = new \DateTime(); 142 $five_days = \DateInterval::createFromDateString('5 days'); 143 $date->add($five_days); 143 $date = new \DateTime(); 144 if ( isset( $atts[ 'days_ahead' ] ) && ( intval( $atts[ 'days_ahead' ] ) > 0 ) ) { 145 $days_ahead = \DateInterval::createFromDateString( $atts[ 'days_ahead' ] . ' days' ); 146 } else { 147 $days_ahead = \DateInterval::createFromDateString('5 days'); 148 } 149 $date->add($days_ahead); 144 150 $atts[ 'date_end' ] ??= $date->format( 'Y-m-d' ); 145 151 return ( new Cs_Event_List_Shortcode( $atts ) )->run_shortcode();
Note: See TracChangeset
for help on using the changeset viewer.