Skip to:
Content

bbPress.org

Changeset 2557


Ignore:
Timestamp:
10/14/2010 02:37:34 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Replace 'topic_reply' references with 'reply' (this includes the post_type ID)

Location:
branches/plugin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin.php

    r2555 r2557  
    117117                        __( 'Topic', 'bbpress' ),
    118118                        'bbp_topic_reply_metabox',
    119                         BBP_TOPIC_REPLY_POST_TYPE_ID,
     119                        BBP_REPLY_POST_TYPE_ID,
    120120                        'normal'
    121121                );
     
    159159                $forum_class       = sanitize_html_class( BBP_FORUM_POST_TYPE_ID );
    160160                $topic_class       = sanitize_html_class( BBP_TOPIC_POST_TYPE_ID );
    161                 $topic_reply_class = sanitize_html_class( BBP_TOPIC_REPLY_POST_TYPE_ID );
     161                $reply_class = sanitize_html_class( BBP_REPLY_POST_TYPE_ID );
    162162
    163163                // Calculate offset for screen_icon sprite
    164                 $icons32_offset = -90 * array_search( $_GET['post_type'], array( BBP_FORUM_POST_TYPE_ID, BBP_TOPIC_POST_TYPE_ID, BBP_TOPIC_REPLY_POST_TYPE_ID ) );
     164                $icons32_offset = -90 * array_search( $_GET['post_type'], array( BBP_FORUM_POST_TYPE_ID, BBP_TOPIC_POST_TYPE_ID, BBP_REPLY_POST_TYPE_ID ) );
    165165
    166166?>
     
    183183                        }
    184184
    185                         #menu-posts-<?php echo $topic_reply_class; ?> .wp-menu-image {
     185                        #menu-posts-<?php echo $reply_class; ?> .wp-menu-image {
    186186                                background: url(<?php echo $menu_icon_url; ?>) no-repeat -35px -32px;
    187187                        }
    188                         #menu-posts-<?php echo $topic_reply_class; ?>:hover .wp-menu-image,
    189                         #menu-posts-<?php echo $topic_reply_class; ?>.wp-has-current-submenu .wp-menu-image {
     188                        #menu-posts-<?php echo $reply_class; ?>:hover .wp-menu-image,
     189                        #menu-posts-<?php echo $reply_class; ?>.wp-has-current-submenu .wp-menu-image {
    190190                                background: url(<?php echo $menu_icon_url; ?>) no-repeat -35px 0px;
    191191                        }
    192192
    193                         <?php if ( in_array ( $_GET['post_type'], array( BBP_FORUM_POST_TYPE_ID, BBP_TOPIC_POST_TYPE_ID, BBP_TOPIC_REPLY_POST_TYPE_ID ) ) ) : ?>
     193                        <?php if ( in_array ( $_GET['post_type'], array( BBP_FORUM_POST_TYPE_ID, BBP_TOPIC_POST_TYPE_ID, BBP_REPLY_POST_TYPE_ID ) ) ) : ?>
    194194                        #icon-edit, #icon-post {
    195195                                background: url(<?php echo BBP_IMAGES_URL . '/icons32.png'; ?>) no-repeat -4px <?php echo $icons32_offset; ?>px;
     
    387387         */     
    388388        function post_row_actions ( $actions, $post ) {
    389                 if ( in_array( $post->post_type, array( BBP_TOPIC_POST_TYPE_ID, BBP_TOPIC_REPLY_POST_TYPE_ID ) ) )
     389                if ( in_array( $post->post_type, array( BBP_TOPIC_POST_TYPE_ID, BBP_REPLY_POST_TYPE_ID ) ) )
    390390                        unset( $actions['inline hide-if-no-js'] );
    391391
  • branches/plugin/bbp-loader.php

    r2515 r2557  
    8989
    9090                // The default topic post type ID
    91                 if ( !defined( 'BBP_TOPIC_REPLY_POST_TYPE_ID' ) )
    92                         define( 'BBP_TOPIC_REPLY_POST_TYPE_ID', apply_filters( 'bbp_topic_reply_post_type_id', 'bbp_topic_reply' ) );
     91                if ( !defined( 'BBP_REPLY_POST_TYPE_ID' ) )
     92                        define( 'BBP_REPLY_POST_TYPE_ID', apply_filters( 'bbp_reply_post_type_id', 'bbp_reply' ) );
    9393
    9494                // The default topic post type ID
     
    333333
    334334                // Topic reply post type labels
    335                 $topic_reply_labels = array (
     335                $reply_labels = array (
    336336                        'name'                  => __( 'Replies', 'bbpress' ),
    337337                        'singular_name'         => __( 'Reply', 'bbpress' ),
     
    350350
    351351                // Topic post type rewrite
    352                 $topic_reply_rewrite = array (
    353                         'slug'              => BBP_REPLY_SLUG,
    354                         'with_front'        => false
     352                $reply_rewrite = array (
     353                        'slug'        => BBP_REPLY_SLUG,
     354                        'with_front'  => false
    355355                );
    356356
    357357                // Topic post type supports
    358                 $topic_reply_supports = array (
     358                $reply_supports = array (
    359359                        'title',
    360360                        'editor',
     
    365365                // Register topic reply post type
    366366                register_post_type (
    367                         BBP_TOPIC_REPLY_POST_TYPE_ID,
     367                        BBP_REPLY_POST_TYPE_ID,
    368368                        apply_filters( 'bbp_register_topic_reply_post_type',
    369369                                array (
    370                                         'labels'            => $topic_reply_labels,
    371                                         'rewrite'           => $topic_reply_rewrite,
    372                                         'supports'          => $topic_reply_supports,
     370                                        'labels'            => $reply_labels,
     371                                        'rewrite'           => $reply_rewrite,
     372                                        'supports'          => $reply_supports,
    373373                                        'menu_position'     => '100',
    374374                                        'public'            => true,
     
    376376                                        'can_export'        => true,
    377377                                        'capability_type'   => 'post',
    378                                         'hierarchical'      => false,
     378                                        'hierarchical'      => true,
    379379                                        'query_var'         => true,
    380380                                        'menu_icon'         => ''
  • branches/plugin/bbp-templatetags.php

    r2554 r2557  
    351351                        $forum_id = bbp_get_forum_id();
    352352
    353                 $forum_topic_replies = get_pages( array( 'post_parent' => $forum_id, 'post_type' => BBP_TOPIC_REPLY_POST_TYPE_ID ) );
     353                $forum_topic_replies = get_pages( array( 'post_parent' => $forum_id, 'post_type' => BBP_REPLY_POST_TYPE_ID ) );
    354354
    355355                return apply_filters( 'bbp_get_forum_topic_reply_count', count( $forum_topic_replies, COUNT_RECURSIVE ) );
     
    750750                        $topic_id = bbp_get_topic_id();
    751751
    752                 $topic_replies = get_pages( array( 'post_parent' => $topic_id, 'post_type' => BBP_TOPIC_REPLY_POST_TYPE_ID ) );
     752                $topic_replies = get_pages( array( 'post_parent' => $topic_id, 'post_type' => BBP_REPLY_POST_TYPE_ID ) );
    753753
    754754                return apply_filters( 'bbp_get_topic_reply_count', count( $topic_replies, COUNT_RECURSIVE ) );
     
    880880        $default = array(
    881881                // Narrow query down to bbPress topics
    882                 'post_type'        => BBP_TOPIC_REPLY_POST_TYPE_ID,
     882                'post_type'        => BBP_REPLY_POST_TYPE_ID,
    883883
    884884                // Forum ID
     
    12491249        global $wp_query;
    12501250
    1251         if ( BBP_TOPIC_REPLY_POST_TYPE_ID === $wp_query->query_vars['post_type'] )
     1251        if ( BBP_REPLY_POST_TYPE_ID === $wp_query->query_vars['post_type'] )
    12521252                return true;
    12531253
Note: See TracChangeset for help on using the changeset viewer.