Calculate current url correctly
This commit is contained in:
parent
0de2b2c7e1
commit
11038262eb
@ -119,9 +119,7 @@ function handle_non_api_requests() {
|
||||
global $wp_query;
|
||||
$accept = $_SERVER['HTTP_ACCEPT'];
|
||||
if ( strpos( $accept, 'application/ld+json' ) !== false ) {
|
||||
$current_url = \trailingslashit(
|
||||
home_url( add_query_arg( $_GET, $wp->request ) )
|
||||
);
|
||||
$current_url = home_url( add_query_arg( $_GET, \trailingslashit( $wp->request ) ) );
|
||||
$objects = \pterotype\objects\get_objects_by( 'url', $current_url );
|
||||
if ( count( $objects ) > 0 ) {
|
||||
$object = $objects[0];
|
||||
|
Loading…
Reference in New Issue
Block a user