[ Index ] |
PHP Cross Reference of BBPress |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Edit Topic Tag 5 * 6 * @package bbPress 7 * @subpackage Theme 8 */ 9 10 // Exit if accessed directly 11 defined( 'ABSPATH' ) || exit; 12 13 if ( current_user_can( 'edit_topic_tags' ) ) : ?> 14 15 <div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form"> 16 17 <fieldset class="bbp-form" id="bbp-edit-topic-tag"> 18 19 <legend><?php printf( esc_html__( 'Manage Tag: "%s"', 'bbpress' ), bbp_get_topic_tag_name() ); ?></legend> 20 21 <fieldset class="bbp-form" id="tag-rename"> 22 23 <legend><?php esc_html_e( 'Rename', 'bbpress' ); ?></legend> 24 25 <div class="bbp-template-notice info"> 26 <ul> 27 <li><?php esc_html_e( 'Leave the slug empty to have one automatically generated.', 'bbpress' ); ?></li> 28 </ul> 29 </div> 30 31 <div class="bbp-template-notice"> 32 <ul> 33 <li><?php esc_html_e( 'Changing the slug affects its permalink. Any links to the old slug will stop working.', 'bbpress' ); ?></li> 34 </ul> 35 </div> 36 37 <form id="rename_tag" name="rename_tag" method="post"> 38 39 <div> 40 <label for="tag-name"><?php esc_html_e( 'Name:', 'bbpress' ); ?></label> 41 <input type="text" id="tag-name" name="tag-name" size="20" maxlength="40" value="<?php echo esc_attr( bbp_get_topic_tag_name() ); ?>" /> 42 </div> 43 44 <div> 45 <label for="tag-slug"><?php esc_html_e( 'Slug:', 'bbpress' ); ?></label> 46 <input type="text" id="tag-slug" name="tag-slug" size="20" maxlength="40" value="<?php echo esc_attr( apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) ); ?>" /> 47 </div> 48 49 <div> 50 <label for="tag-description"><?php esc_html_e( 'Description:', 'bbpress' ); ?></label> 51 <input type="text" id="tag-description" name="tag-description" size="20" value="<?php echo esc_attr( bbp_get_topic_tag_description( array( 'before' => '', 'after' => '' ) ) ); ?>" /> 52 </div> 53 54 <div class="bbp-submit-wrapper"> 55 <button type="submit" class="button submit"><?php esc_attr_e( 'Update', 'bbpress' ); ?></button> 56 57 <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" /> 58 <input type="hidden" name="action" value="bbp-update-topic-tag" /> 59 60 <?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?> 61 62 </div> 63 </form> 64 65 </fieldset> 66 67 <fieldset class="bbp-form" id="tag-merge"> 68 69 <legend><?php esc_html_e( 'Merge', 'bbpress' ); ?></legend> 70 71 <div class="bbp-template-notice"> 72 <ul> 73 <li><?php esc_html_e( 'Merging tags together cannot be undone.', 'bbpress' ); ?></li> 74 </ul> 75 </div> 76 77 <form id="merge_tag" name="merge_tag" method="post"> 78 79 <div> 80 <label for="tag-existing-name"><?php esc_html_e( 'Existing tag:', 'bbpress' ); ?></label> 81 <input type="text" id="tag-existing-name" name="tag-existing-name" size="22" maxlength="40" /> 82 </div> 83 84 <div class="bbp-submit-wrapper"> 85 <button type="submit" class="button submit" onclick="return confirm('<?php echo esc_js( sprintf( esc_html__( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');"><?php esc_attr_e( 'Merge', 'bbpress' ); ?></button> 86 87 <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" /> 88 <input type="hidden" name="action" value="bbp-merge-topic-tag" /> 89 90 <?php wp_nonce_field( 'merge-tag_' . bbp_get_topic_tag_id() ); ?> 91 </div> 92 </form> 93 94 </fieldset> 95 96 <?php if ( current_user_can( 'delete_topic_tags' ) ) : ?> 97 98 <fieldset class="bbp-form" id="delete-tag"> 99 100 <legend><?php esc_html_e( 'Delete', 'bbpress' ); ?></legend> 101 102 <div class="bbp-template-notice info"> 103 <ul> 104 <li><?php esc_html_e( 'This does not delete your topics. Only the tag itself is deleted.', 'bbpress' ); ?></li> 105 </ul> 106 </div> 107 <div class="bbp-template-notice"> 108 <ul> 109 <li><?php esc_html_e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></li> 110 <li><?php esc_html_e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></li> 111 </ul> 112 </div> 113 114 <form id="delete_tag" name="delete_tag" method="post"> 115 116 <div class="bbp-submit-wrapper"> 117 <button type="submit" class="button submit" onclick="return confirm('<?php echo esc_js( sprintf( esc_html__( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');"><?php esc_attr_e( 'Delete', 'bbpress' ); ?></button> 118 119 <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" /> 120 <input type="hidden" name="action" value="bbp-delete-topic-tag" /> 121 122 <?php wp_nonce_field( 'delete-tag_' . bbp_get_topic_tag_id() ); ?> 123 </div> 124 </form> 125 126 </fieldset> 127 128 <?php endif; ?> 129 130 </fieldset> 131 </div> 132 133 <?php endif;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Mar 28 01:00:51 2024 | Cross-referenced by PHPXref 0.7.1 |