Skip to:
Content

bbPress.org

Changeset 7278

Timestamp:
07/02/2024 06:19:31 PM (6 weeks ago)
Author:
johnjamesjacoby
Message:

Admin: add post-state support to admin-area list-tables

This change checks posts for shortcode usages and adds "state" labels for them, to help make Forum integration easier to identify from within the list table context (usually Pages, but currently not post-type specific).

It does this by introducing BBP_Admin::display_post_states() and hooking it in as a filter to display_post_states.

Committer note: get_page_by_path() would offer more precision but also be significantly more costly to call here, so instead there is a fuzzy match on post_name for the Forum & Topic Archive pages only.

Fixes #3605.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/classes/class-bbp-admin.php

    r7268 r7278  
    219219        // Allow keymasters to save forums settings
    220220        add_filter( 'option_page_capability_bbpress',  array( $this, 'option_page_capability_bbpress' ) );
     221
     222
     223
    221224
    222225        /** Network Admin *****************************************************/
     
    908911        $capability = $this->minimum_capability;
    909912        return $capability;
     913
     914
     915
     916
     917
     918
     919
     920
     921
     922
     923
     924
     925
     926
     927
     928
     929
     930
     931
     932
     933
     934
     935
     936
     937
     938
     939
     940
     941
     942
     943
     944
     945
     946
     947
     948
     949
     950
     951
     952
     953
     954
     955
     956
     957
     958
     959
     960
     961
     962
     963
     964
     965
     966
     967
     968
     969
     970
     971
     972
     973
     974
     975
     976
     977
     978
     979
     980
     981
     982
     983
     984
    910985    }
    911986
Note: See TracChangeset for help on using the changeset viewer.