Changeset 1351608
- Timestamp:
- 02/16/2016 09:41:11 AM (10 years ago)
- Location:
- weekly-class-schedule/trunk
- Files:
-
- 3 edited
-
includes/wcs3_output.php (modified) (1 diff)
-
includes/wcs3_schedule.php (modified) (3 diffs)
-
js/wcs3_common.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
weekly-class-schedule/trunk/includes/wcs3_output.php
r1193555 r1351608 194 194 $template = str_replace( '[end hour]', $class->end_hour, $template ); 195 195 $template = str_replace( '[notes]', $class->notes, $template ); 196 197 // TODO: replace [class_link], etc. 196 198 197 199 return $template; -
weekly-class-schedule/trunk/includes/wcs3_schedule.php
r1170953 r1351608 122 122 $meta_table = $wpdb->prefix . 'postmeta'; 123 123 124 $query = "SELECT 124 $query = "SELECT 125 125 c.post_title AS class_title, c.post_content AS class_desc, 126 126 i.post_title AS instructor_title, i.post_content AS instructor_desc, … … 140 140 $meta_table ); 141 141 142 // Add IDs by default (post filter) 143 $pattern = '/^\s?SELECT/'; 144 $replacement = "SELECT c.ID AS class_id, i.ID as instructor_id, l.ID as location_id,"; 145 $query = preg_replace($pattern, $replacement, $query); 146 142 147 // Filter by location 143 148 if ( $location != 'all' ) { … … 167 172 // Prep CSS class name 168 173 wcs3_format_class_object( $class, $format ); 169 174 175 $class->class_link = get_permalink($class->class_id); 176 $class->instructor_link = get_permalink($class->instructor_id); 177 $class->location_link = get_permalink($class->location_id); 178 170 179 if ( $layout == 'list' ) { 171 180 $grouped[$class->weekday][] = $class; -
weekly-class-schedule/trunk/js/wcs3_common.js
r853343 r1351608 30 30 template = template.replace('[end hour]', data.end_hour); 31 31 template = template.replace('[notes]', data.notes); 32 32 33 template = template.replace('[class_link]', "<a href='" + data.class_link + "' target=_blank>" + data.class_title + "</a>"); 34 template = template.replace('[instructor_link]', "<a href='" + data.instructor_link + "' target=_blank>" + data.instructor_title + "</a>"); 35 template = template.replace('[location_link]', "<a href='" + data.location_link + "' target=_blank>" + data.location_title + "</a>"); 36 33 37 return template; 34 38 },
Note: See TracChangeset
for help on using the changeset viewer.