aioseo_disable_canonical_url_amp

aioseo_disable_canonical_url_amp

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: all-in-one-seo-pack.4.8.1.1

apply_filters('aioseo_disable_canonical_url_amp') is found 1 times:

  • /app/Common/Traits/Helpers/WpUri.php line 170
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    // Get rid of /amp at the end of the URL.
    if (
        aioseo()->helpers->isAmpPage() &&
        ! apply_filters( 'aioseo_disable_canonical_url_amp', false )
    ) {
        $url[ $hash ] = preg_replace( '/\/amp$/', '', (string) $url[ $hash ] );
        $url[ $hash ] = preg_replace( '/\/amp\/$/', '/', (string) $url[ $hash ] );
    }
     
    $url[ $hash ] = apply_filters( 'aioseo_canonical_url', $url[ $hash ] );