Changeset 11336
- Timestamp:
- 11/18/2021 03:11:52 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
r11323 r11336 301 301 if ( $query->is_main_query() && $query->is_search() ) { 302 302 $public_post_types = array_keys( get_post_types( array( 'public' => true ) ) ); 303 $omit_from_search = array( 'attachment', 'lesson', 'quiz', 'sensei_message' );303 $omit_from_search = array( 'attachment', 'lesson', 'quiz', 'sensei_message', 'meeting' ); 304 304 $searchable_post_types = array_diff( $public_post_types, $omit_from_search ); 305 305 … … 985 985 */ 986 986 add_filter( 'jetpack_news_sitemap_generate', '__return_false' ); 987 988 /** 989 * Redirect meeting posts to associated link 990 * 991 * @return void 992 */ 993 function wporg_learn_redirect_meetings() { 994 global $post; 995 996 if ( is_singular( array( 'meeting' ) ) ) { 997 998 if ( ! empty( $post->ID ) ) { 999 1000 $redirect = wp_http_validate_url( get_post_meta( $post->ID, 'link', true ) ); 1001 1002 if ( $redirect && wp_redirect( $redirect ) ) { 1003 exit; 1004 } 1005 } 1006 } 1007 1008 } 1009 add_action( 'template_redirect', 'wporg_learn_redirect_meetings' );
Note: See TracChangeset
for help on using the changeset viewer.