Skip to:
Content

bbPress.org

Ticket #1613: 1613.diff

File 1613.diff, 3.6 KB (added by netweb, 11 years ago)
  • includes/topics/functions.php

     
    18341834                        }
    18351835
    18361836                        // Attempt to update the tag
    1837                         $slug = !empty( $_POST['tag-slug'] ) ? $_POST['tag-slug'] : '';
    1838                         $tag  = wp_update_term( $tag_id, bbp_get_topic_tag_tax_id(), array( 'name' => $name, 'slug' => $slug ) );
     1837                        $slug        = !empty( $_POST['tag-slug'] ) ? $_POST['tag-slug'] : '';
     1838                        $description = !empty( $_POST['tag-description'] ) ? $_POST['tag-description'] : '';
     1839                        $tag         = wp_update_term( $tag_id, bbp_get_topic_tag_tax_id(), array( 'name' => $name, 'slug' => $slug, 'description' => $description ) );
    18391840
    18401841                        // Cannot update tag
    18411842                        if ( is_wp_error( $tag ) && $tag->get_error_message() ) {
     
    18471848                        $redirect = get_term_link( $tag_id, bbp_get_topic_tag_tax_id() );
    18481849
    18491850                        // Update counts, etc...
    1850                         do_action( 'bbp_update_topic_tag', $tag_id, $tag, $name, $slug );
     1851                        do_action( 'bbp_update_topic_tag', $tag_id, $tag, $name, $slug, $description );
    18511852
    18521853                        break;
    18531854
  • templates/default/bbpress/content-archive-topic.php

     
    2323
    2424        <?php bbp_breadcrumb(); ?>
    2525
    26         <?php if ( bbp_is_topic_tag() ) bbp_topic_tag_description(); ?>
     26        <?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
    2727
     28        <?php if ( bbp_is_topic_tag() ) : ?>
     29
     30                        <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info">', 'after' => '</div>' ) ); ?>
     31
     32        <?php endif; ?>
     33
     34        <?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
     35
    2836        <?php do_action( 'bbp_template_before_topics_index' ); ?>
    2937
    3038        <?php if ( bbp_has_topics() ) : ?>
  • templates/default/bbpress/content-topic-tag-edit.php

     
    1313
    1414        <?php bbp_breadcrumb(); ?>
    1515
     16        <?php do_action( 'bbp_template_before_topic_tag_description' ); ?>
     17
     18        <?php bbp_topic_tag_description( array( 'before' => '<div class="bbp-template-notice info">', 'after' => '</div>' ) ); ?>
     19
     20        <?php do_action( 'bbp_template_after_topic_tag_description' ); ?>
     21
    1622        <?php bbp_topic_tag_description(); ?>
    1723
    1824        <?php do_action( 'bbp_template_before_topic_tag_edit' ); ?>
  • templates/default/bbpress/form-topic-tag.php

     
    4141                                                <input type="text" id="tag-slug" name="tag-slug" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( apply_filters( 'editable_slug', bbp_get_topic_tag_slug() ) ); ?>" />
    4242                                        </div>
    4343
     44                                        <div>
     45                                                <label for="tag-description"><?php _e( 'Description:', 'bbpress' ); ?></label>
     46                                                <input type="text" id="tag-description" name="tag-description" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( bbp_get_topic_tag_description( array( 'before' => '', 'after' => '' ) ) ); ?>" />
     47                                        </div>
     48
    4449                                        <div class="bbp-submit-wrapper">
    4550                                                <button type="submit" tabindex="<?php bbp_tab_index(); ?>" class="button submit"><?php esc_attr_e( 'Update', 'bbpress' ); ?></button>
    4651