ap_canonical_url()
Description #
Return canonical URL of current page.
Source #
File: includes/functions.php
function ap_canonical_url() { $canonical_url = ap_get_link_to( get_query_var( 'ap_page' ) ); if ( is_question() ) { $canonical_url = get_permalink( get_question_id() ); } /** * Filter AnsPress canonical URL. * * @param string $canonical_url Current URL. * @return string * @since 3.0.0 */ $canonical_url = apply_filters( 'ap_canonical_url', $canonical_url ); return esc_url( $canonical_url ); }
Expand full source code Collapse full source code View on GitHub: includes/functions.php:1349
Add your comment