| @@ -1,64 +1,64 @@ | ||
| 1 | -<?php | |
| 2 | -// Create a section. | |
| 3 | -$filter_options = [ | |
| 4 | - 'open' => esc_html__( 'Open', 'bbp-core' ), | |
| 5 | - 'closed' => esc_html__( 'Closed', 'bbp-core' ), | |
| 6 | - 'hidden' => esc_html__( 'Hidden', 'bbp-core' ), | |
| 7 | - 'no_reply' => esc_html__( 'No Reply', 'bbp-core' ), | |
| 8 | - 'solved' => esc_html__( 'Solved', 'bbp-core' ), | |
| 9 | - 'unsolved' => esc_html__( 'Unsolved', 'bbp-core' ), | |
| 10 | - 'all' => esc_html__( 'All Topics', 'bbp-core' ), | |
| 11 | - 'trash' => esc_html__( 'Trash', 'bbp-core' ), | |
| 12 | -]; | |
| 13 | - | |
| 14 | -$default_options = [ | |
| 15 | - '.open-topics' => esc_html__( 'Open', 'bbp-core' ), | |
| 16 | - '.closed-topics' => esc_html__( 'Closed', 'bbp-core' ), | |
| 17 | - '.hidden-topics' => esc_html__( 'Hidden', 'bbp-core' ), | |
| 18 | - '.no-reply' => esc_html__( 'No Reply', 'bbp-core' ), | |
| 19 | - '.solved' => esc_html__( 'Solved', 'bbp-core' ), | |
| 20 | - '.unsolved' => esc_html__( 'Unsolved', 'bbp-core' ), | |
| 21 | - 'all' => esc_html__( 'All Topics', 'bbp-core' ) | |
| 22 | -]; | |
| 23 | - | |
| 24 | -$default_filter_options = [ 'open', 'closed', 'hidden', 'no_reply', 'all', 'trash' ]; | |
| 25 | - | |
| 26 | -CSF::createSection( | |
| 27 | - $prefix, | |
| 28 | - [ | |
| 29 | - 'title' => esc_html__( 'Forum Builder', 'bbp-core' ), | |
| 30 | - 'icon' => 'dashicons dashicons-dashboard', | |
| 31 | - 'fields' => [ | |
| 32 | - [ | |
| 33 | - 'id' => 'is_bbp_post_types_hidden', | |
| 34 | - 'type' => 'switcher', | |
| 35 | - 'default' => false, | |
| 36 | - 'title' => esc_html__( 'Classic bbPress post types', 'bbp-core' ), | |
| 37 | - 'subtitle' => esc_html__( 'Since you can manage the Forums from our unified forums UI, you can hide or disable the classic bbPress menus.', 'bbp-core' ), | |
| 38 | - 'desc' => esc_html__( 'Native Forum, Topics and Replies post types menus will be hidden. ', 'bbp-core' ), | |
| 39 | - 'text_on' => esc_html__( 'Show', 'bbp-core' ), | |
| 40 | - 'text_off' => esc_html__( 'Hide', 'bbp-core' ), | |
| 41 | - 'text_width' => 85 | |
| 42 | - ], | |
| 43 | - | |
| 44 | - [ | |
| 45 | - 'id' => 'default_filter', | |
| 46 | - 'type' => 'select', | |
| 47 | - 'title' => esc_html__( 'Choose default filter', 'bbp-core' ), | |
| 48 | - 'placeholder' => esc_html__( 'Select an option', 'bbp-core' ), | |
| 49 | - 'options' => $default_options, | |
| 50 | - 'default' => '.open-topics', | |
| 51 | - ], | |
| 52 | - | |
| 53 | - [ | |
| 54 | - 'id' => 'filter_buttons', | |
| 55 | - 'type' => 'button_set', | |
| 56 | - 'title' => esc_html__( 'Filters to show on admin page.', 'bbp-core' ), | |
| 57 | - 'class' => 'bbpc-filter-btn-settings', | |
| 58 | - 'multiple' => true, | |
| 59 | - 'options' => $filter_options, | |
| 60 | - 'default' => $default_filter_options, | |
| 61 | - ], | |
| 62 | - ], | |
| 63 | - ] | |
| 64 | -); | |
| 1 | +<?php | |
| 2 | +// Create a section. | |
| 3 | +$filter_options = [ | |
| 4 | + 'open' => esc_html__( 'Open', 'forumax' ), | |
| 5 | + 'closed' => esc_html__( 'Closed', 'forumax' ), | |
| 6 | + 'hidden' => esc_html__( 'Hidden', 'forumax' ), | |
| 7 | + 'no_reply' => esc_html__( 'No Reply', 'forumax' ), | |
| 8 | + 'solved' => esc_html__( 'Solved', 'forumax' ), | |
| 9 | + 'unsolved' => esc_html__( 'Unsolved', 'forumax' ), | |
| 10 | + 'all' => esc_html__( 'All Topics', 'forumax' ), | |
| 11 | + 'trash' => esc_html__( 'Trash', 'forumax' ), | |
| 12 | +]; | |
| 13 | + | |
| 14 | +$default_options = [ | |
| 15 | + '.open-topics' => esc_html__( 'Open', 'forumax' ), | |
| 16 | + '.closed-topics' => esc_html__( 'Closed', 'forumax' ), | |
| 17 | + '.hidden-topics' => esc_html__( 'Hidden', 'forumax' ), | |
| 18 | + '.no-reply' => esc_html__( 'No Reply', 'forumax' ), | |
| 19 | + '.solved' => esc_html__( 'Solved', 'forumax' ), | |
| 20 | + '.unsolved' => esc_html__( 'Unsolved', 'forumax' ), | |
| 21 | + 'all' => esc_html__( 'All Topics', 'forumax' ) | |
| 22 | +]; | |
| 23 | + | |
| 24 | +$default_filter_options = [ 'open', 'closed', 'hidden', 'no_reply', 'all', 'trash' ]; | |
| 25 | + | |
| 26 | +CSF::createSection( | |
| 27 | + $prefix, | |
| 28 | + [ | |
| 29 | + 'title' => esc_html__( 'Forum Builder', 'forumax' ), | |
| 30 | + 'icon' => 'dashicons dashicons-dashboard', | |
| 31 | + 'fields' => [ | |
| 32 | + [ | |
| 33 | + 'id' => 'is_bbp_post_types_hidden', | |
| 34 | + 'type' => 'switcher', | |
| 35 | + 'default' => false, | |
| 36 | + 'title' => esc_html__( 'Classic post types', 'forumax' ), | |
| 37 | + 'subtitle' => esc_html__( 'Since you can manage the Forums from our unified forums UI, you can hide or disable the classic menus.', 'forumax' ), | |
| 38 | + 'desc' => esc_html__( 'Native Forum, Topics and Replies post types menus will be hidden. ', 'forumax' ), | |
| 39 | + 'text_on' => esc_html__( 'Show', 'forumax' ), | |
| 40 | + 'text_off' => esc_html__( 'Hide', 'forumax' ), | |
| 41 | + 'text_width' => 85 | |
| 42 | + ], | |
| 43 | + | |
| 44 | + [ | |
| 45 | + 'id' => 'default_filter', | |
| 46 | + 'type' => 'select', | |
| 47 | + 'title' => esc_html__( 'Choose default filter', 'forumax' ), | |
| 48 | + 'placeholder' => esc_html__( 'Select an option', 'forumax' ), | |
| 49 | + 'options' => $default_options, | |
| 50 | + 'default' => '.open-topics', | |
| 51 | + ], | |
| 52 | + | |
| 53 | + [ | |
| 54 | + 'id' => 'filter_buttons', | |
| 55 | + 'type' => 'button_set', | |
| 56 | + 'title' => esc_html__( 'Filters to show on admin page.', 'forumax' ), | |
| 57 | + 'class' => 'bbpc-filter-btn-settings', | |
| 58 | + 'multiple' => true, | |
| 59 | + 'options' => $filter_options, | |
| 60 | + 'default' => $default_filter_options, | |
| 61 | + ], | |
| 62 | + ], | |
| 63 | + ] | |
| 64 | +); | |