WordPress.org

Make WordPress Core

Opened 2 months ago

#51746 new feature request

Add a core wrapper function to retrieve $wp->request

Reported by: apedog Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords:
Focuses: Cc:

Description

Feature request: add a core wrapper function to retrieve global $wp->request.

Core should provide a function wp_get_uri_request() (or some other naming convention) to reliably get the uri request. And reduce reliance on globals/superglobals.

<?php
global $wp;
$url = $wp->request;

instead use:

<?php
$url = wp_get_uri_request();

Change History (0)

Note: See TracTickets for help on using tickets.