WordPress.org

Make WordPress Core

Changeset 38933


Ignore:
Timestamp:
10/25/2016 10:50:39 PM (4 years ago)
Author:
westonruter
Message:

Customize: Add explanatory note for custom_css control via textarea[placeholder] and expose any defined input_attrs on such textarea controls.

Props melchoyce, westonruter, celloexpressions.
See #37439.
Fixes #38493.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-customize-control.php

    r38906 r38933  
    533533                        <span class="description customize-control-description"><?php echo $this->description; ?></span>
    534534                    <?php endif; ?>
    535                     <textarea rows="5" <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
     535                    <textarea rows="5" <?php $this->input_attrs(); ?> <?php $this->link(); ?>><?php echo esc_textarea( $this->value() ); ?></textarea>
    536536                </label>
    537537                <?php
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r38928 r38933  
    34163416            'section'  => 'custom_css',
    34173417            'settings' => array( 'default' => $custom_css_setting->id ),
     3418            'input_attrs' => array(
     3419                'placeholder' => __( "/*\nYou can add your own CSS here.\n\nClick the help icon above to learn more.\n*/" ),
     3420            )
    34183421        ) );
    34193422    }
Note: See TracChangeset for help on using the changeset viewer.