Changeset 9037
- Timestamp:
- 07/10/2019 11:03:12 PM (5 years ago)
- Location:
- sites/trunk/wordpress.org/public_html/wp-content
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-meeting-posttype/wporg-meeting-posttype.php
r9021 r9037 182 182 'singular_name' => _x( 'Meeting', 'Post Type Singular Name', 'wporg' ), 183 183 'menu_name' => __( 'Meetings', 'wporg' ), 184 'name_admin_bar' => __( 'Meeting s', 'wporg' ),184 'name_admin_bar' => __( 'Meeting', 'wporg' ), 185 185 'parent_item_colon' => __( 'Parent Meeting:', 'wporg' ), 186 186 'all_items' => __( 'All Meetings', 'wporg' ), … … 492 492 $display_more = $query->found_posts - intval( $limit ); 493 493 if ( $display_more > 0 ) { 494 $out .= $display_count === 0 ? '' : ' <a title="Click to view all meetings for this team" href="/meetings #' . esc_attr( $attr['team']) . '">' . sprintf( __( '(+%s more)'), $display_more ) . '</a>';494 $out .= $display_count === 0 ? '' : ' <a title="Click to view all meetings for this team" href="/meetings/#' . esc_attr( strtolower( $attr['team'] ) ) . '">' . sprintf( __( '(+%s more)'), $display_more ) . '</a>'; 495 495 } 496 496 $out .= '</br>'; -
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-makehome/archive-meeting.php
r8923 r9037 5 5 <h2 class="title all"><?php _e( 'Upcoming WordPress Meetings', 'make-wporg' ); ?></h2> 6 6 <h2 class="title team"><?php _e( 'Upcoming Team Meetings', 'make-wporg' ); ?></h2> 7 <a class="team" href="/meetings "><?php _e( 'Show meetings for other teams', 'make-wporg' ); ?></a>7 <a class="team" href="/meetings/"><?php _e( 'Show meetings for other teams', 'make-wporg' ); ?></a> 8 8 </div> 9 9 <table class="schedule"> … … 19 19 <?php while( have_posts() ): the_post(); ?> 20 20 <tr id="post-<?php the_ID(); ?>" <?php post_class(); ?>> 21 <td><?php echo $post->team; ?></td> 21 <td class="team"><?php 22 printf( 23 '<a href="#%s">%s</a>', 24 esc_attr( strtolower( $post->team ) ), 25 $post->team 26 ); 27 ?></td> 22 28 <td><?php 23 29 $title = get_the_title(); … … 118 124 119 125 // Allow client side filtering using # in url 120 var hash = window.location.hash.replace('#',''); 121 if (hash) { 126 var filterByTeam = function(team) { 127 team = team.replace('#',''); 128 122 129 var rowsToRemove = $('.schedule').find('tr td:nth-child(1)').filter(function() { 123 var reg = new RegExp( hash, "i");130 var reg = new RegExp(team, "i"); 124 131 return !reg.test($(this).text()); 125 132 }); 126 133 127 134 for (var i = 0; i < rowsToRemove.length; i++) { 128 $(rowsToRemove[i]).parent(). remove();135 $(rowsToRemove[i]).parent().hide(); 129 136 } 130 137 138 $('.header-section').find('.all').hide(); 131 139 $('.header-section').find('.team').show(); 140 } 141 142 var showAllMeetings = function() { 143 $('.schedule').find('tr').each(function() { 144 $(this).show(); 145 }); 146 147 $('.header-section').find('.team').hide(); 148 $('.header-section').find('.all').show(); 149 } 150 151 if (window.location.hash) { 152 filterByTeam(window.location.hash); 132 153 } 133 154 else { 134 155 $('.header-section').find('.all').show(); 135 156 } 157 158 $('.schedule .team a').click(function() { 159 var team = $(this).attr('href'); 160 filterByTeam(team); 161 window.location.hash = team; 162 return false; 163 }); 164 165 $('.header-section a.team').click(function() { 166 showAllMeetings(); 167 window.location.hash = ''; 168 return false; 169 }); 136 170 137 171 // avoid page flickers on load
Note: See TracChangeset
for help on using the changeset viewer.