Skip to content

Commit f19f588

Browse files
committed
Merge branch 'master' of github.com:tareq1988/wordpress-settings-api-class
Conflicts: class.settings-api.php
2 parents d2aa571 + 678eeb7 commit f19f588

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

class.settings-api.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public function __construct() {
4040
*/
4141
function admin_enqueue_scripts() {
4242
wp_enqueue_style( 'wp-color-picker' );
43+
4344
wp_enqueue_script( 'wp-color-picker' );
4445
wp_enqueue_script( 'jquery' );
4546
wp_enqueue_script( 'media-upload' );
@@ -341,7 +342,7 @@ function callback_color( $args ) {
341342
$value = esc_attr( $this->get_option( $args['id'], $args['section'], $args['std'] ) );
342343
$size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';
343344

344-
$html = sprintf( '<input type="text" class="%1$s-text wp-color-picker-field" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s"/>', $size, $args['section'], $args['id'], $value );
345+
$html = sprintf( '<input type="text" class="%1$s-text wp-color-picker-field" id="%2$s[%3$s]" name="%2$s[%3$s]" value="%4$s" data-default-color="%5$s" />', $size, $args['section'], $args['id'], $value, $args['std'] );
345346
$html .= sprintf( '<span class="description" style="display:block;"> %s</span>', $args['desc'] );
346347

347348
echo $html;
@@ -511,7 +512,7 @@ function(){
511512
</script>
512513

513514
<style type="text/css">
514-
/* WordPress 3.8 Fix */
515+
/** WordPress 3.8 Fix **/
515516
.form-table th { padding: 20px 10px; }
516517
#wpbody-content .metabox-holder { padding-top: 5px; }
517518
</style>

0 commit comments

Comments
 (0)