aioseo_canonical_url

aioseo_canonical_url

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

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

apply_filters('aioseo_canonical_url') is found 3 times:

  • /app/Common/Traits/Helpers/WpUri.php line 100
    			return $url[ $hash ];
    		}
    
    		if ( is_404() || is_search() ) {
    			$url[ $hash ] = apply_filters( 'aioseo_canonical_url', '' );
    
    			return $url[ $hash ];
    		}
    
    		$metaData = [];
    		$post     = $this->getPost();
    
  • /app/Common/Traits/Helpers/WpUri.php line 123
    			}
    		}
    
    		if ( $metaData && ! empty( $metaData->canonical_url ) ) {
    			$url[ $hash ] = apply_filters( 'aioseo_canonical_url', $this->makeUrlAbsolute( $metaData->canonical_url ) );
    
    			return $url[ $hash ];
    		}
    
    		if ( empty( $url[ $hash ] ) || is_wp_error( $url[ $hash ] ) ) {
    			$url[ $hash ] = $this->getUrl( true );
    
  • /app/Common/Traits/Helpers/WpUri.php line 165
    			$url[ $hash ] = preg_replace( '/\/amp$/', '', $url[ $hash ] );
    			$url[ $hash ] = preg_replace( '/\/amp\/$/', '/', $url[ $hash ] );
    		}
    
    		$url[ $hash ] = apply_filters( 'aioseo_canonical_url', $url[ $hash ] );
    
    		return $url[ $hash ];
    	}
    
    	/**
    	 * Formats a given URL as an absolute URL if it is relative.
    

See this hook used in plugins: