| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
do_action( 'betterdocs_doc_category_update_form_before', $term ); ?> |
| 6 |
<tr class="form-field term-group-wrap"> |
| 7 |
<th scope="row"> |
| 8 |
<label for="doc-category-id"><?php esc_html_e( 'Category Id', 'betterdocs' ); ?></label> |
| 9 |
</th> |
| 10 |
<td> |
| 11 |
<input |
| 12 |
type="text" |
| 13 |
id="doc-category-id" |
| 14 |
style="width:100px" |
| 15 |
name="" |
| 16 |
readonly |
| 17 |
value="<?php echo esc_attr( $_GET["tag_ID"] ); // phpcs:ignore ?>" |
| 18 |
/> |
| 19 |
</td> |
| 20 |
</tr> |
| 21 |
<tr class="form-field term-group-wrap"> |
| 22 |
<th scope="row"> |
| 23 |
<label for="doc-category-order"><?php esc_html_e( 'Order', 'betterdocs' ); ?></label> |
| 24 |
</th> |
| 25 |
<td> |
| 26 |
<input type="number" id="doc-category-order" style="width:100px" name="term_meta[order]" value="<?php echo $order ? esc_attr( $order ) : ''; ?>"> |
| 27 |
</td> |
| 28 |
</tr> |
| 29 |
<tr class="form-field term-group-wrap batterdocs-cat-media-upload"> |
| 30 |
<th scope="row"> |
| 31 |
<label><?php esc_html_e( 'Category Icon', 'betterdocs' ); ?></label> |
| 32 |
</th> |
| 33 |
<td> |
| 34 |
<input type="hidden" class="doc-category-image-id" name="term_meta[image-id]" value="<?php echo esc_attr( $icon_id ); ?>"> |
| 35 |
<div class="doc-category-image-wrapper" id="doc-category-image-wrapper"> |
| 36 |
<?php |
| 37 |
if ( $icon_id ) { |
| 38 |
echo '<img style="display: none;" src="' . betterdocs()->assets->icon( 'betterdocs-cat-icon.svg', true ) . '" alt="">'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Outputs Html Icon |
| 39 |
echo wp_get_attachment_image( $icon_id, 'thumbnail', false, 'class=custom_media_image' ); |
| 40 |
} else { |
| 41 |
echo '<img src="' . betterdocs()->assets->icon( 'betterdocs-cat-icon.svg', true ) . '" alt="">'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- Outputs Html Icon |
| 42 |
} |
| 43 |
?> |
| 44 |
|
| 45 |
</div> |
| 46 |
<p> |
| 47 |
<input |
| 48 |
type="button" |
| 49 |
class="button button-secondary betterdocs_tax_media_button" |
| 50 |
id="betterdocs_tax_media_button" |
| 51 |
name="betterdocs_tax_media_button" |
| 52 |
value="<?php esc_html_e( 'Add Image', 'betterdocs' ); ?>" |
| 53 |
/> |
| 54 |
<input |
| 55 |
type="button" |
| 56 |
class="button button-secondary doc_tax_media_remove" |
| 57 |
id="doc_tax_media_remove" |
| 58 |
name="doc_tax_media_remove" |
| 59 |
value="<?php esc_html_e( 'Remove Image', 'betterdocs' ); ?>" |
| 60 |
/> |
| 61 |
</p> |
| 62 |
</td> |
| 63 |
</tr> |
| 64 |
<?php |
| 65 |
do_action( 'betterdocs_doc_category_update_form_after', $term ); |
| 66 |
|