| 1 | <?php
|
|---|
| 2 | /**
|
|---|
| 3 | * Test metabox for #23362
|
|---|
| 4 | * http://core.trac.wordpress.org/ticket/23362
|
|---|
| 5 | */
|
|---|
| 6 | add_action( 'add_meta_boxes', function () {
|
|---|
| 7 | $post_type = 'post';
|
|---|
| 8 | $id = 'html5';
|
|---|
| 9 | $title = 'Metabox with HTML5 form validation';
|
|---|
| 10 | $context = 'normal';
|
|---|
| 11 | $priority = 'default';
|
|---|
| 12 | $callback_args = null;
|
|---|
| 13 | $callback = function () {
|
|---|
| 14 | ?>
|
|---|
| 15 | <p<label>REQUIRED: <input required></p>
|
|---|
| 16 | <p<label>type=email: <input type=email></p>
|
|---|
| 17 | <?php
|
|---|
| 18 | };
|
|---|
| 19 | add_meta_box( $id, $title, $callback, $post_type, $context, $priority, $callback_args );
|
|---|
| 20 | });
|
|---|