Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/05/2025 02:27:53 AM (9 months ago)
Author:
johnjamesjacoby
Message:

Tools - Code Improvement: docs & code formatting improvements.

Props johnjamesjacoby, noruzzaman.

Fixes #3659.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/topics.php

    r7379 r7380  
    22
    33/**
    4  * bbPress Topics Admin Class
     4 * bbPress Topics Admin Class.
    55 *
    66 * @package bbPress
     
    1313if ( ! class_exists( 'BBP_Topics_Admin' ) ) :
    1414/**
    15  * Loads bbPress topics admin area
     15 * Loads bbPress topics admin area.
    1616 *
    1717 * @package bbPress
     
    2424
    2525        /**
    26          * @var The post type of this admin component
     26         * @var The post type of this admin component.
    2727         */
    2828        private $post_type = '';
     
    3131
    3232        /**
    33          * The main bbPress topics admin loader
     33         * The main bbPress topics admin loader.
    3434         *
    3535         * @since 2.0.0 bbPress (r2515)
     
    4141
    4242        /**
    43          * Setup the admin hooks, actions and filters
     43         * Setup the admin hooks, actions and filters.
    4444         *
    4545         * @since 2.0.0 bbPress (r2646)
     
    9595
    9696        /**
    97          * Admin globals
     97         * Admin globals.
    9898         *
    9999         * @since 2.0.0 bbPress (r2646)
     
    108108
    109109        /**
    110          * Contextual help for bbPress topic edit page
     110         * Contextual help for bbPress topic edit page.
    111111         *
    112112         * @since 2.0.0 bbPress (r3119)
     
    180180
    181181        /**
    182          * Contextual help for bbPress topic edit page
     182         * Contextual help for bbPress topic edit page.
    183183         *
    184184         * @since 2.0.0 bbPress (r3119)
     
    356356
    357357        /**
    358          * Add the topic attributes meta-box
     358         * Add the topic attributes meta-box.
    359359         *
    360360         * @since 2.0.0 bbPress (r2744)
     
    372372
    373373        /**
    374          * Add the author info meta-box
     374         * Add the author info meta-box.
    375375         *
    376376         * @since 2.0.0 bbPress (r2828)
     
    395395
    396396        /**
    397          * Add the replies meta-box
     397         * Add the replies meta-box.
    398398         *
    399399         * Allows viewing & moderating of replies to a topic, based on the way
     
    421421
    422422        /**
    423          * Add the engagements meta-box
     423         * Add the engagements meta-box.
    424424         *
    425425         * Allows viewing of users who have engaged in a topic.
     
    451451
    452452        /**
    453          * Add the favorites meta-box
     453         * Add the favorites meta-box.
    454454         *
    455455         * Allows viewing of users who have favorited a topic.
     
    481481
    482482        /**
    483          * Add the subscriptions meta-box
     483         * Add the subscriptions meta-box.
    484484         *
    485485         * Allows viewing of users who have subscribed to a topic.
     
    511511
    512512        /**
    513          * Remove comments & discussion meta-boxes if comments are not supported
     513         * Remove comments & discussion meta-boxes if comments are not supported.
    514514         *
    515515         * @since 2.6.0 bbPress (r6186)
     
    523523
    524524        /**
    525          * Pass the topic attributes for processing
     525         * Pass the topic attributes for processing.
    526526         *
    527527         * @since 2.0.0 bbPress (r2746)
    528528         *
    529          * @param int $topic_id Topic id
    530          * @return int Parent id
     529         * @param int $topic_id Topic id.
     530         * @return int Parent id.
    531531         */
    532532        public function save_meta_boxes( $topic_id ) {
     
    576576
    577577        /**
    578          * Toggle topic
     578         * Toggle topic.
    579579         *
    580580         * Handles the admin-side opening/closing, sticking/unsticking and
    581          * spamming/unspamming of topics
     581         * spamming/unspamming of topics.
    582582         *
    583583         * @since 2.0.0 bbPress (r2727)
     
    695695
    696696        /**
    697          * Toggle topic notices
     697         * Toggle topic notices.
    698698         *
    699699         * Display the success/error notices from
     
    817817
    818818        /**
    819          * Returns an array of keys used to sort row actions
     819         * Returns an array of keys used to sort row actions.
    820820         *
    821821         * @since 2.6.0 bbPress (r6771)
     
    845845
    846846        /**
    847          * Returns an array of notice toggles
     847         * Returns an array of notice toggles.
    848848         *
    849849         * @since 2.6.0 bbPress (r6396)
     
    871871
    872872        /**
    873          * Returns an array of notice toggles
     873         * Returns an array of notice toggles.
    874874         *
    875875         * @since 2.6.0 bbPress (r6396)
     
    892892
    893893        /**
    894          * Manage the column headers for the topics page
     894         * Manage the column headers for the topics page.
    895895         *
    896896         * @since 2.0.0 bbPress (r2485)
    897897         *
    898          * @param array $columns The columns
    899          *
    900          * @return array $columns bbPress topic columns
     898         * @param array $columns The columns.
     899         *
     900         * @return array $columns bbPress topic columns.
    901901         */
    902902        public function column_headers( $columns ) {
     
    917917
    918918        /**
    919          * Print extra columns for the topics page
     919         * Print extra columns for the topics page.
    920920         *
    921921         * @since 2.0.0 bbPress (r2485)
    922922         *
    923          * @param string $column Column
    924          * @param int $topic_id Topic id
     923         * @param string $column Column.
     924         * @param int $topic_id Topic id.
    925925         */
    926926        public function column_data( $column, $topic_id ) {
     
    997997
    998998        /**
    999          * Topic Row actions
     999         * Topic Row actions.
    10001000         *
    10011001         * Remove the quick-edit action link under the topic title and add the
    1002          * content and close/stick/spam links
     1002         * content and close/stick/spam links.
    10031003         *
    10041004         * @since 2.0.0 bbPress (r2485)
    10051005         *
    1006          * @param array  $actions Actions
    1007          * @param object $topic   Topic object
    1008          *
    1009          * @return array $actions Actions
     1006         * @param array  $actions Actions.
     1007         * @param object $topic   Topic object.
     1008         *
     1009         * @return array $actions Actions.
    10101010         */
    10111011        public function row_actions( $actions = array(), $topic = false ) {
     
    11221122
    11231123        /**
    1124          * Sort row actions by key
     1124         * Sort row actions by key.
    11251125         *
    11261126         * @since 2.6.0
     
    11511151
    11521152        /**
    1153          * Add forum dropdown to topic and reply list table filters
     1153         * Add forum dropdown to topic and reply list table filters.
    11541154         *
    11551155         * @since 2.0.0 bbPress (r2991)
    11561156         *
    1157          * @return bool False. If post type is not topic or reply
     1157         * @return bool False. If post type is not topic or reply.
    11581158         */
    11591159        public function filter_dropdown() {
     
    11741174
    11751175        /**
    1176          * Add "Empty Spam" button for moderators
     1176         * Add "Empty Spam" button for moderators.
    11771177         *
    11781178         * @since 2.6.0 bbPress (r6791)
     
    12101210
    12111211        /**
    1212          * Adjust the request query and include the forum id
     1212         * Adjust the request query and include the forum id.
    12131213         *
    12141214         * @since 2.0.0 bbPress (r2991)
    12151215         *
    1216          * @param array $query_vars Query variables from {@link WP_Query}
    1217          * @return array Processed Query Vars
     1216         * @param array $query_vars Query variables from {@link WP_Query}.
     1217         * @return array Processed Query Vars.
    12181218         */
    12191219        public function filter_post_rows( $query_vars ) {
     
    12311231
    12321232        /**
    1233          * Custom user feedback messages for topic post type
     1233         * Custom user feedback messages for topic post type.
    12341234         *
    12351235         * @since 2.0.0 bbPress (r3080)
     
    13241324
    13251325/**
    1326  * Setup bbPress Topics Admin
     1326 * Setup bbPress Topics Admin.
    13271327 *
    13281328 * This is currently here to make hooking and unhooking of the admin UI easy.
     
    13311331 * @since 2.0.0 bbPress (r2596)
    13321332 *
    1333  * @param WP_Screen $current_screen Current screen object
     1333 * @param WP_Screen $current_screen Current screen object.
    13341334 */
    13351335function bbp_admin_topics( $current_screen ) {
Note: See TracChangeset for help on using the changeset viewer.