Integrate media with the custom background page. fixes #21818, see #21390.

git-svn-id: http://core.svn.wordpress.org/trunk@22502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Daryl Koopersmith
2012-11-09 11:37:24 +00:00
parent 3797b7e18c
commit 15a749c6fd
3 changed files with 47 additions and 6 deletions

View File

@@ -106,7 +106,7 @@ class Custom_Background {
);
add_thickbox();
wp_enqueue_script('media-upload');
wp_enqueue_media();
wp_enqueue_script('custom-background');
wp_enqueue_style('wp-color-picker');
}
@@ -269,7 +269,9 @@ if ( get_background_image() ) {
?>
<p>
<label for="choose-from-library-link"><?php _e( 'Or choose an image from your media library:' ); ?></label><br />
<a id="choose-from-library-link" class="button thickbox" href="<?php echo esc_url( $image_library_url ); ?>"><?php _e( 'Choose Image' ); ?></a>
<a id="choose-from-library-link" class="button"
data-choose="<?php esc_attr_e( 'Choose a Background Image' ); ?>"
data-update="<?php esc_attr_e( 'Set as background' ); ?>"><?php _e( 'Choose Image' ); ?></a>
</p>
</form>
</td>