Changeset 3235
- Timestamp:
- 05/24/2016 09:04:32 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/handbook/inc/template-tags.php
r3234 r3235 79 79 return false; 80 80 } 81 82 /** 83 * Returns the home URL for the current handbook post type. 84 * 85 * @return string|false URL on success, false on failure. 86 */ 87 function wporg_get_current_handbook_home_url() { 88 $handbook = wporg_get_current_handbook(); 89 $url = false; 90 91 if ( $handbook ) { 92 $page = get_page_by_path( $handbook, OBJECT, $handbook ); 93 if ( $page ) { 94 $url = get_permalink( $page ); 95 } else { 96 $url = get_post_type_archive_link( $handbook ); 97 } 98 } 99 100 return $url; 101 }
Note: See TracChangeset
for help on using the changeset viewer.