diff --git a/includes/common/template-tags.php b/includes/common/template-tags.php
index 01cfddd..d348829 100644
a
|
b
|
function bbp_breadcrumb( $args = array() ) { |
2149 | 2149 | |
2150 | 2150 | // If capable, include a link to edit the tag |
2151 | 2151 | if ( current_user_can( 'manage_topic_tags' ) ) { |
2152 | | $tag_data[] = '<a href="' . bbp_get_topic_tag_edit_link() . '" class="bbp-edit-topic-tag-link">' . __( '(Edit)', 'bbpress' ) . '</a>'; |
| 2152 | $tag_data[] = '<span typeof="v:Breadcrumb"><a href="' . bbp_get_topic_tag_edit_link() . '" class="bbp-edit-topic-tag-link" rel="v:url" property="v:title">' . __( '(Edit)', 'bbpress' ) . '</a></span>'; |
2153 | 2153 | } |
2154 | 2154 | |
2155 | 2155 | // Implode the results of the tag data |
… |
… |
function bbp_breadcrumb( $args = array() ) { |
2170 | 2170 | $r = bbp_parse_args( $args, array( |
2171 | 2171 | |
2172 | 2172 | // HTML |
2173 | | 'before' => '<div class="bbp-breadcrumb"><p>', |
2174 | | 'after' => '</p></div>', |
| 2173 | 'before' => '<div class="bbp-breadcrumb" xmlns:v="http://rdf.data-vocabulary.org/#">', |
| 2174 | 'after' => '</div>', |
2175 | 2175 | |
2176 | 2176 | // Separator |
2177 | 2177 | 'sep' => is_rtl() ? __( '‹', 'bbpress' ) : __( '›', 'bbpress' ), |
… |
… |
function bbp_breadcrumb( $args = array() ) { |
2194 | 2194 | // Current |
2195 | 2195 | 'include_current' => $pre_include_current, |
2196 | 2196 | 'current_text' => $pre_current_text, |
2197 | | 'current_before' => '<span class="bbp-breadcrumb-current">', |
2198 | | 'current_after' => '</span>', |
| 2197 | 'current_before' => '<span typeof="v:Breadcrumb"><span class="bbp-breadcrumb-current" property="v:title">', |
| 2198 | 'current_after' => '</span></span>', |
2199 | 2199 | ), 'get_breadcrumb' ); |
2200 | 2200 | |
2201 | 2201 | /** Ancestors *********************************************************/ |
… |
… |
function bbp_breadcrumb( $args = array() ) { |
2207 | 2207 | |
2208 | 2208 | // Do we want to include a link to home? |
2209 | 2209 | if ( !empty( $r['include_home'] ) || empty( $r['home_text'] ) ) { |
2210 | | $crumbs[] = '<a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home">' . $r['home_text'] . '</a>'; |
| 2210 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . trailingslashit( home_url() ) . '" class="bbp-breadcrumb-home" rel="v:url" property="v:title">' . $r['home_text'] . '</a></span>'; |
2211 | 2211 | } |
2212 | 2212 | |
2213 | 2213 | // Do we want to include a link to the forum root? |
… |
… |
function bbp_breadcrumb( $args = array() ) { |
2224 | 2224 | } |
2225 | 2225 | |
2226 | 2226 | // Add the breadcrumb |
2227 | | $crumbs[] = '<a href="' . $root_url . '" class="bbp-breadcrumb-root">' . $r['root_text'] . '</a>'; |
| 2227 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . $root_url . '" class="bbp-breadcrumb-root" rel="v:url" property="v:title">' . $r['root_text'] . '</a></span>'; |
2228 | 2228 | } |
2229 | 2229 | |
2230 | 2230 | // Ancestors exist |
… |
… |
function bbp_breadcrumb( $args = array() ) { |
2245 | 2245 | |
2246 | 2246 | // Forum |
2247 | 2247 | case bbp_get_forum_post_type() : |
2248 | | $crumbs[] = '<a href="' . bbp_get_forum_permalink( $parent->ID ) . '" class="bbp-breadcrumb-forum">' . bbp_get_forum_title( $parent->ID ) . '</a>'; |
| 2248 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . bbp_get_forum_permalink( $parent->ID ) . '" class="bbp-breadcrumb-forum" rel="v:url" property="v:title">' . bbp_get_forum_title( $parent->ID ) . '</a></span>'; |
2249 | 2249 | break; |
2250 | 2250 | |
2251 | 2251 | // Topic |
2252 | 2252 | case bbp_get_topic_post_type() : |
2253 | | $crumbs[] = '<a href="' . bbp_get_topic_permalink( $parent->ID ) . '" class="bbp-breadcrumb-topic">' . bbp_get_topic_title( $parent->ID ) . '</a>'; |
| 2253 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . bbp_get_topic_permalink( $parent->ID ) . '" class="bbp-breadcrumb-topic" rel="v:url" property="v:title">' . bbp_get_topic_title( $parent->ID ) . '</a></span>'; |
2254 | 2254 | break; |
2255 | 2255 | |
2256 | 2256 | // Reply (Note: not in most themes) |
2257 | 2257 | case bbp_get_reply_post_type() : |
2258 | | $crumbs[] = '<a href="' . bbp_get_reply_permalink( $parent->ID ) . '" class="bbp-breadcrumb-reply">' . bbp_get_reply_title( $parent->ID ) . '</a>'; |
| 2258 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . bbp_get_reply_permalink( $parent->ID ) . '" class="bbp-breadcrumb-reply" rel="v:url" property="v:title">' . bbp_get_reply_title( $parent->ID ) . '</a></span>'; |
2259 | 2259 | break; |
2260 | 2260 | |
2261 | 2261 | // WordPress Post/Page/Other |
2262 | 2262 | default : |
2263 | | $crumbs[] = '<a href="' . get_permalink( $parent->ID ) . '" class="bbp-breadcrumb-item">' . get_the_title( $parent->ID ) . '</a>'; |
| 2263 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . get_permalink( $parent->ID ) . '" class="bbp-breadcrumb-item" rel="v:url" property="v:title">' . get_the_title( $parent->ID ) . '</a></span>'; |
2264 | 2264 | break; |
2265 | 2265 | } |
2266 | 2266 | } |
2267 | 2267 | |
2268 | 2268 | // Edit topic tag |
2269 | 2269 | } elseif ( bbp_is_topic_tag_edit() ) { |
2270 | | $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>'; |
| 2270 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . get_term_link( bbp_get_topic_tag_id(), bbp_get_topic_tag_tax_id() ) . '" class="bbp-breadcrumb-topic-tag" rel="v:url" property="v:title">' . sprintf( __( 'Topic Tag: %s', 'bbpress' ), bbp_get_topic_tag_name() ) . '</a></span>'; |
2271 | 2271 | |
2272 | 2272 | // Search |
2273 | 2273 | } elseif ( bbp_is_search() && bbp_get_search_terms() ) { |
2274 | | $crumbs[] = '<a href="' . home_url( bbp_get_search_slug() ) . '" class="bbp-breadcrumb-search">' . __( 'Search', 'bbpress' ) . '</a>'; |
| 2274 | $crumbs[] = '<span typeof="v:Breadcrumb"><a href="' . home_url( bbp_get_search_slug() ) . '" class="bbp-breadcrumb-search" rel="v:url" property="v:title">' . __( 'Search', 'bbpress' ) . '</a></span>'; |
2275 | 2275 | } |
2276 | 2276 | |
2277 | 2277 | /** Current ***********************************************************/ |