redirect_post_location WordPress Filter Hook

The redirect_post_location hook allows you to modify the URL to which a user is redirected after publishing a post. This can be useful if you want to redirect the user to a specific URL or if you want to add a query string to the redirect URL.

apply_filters( 'redirect_post_location', string $location, int $post_id ) #

Filters the post redirect destination URL.


Parameters

$location

(string)The destination URL.

$post_id

(int)The post ID.


Top ↑

Source

File: wp-admin/includes/post.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More