Commit 1d55b6e8 authored by Scott Taylor's avatar Scott Taylor
Browse files

Load default settings state when creating a new playlist in the media modal....

Load default settings state when creating a new playlist in the media modal. Add a few missing inline `@this` annotations in `media-editor.js`.

See #26631.


Built from https://develop.svn.wordpress.org/trunk@27242


git-svn-id: https://core.svn.wordpress.org/trunk@27099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
parent 6154e39c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@
				style: 'light',
				tracklist: false,
				tracknumbers: false,
				images: false
				images: true
			}
		};

@@ -812,10 +812,16 @@
			}, this );

			workflow.state('playlist-edit').on( 'update', function( selection ) {
				/**
				 * @this wp.media.editor
				 */
				this.insert( wp.media.playlist.shortcode( selection ).string() );
			}, this );

			workflow.state('video-playlist-edit').on( 'update', function( selection ) {
				/**
				 * @this wp.media.editor
				 */
				this.insert( wp.media['video-playlist'].shortcode( selection ).string() );
			}, this );

+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+15 −4
Original line number Diff line number Diff line
@@ -431,24 +431,35 @@ function wp_print_media_templates() {
			</select>
		</label>

		<#
			var playlist = 'playlist-edit' === data.controller.id, emptyModel = 'undefined' === typeof data.model.style;
		#>
		<label class="setting">
			<span><?php _e( 'Show Tracklist' ); ?></span>
			<input type="checkbox" data-setting="_tracklist" />
			<input type="checkbox" data-setting="_tracklist" <# if ( playlist && emptyModel ) { #>
				checked="checked"
			<# } #> />
		</label>

		<label class="setting">
			<span><?php _e( 'Show Track Numbers' ); ?></span>
			<input type="checkbox" data-setting="_tracknumbers" />
			<input type="checkbox" data-setting="_tracknumbers" <# if ( playlist && emptyModel ) { #>
				checked="checked"
			<# } #> />
		</label>

		<label class="setting">
			<span><?php _e( 'Show Artist Name in Tracklist' ); ?></span>
			<input type="checkbox" data-setting="_artists" />
			<input type="checkbox" data-setting="_artists" <# if ( playlist && emptyModel ) { #>
				checked="checked"
			<# } #> />
		</label>

		<label class="setting">
			<span><?php _e( 'Show Images' ); ?></span>
			<input type="checkbox" data-setting="_images" />
			<input type="checkbox" data-setting="_images" <# if ( emptyModel ) { #>
				checked="checked"
			<# } #> />
		</label>
	</script>