|
@@ 531-537 (lines=7) @@
|
| 528 |
|
|
| 529 |
|
<?php |
| 530 |
|
$types = lasso_post_types(); |
| 531 |
|
if ( !empty( $types ) ) { |
| 532 |
|
foreach( $types as $type ) { |
| 533 |
|
$type = preg_replace( '/s\b/','', $type ); |
| 534 |
|
printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) ); |
| 535 |
|
} |
| 536 |
|
|
| 537 |
|
} |
| 538 |
|
?> |
| 539 |
|
|
| 540 |
|
</select> |
|
@@ 548-553 (lines=6) @@
|
| 545 |
|
<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
| 546 |
|
<input type="hidden" name="action" value="process_new-object_post"> |
| 547 |
|
<?php |
| 548 |
|
if ( !empty( $types ) ) { |
| 549 |
|
// get the first element |
| 550 |
|
$type = reset($types); |
| 551 |
|
$type = preg_replace( '/s\b/','', $type ); |
| 552 |
|
printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
| 553 |
|
} |
| 554 |
|
?> |
| 555 |
|
<input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
| 556 |
|
<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>"> |