|
@@ 519-525 (lines=7) @@
|
| 516 |
|
|
| 517 |
|
<?php |
| 518 |
|
$types = lasso_post_types(); |
| 519 |
|
if ( !empty( $types ) ) { |
| 520 |
|
foreach( $types as $type ) { |
| 521 |
|
$type = preg_replace( '/s\b/','', $type ); |
| 522 |
|
printf( '<option value="%s">%s</option>', lcfirst( esc_attr( $type ) ) , ucfirst( esc_attr( $type ) ) ); |
| 523 |
|
} |
| 524 |
|
|
| 525 |
|
} |
| 526 |
|
?> |
| 527 |
|
|
| 528 |
|
</select> |
|
@@ 536-541 (lines=6) @@
|
| 533 |
|
<a href="#" class="lasso--postsettings-cancel"><?php _e( 'Cancel', 'lasso' );?></a> |
| 534 |
|
<input type="hidden" name="action" value="process_new-object_post"> |
| 535 |
|
<?php |
| 536 |
|
if ( !empty( $types ) ) { |
| 537 |
|
// get the first element |
| 538 |
|
$type = reset($types); |
| 539 |
|
$type = preg_replace( '/s\b/','', $type ); |
| 540 |
|
printf( '<input type="hidden" name="object" value="%s">', lcfirst( esc_attr( $type ) ) ); |
| 541 |
|
} |
| 542 |
|
?> |
| 543 |
|
<input type="hidden" name="nonce" value="<?php echo $nonce;?>"> |
| 544 |
|
<input type="submit" value="<?php esc_attr_e( 'Create', 'lasso' );?>"> |