Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/06/2011 10:45:55 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Add improved breadcrumb support to bbp-twentyten, shortcodes, and theme compat. Add improved topic-tag support for theme compat. Add missing topic-tag template tags.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-themes/bbp-twentyten/bbpress/form-topic-tag.php

    r2943 r3109  
    88 */
    99
    10 //@todo - remove $term variable references
    11 $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
     10?>
    1211
    13 ?>
    1412<?php if ( current_user_can( 'edit_topic_tags' ) ) : ?>
    1513
    16         <div id="edit-topic-tag-<?php echo $term->term_id; ?>" class="bbp-topic-tag-form">
     14        <div id="edit-topic-tag-<?php bbp_topic_tag_id(); ?>" class="bbp-topic-tag-form">
    1715
    1816                <fieldset>
    1917
    20                         <legend><?php printf( __( 'Manage Tag: "%s"', 'bbpress' ), $term->name ); ?></legend>
     18                        <legend><?php printf( __( 'Manage Tag: "%s"', 'bbpress' ), bbp_get_topic_tag_name() ); ?></legend>
    2119
    2220                        <fieldset id="tag-rename">
    … …  
    3634                                        <div class="alignleft">
    3735                                                <label for="tag-name"><?php _e( 'Name:', 'bbpress' ); ?></label>
    38                                                 <input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( $term->name ); ?>" />
     36                                                <input type="text" name="tag-name" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( bbp_get_topic_tag_slug() ); ?>" />
    3937                                        </div>
    4038
    4139                                        <div class="alignleft">
    4240                                                <label for="tag-name"><?php _e( 'Slug:', 'bbpress' ); ?></label>
    43                                                 <input type="text" name="tag-slug" size="20" maxlength="40" tabindex="<?php bbp_tab_index(); ?>" value="<?php echo esc_attr( apply_filters( 'editable_slug', $term->slug ) ); ?>" />
     41                                                <input type="text" 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() ) ); ?>" />
    4442                                        </div>
    4543
    … …  
    4745                                                <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Update', 'bbpress' ); ?>" /><br />
    4846
    49                                                 <input type="hidden" name="tag-id" value="<?php echo esc_attr( $term->term_id ); ?>" />
     47                                                <input type="hidden" name="tag-id" value="<?php bbp_get_topic_tag_id(); ?>" />
    5048                                                <input type="hidden" name="action" value="bbp-update-topic-tag" />
    5149
    52                                                 <?php wp_nonce_field( 'update-tag_' . $term->term_id ); ?>
     50                                                <?php wp_nonce_field( 'update-tag_' . bbp_get_topic_tag_id() ); ?>
    5351
    5452                                        </div>
    … …  
    7472                                        <div class="alignright">
    7573                                                <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php esc_attr_e( 'Merge', 'bbpress' ); ?>"
    76                                                         onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), $term->name ) ); ?>');" />
     74                                                        onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to merge the "%s" tag into the tag you specified?', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" />
    7775
    78                                                 <input type="hidden" name="tag-id" value="<?php echo $term->term_id; ?>" />
     76                                                <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
    7977                                                <input type="hidden" name="action" value="bbp-merge-topic-tag" />
    8078
    81                                                 <?php wp_nonce_field( 'merge-tag_' . $term->term_id ); ?>
     79                                                <?php wp_nonce_field( 'merge-tag_' . bbp_get_topic_tag_id() ); ?>
    8280                                        </div>
    8381                                </form>
    … …  
    9694                                        <div class="bbp-template-notice">
    9795                                                <p><?php _e( 'Deleting a tag cannot be undone.', 'bbpress' ); ?></p>
    98                                                 <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p>                                             
     96                                                <p><?php _e( 'Any links to this tag will no longer function.', 'bbpress' ); ?></p>
    9997                                        </div>
    10098
    … …  
    103101                                                <div class="alignright">
    104102                                                        <input type="submit" name="submit" tabindex="<?php bbp_tab_index(); ?>" value="<?php _e( 'Delete', 'bbpress' ); ?>"
    105                                                                 onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), $term->name ) ); ?>');" />
     103                                                                onclick="return confirm('<?php echo esc_js( sprintf( __( 'Are you sure you want to delete the "%s" tag? This is permanent and cannot be undone.', 'bbpress' ), bbp_get_topic_tag_name() ) ); ?>');" />
    106104
    107                                                         <input type="hidden" name="tag-id" value="<?php echo $term->term_id; ?>" />
     105                                                        <input type="hidden" name="tag-id" value="<?php bbp_topic_tag_id(); ?>" />
    108106                                                        <input type="hidden" name="action" value="bbp-delete-topic-tag" />
    109107
    110                                                         <?php wp_nonce_field( 'delete-tag_' . $term->term_id ); ?>
     108                                                        <?php wp_nonce_field( 'delete-tag_' . bbp_get_topic_tag_id() ); ?>
    111109                                                </div>
    112110                                        </form>
Note: See TracChangeset for help on using the changeset viewer.