Changeset 5040 for trunk/includes/common/template-tags.php
- Timestamp:
- 07/18/2013 07:16:23 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/includes/common/template-tags.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/common/template-tags.php
r5037 r5040 2177 2177 // If capable, include a link to edit the tag 2178 2178 if ( current_user_can( 'manage_topic_tags' ) ) { 2179 $tag_data[] = '<a href="' . bbp_get_topic_tag_edit_link() . '" class="bbp-edit-topic-tag-link">' . esc_html__( '(Edit)', 'bbpress' ) . '</a>';2179 $tag_data[] = '<a href="' . esc_url( bbp_get_topic_tag_edit_link() ) . '" class="bbp-edit-topic-tag-link">' . esc_html__( '(Edit)', 'bbpress' ) . '</a>'; 2180 2180 } 2181 2181 … … 2252 2252 2253 2253 // Add the breadcrumb 2254 $crumbs[] = '<a href="' . $root_url. '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>';2254 $crumbs[] = '<a href="' . esc_url( $root_url ) . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>'; 2255 2255 } 2256 2256 … … 2273 2273 // Forum 2274 2274 case bbp_get_forum_post_type() : 2275 $crumbs[] = '<a href="' . bbp_get_forum_permalink( $parent->ID) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $parent->ID ) . '</a>';2275 $crumbs[] = '<a href="' . esc_url( bbp_get_forum_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $parent->ID ) . '</a>'; 2276 2276 break; 2277 2277 2278 2278 // Topic 2279 2279 case bbp_get_topic_post_type() : 2280 $crumbs[] = '<a href="' . bbp_get_topic_permalink( $parent->ID) . '" class="bbp-breadcrumb-topic">' . bbp_get_topic_title( $parent->ID ) . '</a>';2280 $crumbs[] = '<a href="' . esc_url( bbp_get_topic_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-topic">' . bbp_get_topic_title( $parent->ID ) . '</a>'; 2281 2281 break; 2282 2282 2283 2283 // Reply (Note: not in most themes) 2284 2284 case bbp_get_reply_post_type() : 2285 $crumbs[] = '<a href="' . bbp_get_reply_permalink( $parent->ID) . '" class="bbp-breadcrumb-reply">' . bbp_get_reply_title( $parent->ID ) . '</a>';2285 $crumbs[] = '<a href="' . esc_url( bbp_get_reply_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-reply">' . bbp_get_reply_title( $parent->ID ) . '</a>'; 2286 2286 break; 2287 2287 2288 2288 // WordPress Post/Page/Other 2289 2289 default : 2290 $crumbs[] = '<a href="' . get_permalink( $parent->ID) . '" class="bbp-breadcrumb-item">' . get_the_title( $parent->ID ) . '</a>';2290 $crumbs[] = '<a href="' . esc_url( get_permalink( $parent->ID ) ) . '" class="bbp-breadcrumb-item">' . get_the_title( $parent->ID ) . '</a>'; 2291 2291 break; 2292 2292 } … … 2295 2295 // Edit topic tag 2296 2296 } elseif ( bbp_is_topic_tag_edit() ) { 2297 $crumbs[] = '<a href="' . get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) . '" class="bbp-breadcrumb-topic-tag">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>';2297 $crumbs[] = '<a href="' . esc_url( get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) ) . '" class="bbp-breadcrumb-topic-tag">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a>'; 2298 2298 2299 2299 // Search 2300 2300 } elseif ( bbp_is_search() && bbp_get_search_terms() ) { 2301 $crumbs[] = '<a href="' . bbp_get_search_url() . '" class="bbp-breadcrumb-search">' . esc_html__( 'Search', 'bbpress' ) . '</a>';2301 $crumbs[] = '<a href="' . esc_url( bbp_get_search_url() ) . '" class="bbp-breadcrumb-search">' . esc_html__( 'Search', 'bbpress' ) . '</a>'; 2302 2302 } 2303 2303
Note: See TracChangeset
for help on using the changeset viewer.