-function get_the_title( $id = 0 ) {
- $post = &get_post($id);
-
- $title = isset($post->post_title) ? $post->post_title : '';
- $id = isset($post->ID) ? $post->ID : (int) $id;
-
- if ( !is_admin() ) {
- if ( !empty($post->post_password) ) {
- $protected_title_format = apply_filters('protected_title_format', __('Protected: %s'));
- $title = sprintf($protected_title_format, $title);
- } else if ( isset($post->post_status) && 'private' == $post->post_status ) {
- $private_title_format = apply_filters('private_title_format', __('Private: %s'));
- $title = sprintf($private_title_format, $title);
+function get_the_title( $post = 0 ) {
+ $post = get_post( $post );
+
+ $title = isset( $post->post_title ) ? $post->post_title : '';
+ $id = isset( $post->ID ) ? $post->ID : 0;
+
+ if ( ! is_admin() ) {
+ if ( ! empty( $post->post_password ) ) {
+ $protected_title_format = apply_filters( 'protected_title_format', __( 'Protected: %s' ) );
+ $title = sprintf( $protected_title_format, $title );
+ } else if ( isset( $post->post_status ) && 'private' == $post->post_status ) {
+ $private_title_format = apply_filters( 'private_title_format', __( 'Private: %s' ) );
+ $title = sprintf( $private_title_format, $title );