| @@ -16,19 +16,8 @@ | ||
| 16 | 16 | $p = new FeedWordPressLocalPost($id); |
| 17 | 17 | return $p->is_syndicated(); |
| 18 | 18 | } /* function is_syndicated() */ |
| 19 | 19 | |
| 20 | -/** | |
| 21 | - * feedwordpress_display_url: format a fully-formed URL for display in the | |
| 22 | - * FeedWordPress admin interface, abbreviating it (e.g.: input of | |
| 23 | - * `http://feedwordpress.radgeek.com/feed/` will be shortened to | |
| 24 | - * `feedwordpress.radgeek.com/feed/`) | |
| 25 | - * | |
| 26 | - * @param string $url provides the URL to display | |
| 27 | - * @param int $before a number of characters to preserve from the beginning of the URL if it must be shortened | |
| 28 | - * @param int $after a number of characters to preserve from the end of the URL if it must be shortened | |
| 29 | - * @return string containing an abbreviated display form of the URL (e.g.: `feedwordpress.radgeek.net/feed`) | |
| 30 | - */ | |
| 31 | 20 | function feedwordpress_display_url ($url, $before = 60, $after = 0) { |
| 32 | 21 | $bits = parse_url($url); |
| 33 | 22 | |
| 34 | 23 | // Strip out crufty subdomains |
| @@ -43,9 +32,9 @@ | ||
| 43 | 32 | .(isset($uri_bits['port'])?':'.$uri_bits['port']:'') |
| 44 | 33 | .(isset($bits['query'])?'?'.$bits['query']:''); |
| 45 | 34 | |
| 46 | 35 | if (strlen($url) > ($before+$after)) : |
| 47 | - $url = substr($url, 0, $before).'…'.substr($url, 0 - $after, $after); | |
| 36 | + $url = substr($url, 0, $before).'.'.substr($url, 0 - $after, $after); | |
| 48 | 37 | endif; |
| 49 | 38 | |
| 50 | 39 | return $url; |
| 51 | 40 | } /* feedwordpress_display_url () */ |
| @@ -60,9 +49,9 @@ | ||
| 60 | 49 | return $p->syndication_source_link($original); |
| 61 | 50 | } /* function get_syndication_source_link() */ |
| 62 | 51 | |
| 63 | 52 | function the_syndication_source_link ($original = NULL, $id = NULL) { |
| 64 | - echo esc_url( get_syndication_source_link($original, $id) ); | |
| 53 | + echo get_syndication_source_link($original, $id); | |
| 65 | 54 | } /* function the_syndication_source_link() */ |
| 66 | 55 | |
| 67 | 56 | function get_syndication_source ($original = NULL, $id = NULL) { |
| 68 | 57 | $p = new FeedWordPressLocalPost($id); |
| @@ -69,9 +58,9 @@ | ||
| 69 | 58 | return $p->syndication_source($original); |
| 70 | 59 | } /* function get_syndication_source() */ |
| 71 | 60 | |
| 72 | 61 | function the_syndication_source ($original = NULL, $id = NULL) { |
| 73 | - echo esc_html( get_syndication_source($original, $id) ); | |
| 62 | + echo get_syndication_source($original, $id); | |
| 74 | 63 | } /* function the_syndication_source () */ |
| 75 | 64 | |
| 76 | 65 | function get_syndication_feed ($original = NULL, $id = NULL) { |
| 77 | 66 | $p = new FeedWordPressLocalPost($id); |
| @@ -78,18 +67,18 @@ | ||
| 78 | 67 | return $p->syndication_feed($original); |
| 79 | 68 | } /* function get_syndication_feed() */ |
| 80 | 69 | |
| 81 | 70 | function the_syndication_feed ($original = NULL, $id = NULL) { |
| 82 | - echo esc_url( get_syndication_feed($original, $id) ); | |
| 71 | + echo get_syndication_feed($original, $id); | |
| 83 | 72 | } /* function the_syndication_feed() */ |
| 84 | 73 | |
| 85 | 74 | function get_syndication_feed_guid ($original = NULL, $id = NULL) { |
| 86 | 75 | $p = new FeedWordPressLocalPost($id); |
| 87 | - return $p->syndication_feed_guid( $original ); | |
| 76 | + return $p->syndication_feed_guid($original); | |
| 88 | 77 | } /* function get_syndication_feed_guid () */ |
| 89 | 78 | |
| 90 | 79 | function the_syndication_feed_guid ($original = NULL, $id = NULL) { |
| 91 | - echo esc_html( get_syndication_feed_guid( $original, $id ) ); | |
| 80 | + echo get_syndication_feed_guid($original, $id); | |
| 92 | 81 | } /* function the_syndication_feed_guid () */ |
| 93 | 82 | |
| 94 | 83 | function get_syndication_feed_id ($id = NULL) { |
| 95 | 84 | $p = new FeedWordPressLocalPost($id); |
| @@ -96,9 +85,9 @@ | ||
| 96 | 85 | return $p->feed_id(); |
| 97 | 86 | } /* function get_syndication_feed_id () */ |
| 98 | 87 | |
| 99 | 88 | function the_syndication_feed_id ($id = NULL) { |
| 100 | - echo esc_html( get_syndication_feed_id($id) ); | |
| 89 | + echo get_syndication_feed_id($id); | |
| 101 | 90 | } /* function the_syndication_feed_id () */ |
| 102 | 91 | |
| 103 | 92 | function get_syndication_feed_object ($id = NULL) { |
| 104 | 93 | $p = new FeedWordPressLocalPost($id); |
| @@ -120,9 +109,9 @@ | ||
| 120 | 109 | return $p->syndication_permalink(); |
| 121 | 110 | } /* function get_syndication_permalink () */ |
| 122 | 111 | |
| 123 | 112 | function the_syndication_permalink ($id = NULL) { |
| 124 | - echo esc_url( get_syndication_permalink($id) ); | |
| 113 | + echo get_syndication_permalink($id); | |
| 125 | 114 | } /* function the_syndication_permalink () */ |
| 126 | 115 | |
| 127 | 116 | /** |
| 128 | 117 | * get_local_permalink: returns a string containing the internal permalink |
| @@ -140,14 +129,14 @@ | ||
| 140 | 129 | * @global $feedwordpress_the_original_permalink |
| 141 | 130 | * |
| 142 | 131 | * @since 2010.0217 |
| 143 | 132 | */ |
| 144 | -function get_local_permalink ( $id = NULL ) { | |
| 133 | +function get_local_permalink ($id = NULL) { | |
| 145 | 134 | global $feedwordpress_the_original_permalink; |
| 146 | 135 | |
| 147 | 136 | // get permalink, and thus activate filter and force global to be filled |
| 148 | 137 | // with original URL. |
| 149 | - $url = get_permalink( $id ); | |
| 138 | + $url = get_permalink($id); | |
| 150 | 139 | return $feedwordpress_the_original_permalink; |
| 151 | 140 | } /* get_local_permalink() */ |
| 152 | 141 | |
| 153 | 142 | /** |
| @@ -160,8 +149,8 @@ | ||
| 160 | 149 | * @uses apply_filters |
| 161 | 150 | * |
| 162 | 151 | * @since 2010.0217 |
| 163 | 152 | */ |
| 164 | -function the_local_permalink ( $id = NULL ) { | |
| 165 | - print esc_url( apply_filters( 'the_permalink', get_local_permalink( $id ) ) ); | |
| 153 | +function the_local_permalink ($id = NULL) { | |
| 154 | + print apply_filters('the_permalink', get_local_permalink($id)); | |
| 166 | 155 | } /* function the_local_permalink() */ |
| 167 | 156 | |