Changeset 10458 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
- Timestamp:
- 11/20/2020 12:07:27 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/functions.php
r10422 r10458 202 202 function wporg_post_type_is_lesson() { 203 203 return get_post_type() == 'lesson-plan'; 204 }205 206 /**207 * Returns the custom field view_lesson_plan_slides_url, if it doesn't exists returns false208 *209 * @return string|bool210 */211 function wporg_get_slides_url() {212 return get_post_meta( get_the_ID(), 'view_lesson_plan_slides_url', true );213 }214 215 /**216 * Returns the custom field download_lesson_plan_slides_url, if it doesn't exists returns false217 *218 * @return string|bool219 */220 function wporg_get_download_slides_url() {221 return get_post_meta( get_the_ID(), 'download_lesson_plan_slides_url', true );222 204 } 223 205 … … 622 604 return $siblings[ $index ] ?? false; 623 605 } 606 607 /** 608 * Robots "noindex" rules for specific parts of the Learn site. 609 * 610 * @param bool $noindex 611 * 612 * @return bool 613 */ 614 function wporg_learn_noindex( $noindex ) { 615 if ( is_singular( 'quiz' ) ) { 616 $noindex = true; 617 } 618 619 return $noindex; 620 } 621 add_filter( 'wporg_noindex_request', 'wporg_learn_noindex' );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)