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.7

apply_filters('aioseo_canonical_url') is found 3 times:

  • /app/Common/Traits/Helpers/WpUri.php line 102
    			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 125
    			}
    		}
    
    		if ( $metaData && ! empty( $metaData->canonical_url ) ) {
    			$url[ $hash ] = apply_filters( 'aioseo_canonical_url', $this->makeUrlAbsolute( $metaData->canonical_url ) );
    
    			return $url[ $hash ];
    		}
    
    		if ( BuddyPressIntegration::isComponentPage() ) {
    			$url[ $hash ] = aioseo()->standalone->buddyPress->component->getMeta( 'canonical' );
    
  • /app/Common/Traits/Helpers/WpUri.php line 171
    			$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 ] );
    
    		return $url[ $hash ];
    	}
    
    	/**
    	 * Formats a given URL as an absolute URL if it is relative.
    

See this hook used in plugins: