mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Upgrade/Install: Add port number to target origin when decrementing update counts.
This ensures that the update counter bubble in the admin menu is properly decreased after a successful plugin or theme update from within the update iframe when the site uses a non-standard port number. Follow-up to [27280], [29357]. Props TobiasBg. Fixes #59987. git-svn-id: https://develop.svn.wordpress.org/trunk@57148 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
4d19f6c23f
commit
0ce733c78f
@ -240,7 +240,14 @@ class WP_Upgrader_Skin {
|
||||
if ( defined( 'IFRAME_REQUEST' ) ) {
|
||||
echo '<script type="text/javascript">
|
||||
if ( window.postMessage && JSON ) {
|
||||
window.parent.postMessage( JSON.stringify( { action: "decrementUpdateCount", upgradeType: "' . $type . '" } ), window.location.protocol + "//" + window.location.hostname );
|
||||
window.parent.postMessage(
|
||||
JSON.stringify( {
|
||||
action: "decrementUpdateCount",
|
||||
upgradeType: "' . $type . '"
|
||||
} ),
|
||||
window.location.protocol + "//" + window.location.hostname
|
||||
+ ( "" !== window.location.port ? ":" + window.location.port : "" )
|
||||
);
|
||||
}
|
||||
</script>';
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user