$is_image ) ? SEO_Links::TYPE_EXTERNAL_IMAGE : SEO_Links::TYPE_EXTERNAL; } // There is no base path and thus all URLs of the same domain are internal. if ( empty( $home_url['path'] ) ) { return ( $is_image ) ? SEO_Links::TYPE_INTERNAL_IMAGE : SEO_Links::TYPE_INTERNAL; } // When there is a path and it matches the start of the url. if ( isset( $url['path'] ) && \strpos( $url['path'], $home_url['path'] ) === 0 ) { return ( $is_image ) ? SEO_Links::TYPE_INTERNAL_IMAGE : SEO_Links::TYPE_INTERNAL; } return ( $is_image ) ? SEO_Links::TYPE_EXTERNAL_IMAGE : SEO_Links::TYPE_EXTERNAL; } }