mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 22:58:40 +02:00
Customize: Make sure that preview and return URLs are URLs.
Built from https://develop.svn.wordpress.org/trunk@37527 git-svn-id: http://core.svn.wordpress.org/trunk@37495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d510afedd8
commit
af76442848
@ -1631,6 +1631,7 @@ final class WP_Customize_Manager {
|
|||||||
* @param string $preview_url URL to be previewed.
|
* @param string $preview_url URL to be previewed.
|
||||||
*/
|
*/
|
||||||
public function set_preview_url( $preview_url ) {
|
public function set_preview_url( $preview_url ) {
|
||||||
|
$preview_url = esc_url_raw( $preview_url );
|
||||||
$this->preview_url = wp_validate_redirect( $preview_url, home_url( '/' ) );
|
$this->preview_url = wp_validate_redirect( $preview_url, home_url( '/' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1662,6 +1663,7 @@ final class WP_Customize_Manager {
|
|||||||
* @param string $return_url URL for return link.
|
* @param string $return_url URL for return link.
|
||||||
*/
|
*/
|
||||||
public function set_return_url( $return_url ) {
|
public function set_return_url( $return_url ) {
|
||||||
|
$return_url = esc_url_raw( $return_url );
|
||||||
$return_url = remove_query_arg( wp_removable_query_args(), $return_url );
|
$return_url = remove_query_arg( wp_removable_query_args(), $return_url );
|
||||||
$return_url = wp_validate_redirect( $return_url );
|
$return_url = wp_validate_redirect( $return_url );
|
||||||
$this->return_url = $return_url;
|
$this->return_url = $return_url;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.6-alpha-37526';
|
$wp_version = '4.6-alpha-37527';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user