Changeset 10146 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
- Timestamp:
- 08/11/2020 09:43:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
r10131 r10146 55 55 ), 56 56 ); 57 58 // Get all the lesson plans associated to 57 58 // Get all the lesson plans associated to 59 59 return new WP_Query( $args ); 60 60 } … … 96 96 function wporg_get_cat_or_default_slug() { 97 97 $cat = wporg_get_filter_category(); 98 98 99 99 if( empty( $cat ) ) { 100 100 return wporg_get_default_cat()->slug; … … 110 110 * @param string $id Id of the post 111 111 * @param string $tax_slug The slug for the custom taxonomy 112 * @return string 112 * @return string 113 113 */ 114 114 function get_taxonomy_values( $id, $tax_slug ){ … … 186 186 187 187 /** 188 * Submit CTA button 189 * 190 * @package WPBBP 191 */ 192 function wporg_submit_idea_cta() { ?> 188 * Submit CTA button 189 * 190 * @package WPBBP 191 */ 192 function wporg_submit_idea_cta() { ?> 193 193 194 194 <section class="submit-idea-cta"> 195 195 <div class="content-icon"><span class="dashicons dashicons-lightbulb"></span></div> 196 <h 3><?php _e( 'Have an Idea for a Workshop? Let us know!' ); ?></h3>197 <a class="button button-primary button-large" href=" <?php echo esc_url( site_url( '/submit-an-idea/' ) ); ?>"><?php _e( 'Submit an Idea' ); ?></a>196 <h2><?php _e( 'Have an Idea for a Workshop? Let us know!' ); ?></h2> 197 <a class="button button-primary button-large" href="https://wordcampcentral.survey.fm/learn-wordpress-workshop-application"><?php _e( 'Submit an Idea' ); ?></a> 198 198 </section> 199 199 200 <?php } 200 <?php } 201 201 202 202 /** … … 213 213 $args = array_merge( $args, $options ); 214 214 215 } 215 } 216 216 217 217 $query = new \WP_Query( $args ); 218 218 return $query; 219 219 } 220 221 /** 222 * Returns the presenters for the workshop. 223 * 224 * @param WP_Post|int $workshop 225 * 226 * @return WP_User[]|array 227 */ 228 function wporg_get_workshop_presenters( $workshop = null ) { 229 $post = get_post( $workshop ); 230 $presenters = get_post_meta( $post->ID, 'presenter_wporg_username' ); 231 $wp_users = array(); 232 233 foreach ( $presenters as $presenter ) { 234 $wp_user = get_user_by( 'login', $presenter ); 235 236 if ( $wp_user ) { 237 array_push( $wp_users, $wp_user ); 238 } 239 } 240 241 return $wp_users; 242 }
Note: See TracChangeset
for help on using the changeset viewer.