Skip to:
Content

Changeset 2490


Ignore:
Timestamp:
07/19/2010 05:27:33 AM (8 years ago)
Author:
PeteMall
Message:

Set width for new columns and consolidate row_action functions.

File:
1 edited

Legend:

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

    r2485 r2490  
    2020// Forum columns (in page row)
    2121add_action( 'manage_pages_custom_column',                           array( 'BBP_Admin', 'forums_column_data' ), 10, 2 );
    22 add_filter( 'page_row_actions',                                     array( 'BBP_Admin', 'forums_post_row_actions' ), 10, 2 );
     22add_filter( 'page_row_actions',                                     array( 'BBP_Admin', 'remove_row_actions' ), 10, 2 );
    2323
    2424// Topic column headers.
     
    2727// Topic columns (in post row)
    2828add_action( 'manage_posts_custom_column',                           array( 'BBP_Admin', 'topics_column_data' ), 10, 2 );
    29 add_filter( 'page_row_actions',                                     array( 'BBP_Admin', 'topics_post_row_actions' ), 10, 2 );
     29add_filter( 'post_row_actions',                                     array( 'BBP_Admin', 'remove_row_actions' ), 10, 2 );
    3030
    3131// Topic metabox actions
     
    190190            }
    191191           
    192             .column-bbp_topics { width: 10%; }
     192            .column-bbp_forum_topic_count, .column-bbp_forum_topic_reply_count, .column-bbp_topic_forum, .column-bbp_topic_reply_count { width: 10%; }
    193193            <?php endif; ?>
    194194        /*]]>*/
     
    286286
    287287    /**
    288      * forums_post_row_actions ( $actions, $post )
     288     * remove_row_actions ( $actions, $post )
    289289     *
    290290     * Remove the quick-edit action link and display the description under the forum title
     
    294294     * @return array $actions
    295295     */
    296     function forums_post_row_actions ( $actions, $post ) {
    297         if ( BBP_FORUM_POST_TYPE_ID == $post->post_type )
     296    function remove_row_actions ( $actions, $post ) {
     297        if ( in_array( $post->post_type, array( BBP_FORUM_POST_TYPE_ID, BBP_TOPIC_POST_TYPE_ID ) ) ) {
    298298            unset( $actions['inline'] );
    299            
    300         // simple hack to show the forum description under the title
    301         the_content();
     299
     300            // simple hack to show the forum description under the title
     301            the_content();
     302        }
    302303        return $actions;
    303304    }
     
    345346                break;
    346347        }
    347     }
    348 
    349     /**
    350      * topics_post_row_actions ( $actions, $post )
    351      *
    352      * Remove the quick-edit action link and display the description under the topic title
    353      *
    354      * @param array $actions
    355      * @param array $post
    356      * @return array $actions
    357      */
    358     function topics_post_row_actions ( $actions, $post ) {
    359         if ( BBP_TOPIC_POST_TYPE_ID == $post->post_type )
    360             unset( $actions['inline'] );
    361 
    362         // simple hack to show the forum description under the title
    363         the_content();
    364         return $actions;
    365348    }
    366349}
Note: See TracChangeset for help on using the changeset viewer.