public function __construct( $args = array
() ) { $args =
array_merge( array_fill_keys( array
( 'changeset_uuid', 'theme', 'messenger_channel', 'settings_previewed', 'autosaved', 'branching'
), null
),
$args );
// Note that the UUID format will be validated in the setup_theme() method.
if ( !
isset( $args['changeset_uuid'
] ) ) { $args['changeset_uuid'
] =
wp_generate_uuid4();
} /*
* The theme and messenger_channel should be supplied via $args,
* but they are also looked at in the $_REQUEST global here for back-compat.
*/
if ( !
isset( $args['theme'
] ) ) { if ( isset( $_REQUEST['customize_theme'
] ) ) { $args['theme'
] =
wp_unslash( $_REQUEST['customize_theme'
] );
} elseif ( isset( $_REQUEST['theme'
] ) ) { // Deprecated.
$args['theme'
] =
wp_unslash( $_REQUEST['theme'
] );
}