remove_action( 'customize_register', array
( $wp_customize, 'register_controls'
) );
$wp_customize->
register_controls();
/** This filter is documented in wp-includes/class-wp-customize-manager.php */
do_action( 'customize_register',
$wp_customize );
} $wp_customize->
_publish_changeset_values( $changeset_post->ID
);
/*
* Trash the changeset post if revisions are not enabled. Unpublished
* changesets by default get garbage collected due to the auto-draft status.
* When a changeset post is published, however, it would no longer get cleaned
* out. This is a problem when the changeset posts are never displayed anywhere,
* since they would just be endlessly piling up. So here we use the revisions
* feature to indicate whether or not a published changeset should get trashed
* and thus garbage collected.
*/
if ( !
wp_revisions_enabled( $changeset_post ) ) {