mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Refine media state machine methods.
* state( id ) becomes setState( id ) * get( id ) becomes state( id ) * state() stays the same * previous() becomes lastState() Props koopersmith fixes #22652 git-svn-id: https://develop.svn.wordpress.org/trunk@22952 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1020,7 +1020,7 @@ function post_thumbnail_meta_box( $post ) {
|
||||
$thumbnailId.val( thumbnailId );
|
||||
|
||||
if ( frame ) {
|
||||
selection = frame.get('library').get('selection');
|
||||
selection = frame.state('library').get('selection');
|
||||
|
||||
if ( -1 === thumbnailId )
|
||||
selection.clear();
|
||||
@@ -1055,7 +1055,7 @@ function post_thumbnail_meta_box( $post ) {
|
||||
|
||||
frame = wp.media( options );
|
||||
|
||||
frame.get('library').set( 'filterable', 'uploaded' );
|
||||
frame.state('library').set( 'filterable', 'uploaded' );
|
||||
|
||||
frame.toolbar.on( 'activate:select', function() {
|
||||
frame.toolbar.view().set({
|
||||
|
||||
Reference in New Issue
Block a user