Changeset 781 for sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
- Timestamp:
- 08/12/2014 06:26:08 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-developer/inc/template-tags.php
r773 r781 623 623 624 624 /** 625 * Retrieve either the starting or ending line number. 626 * 627 * @param int $post_id Optional. The post ID. 628 * @param string $type Optional. Either 'start' for starting line number, or 'end' for ending line number. 629 * 630 * @return int 631 */ 632 function get_line_number( $post_id = null, $type = 'start' ) { 633 634 $post_id = empty( $post_id ) ? get_the_ID() : $post_id; 635 $meta_key = ( 'end' == $type ) ? '_wp-parser_end_line_num' : '_wp-parser_line_num'; 636 637 return (int) get_post_meta( $post_id, $meta_key, true ); 638 } 639 640 /** 625 641 * Retrieve the URL to the actual source file and line. 626 642 *
Note: See TracChangeset
for help on using the changeset viewer.