WordPress.org

Make WordPress Core


Ignore:
Timestamp:
01/27/2016 05:54:39 PM (5 years ago)
Author:
westonruter
Message:

Customizer: Export nonce, theme, and url app settings in preview as exported in pane.

  • Introduce WP_Customize_Manager::get_nonces() to consolidate logic for retrieving nonces.
  • Export nonces centrally in wp.customize.settings.nonce with each request and update nav menus preview to utilize.
  • Send updated nonces to preview upon nonce-refresh.
  • Request full preview refresh if Nav Menu selective refresh request fails (e.g. due to bad nonce).
  • Update nav menus and widgets in Customizer to utilize customize_refresh_nonces for exporting nonces and keeping them up to date.

See #27355.
Fixes #35617.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/nav-menus.php

    r35242 r36414  
    648648        $this->assertContains( 'renderNonceValue', $data );
    649649        $this->assertContains( 'renderNoncePostKey', $data );
    650         $this->assertContains( 'requestUri', $data );
    651         $this->assertContains( 'theme', $data );
    652         $this->assertContains( 'previewCustomizeNonce', $data );
    653650        $this->assertContains( 'navMenuInstanceArgs', $data );
    654         $this->assertContains( 'requestUri', $data );
    655 
    656     }
    657 
     651    }
    658652}
Note: See TracChangeset for help on using the changeset viewer.