| 1 |
<?php |
| 2 |
|
| 3 |
// Create a section. |
| 4 |
CSF::createSection( |
| 5 |
$prefix, |
| 6 |
[ |
| 7 |
'title' => __( 'Forum Topics', 'bbp-core' ), |
| 8 |
'id' => 'topics_fields', |
| 9 |
'icon' => 'dashicons dashicons-menu-alt3', |
| 10 |
'fields' => [ |
| 11 |
[ |
| 12 |
'id' => 'is_solved_topics', |
| 13 |
'type' => 'switcher', |
| 14 |
'default' => true, |
| 15 |
'title' => __( 'Solved Topics', 'bbp-core' ), |
| 16 |
'subtitle' => __( 'Enable/ Disable Solved Topics feature.', 'bbp-core' ), |
| 17 |
], |
| 18 |
[ |
| 19 |
'id' => 'is_auto_approval_topics', |
| 20 |
'type' => 'switcher', |
| 21 |
'default' => true, |
| 22 |
'title' => __( 'Auto Approval', 'bbp-core' ), |
| 23 |
'subtitle' => __( 'Enable/ Disable Auto Approval feature.', 'bbp-core' ), |
| 24 |
'class' => 'st-pro-notice', |
| 25 |
], |
| 26 |
[ |
| 27 |
'id' => 'topic_pending_notice', |
| 28 |
'type' => 'text', |
| 29 |
'title' => __( 'Pending Notice', 'bbp-core' ), |
| 30 |
'default' => __( 'Your topic is awaiting for moderation.', 'bbp-core' ), |
| 31 |
'dependency' => [ 'is_auto_approval_topics', '==', false ], |
| 32 |
'class' => 'st-pro-notice', |
| 33 |
], |
| 34 |
[ |
| 35 |
'id' => 'anonymous_topic', |
| 36 |
'type' => 'switcher', |
| 37 |
'title' => __( 'Anonymous Topic', 'bbp-core' ), |
| 38 |
'subtitle' => __( 'Allow anonymous to create topics.', 'bbp-core' ), |
| 39 |
'class' => 'st-pro-notice', |
| 40 |
], |
| 41 |
[ |
| 42 |
'id' => 'anonymous_topic_label', |
| 43 |
'type' => 'text', |
| 44 |
'title' => __( 'Anonymous Label', 'bbp-core' ), |
| 45 |
'default' => __( 'Post Anonymously', 'bbp-core' ), |
| 46 |
'dependency' => [ 'anonymous_topic', '==', 'true', ], |
| 47 |
'class' => 'st-pro-notice', |
| 48 |
], |
| 49 |
|
| 50 |
[ |
| 51 |
'type' => 'subheading', |
| 52 |
'title' => __( 'Reaction', 'bbp-core' ), |
| 53 |
], |
| 54 |
|
| 55 |
[ |
| 56 |
'id' => 'agree_disagree_voting', |
| 57 |
'type' => 'switcher', |
| 58 |
'title' => __( 'Agree/Disagree', 'bbp-core' ), |
| 59 |
'subtitle' => __( 'To enable or disable the agree/disagree reactions.', 'bbp-core' ), |
| 60 |
'class' => 'st-pro-notice bbpc-geo-roles-opt', |
| 61 |
'default' => true, |
| 62 |
], |
| 63 |
|
| 64 |
[ |
| 65 |
'id' => 'reaction_display_condition', |
| 66 |
'type' => 'select', |
| 67 |
'title' => __( 'Display Condition', 'bbp-core' ), |
| 68 |
'subtitle' => __( 'Select the condition to display the reaction buttons.', 'bbp-core' ), |
| 69 |
'options' => [ |
| 70 |
'always' => __( 'Always', 'bbp-core' ), |
| 71 |
'has_replies' => __( 'Has Replies', 'bbp-core' ), |
| 72 |
], |
| 73 |
'default' => 'always', |
| 74 |
'dependency' => [ 'agree_disagree_voting', '==', 'true', ], |
| 75 |
'class' => 'st-pro-notice bbpc-geo-roles-opt', |
| 76 |
], |
| 77 |
|
| 78 |
[ |
| 79 |
'id' => 'reaction_display_condition_count', |
| 80 |
'type' => 'text', |
| 81 |
'title' => __( 'Display Condition Count', 'bbp-core' ), |
| 82 |
'subtitle' => __( 'Number of replies to display the reaction buttons.', 'bbp-core' ), |
| 83 |
'default' => 5, |
| 84 |
'dependency' => [ |
| 85 |
[ 'reaction_display_condition', '==', 'has_replies' ], |
| 86 |
[ 'agree_disagree_voting', '==', 'true' ], |
| 87 |
], |
| 88 |
'class' => 'st-pro-notice bbpc-geo-roles-opt', |
| 89 |
], |
| 90 |
|
| 91 |
[ |
| 92 |
'type' => 'subheading', |
| 93 |
'title' => __( 'Same Topic Voting', 'bbp-core' ), |
| 94 |
], |
| 95 |
[ |
| 96 |
'id' => 'same_topic_voting', |
| 97 |
'type' => 'switcher', |
| 98 |
'title' => __( 'Enable / Disable', 'bbp-core' ), |
| 99 |
'class' => 'st-pro-notice', |
| 100 |
], |
| 101 |
array( |
| 102 |
'id' => 'same_topic_settings', |
| 103 |
'type' => 'tabbed', |
| 104 |
'title' => __( 'Settings', 'bbp-core' ), |
| 105 |
'subtitle' => __( 'Customize voting button text and color for single topic.', 'bbp-core' ), |
| 106 |
'dependency' => [ 'same_topic_voting', '==', 'true', ], |
| 107 |
'tabs' => array( |
| 108 |
array( |
| 109 |
'title' => __( 'Button', 'bbp-core' ), |
| 110 |
'fields' => array( |
| 111 |
[ |
| 112 |
'id' => 'same_topic_voting_label', |
| 113 |
'type' => 'text', |
| 114 |
'title' => __( 'Label', 'bbp-core' ), |
| 115 |
'default' => __( 'I have the same question', 'bbp-core' ), |
| 116 |
'class' => 'st-pro-notice' |
| 117 |
], |
| 118 |
[ |
| 119 |
'id' => 'same_topic_color', |
| 120 |
'type' => 'link_color', |
| 121 |
'title' => __( 'Color', 'bbp-core' ), |
| 122 |
'output' => '.bbpc-same-topic-btn', |
| 123 |
'output_mode' => 'color', |
| 124 |
'output_important' => true, |
| 125 |
'class' => 'st-pro-notice' |
| 126 |
], |
| 127 |
[ |
| 128 |
'id' => 'same_topic_bg_color_normal', |
| 129 |
'type' => 'background', |
| 130 |
'title' => __( 'Background', 'bbp-core' ), |
| 131 |
'background_image' => false, |
| 132 |
'background_attachment' => false, |
| 133 |
'background_position' => false, |
| 134 |
'background_repeat' => false, |
| 135 |
'background_size' => false, |
| 136 |
'output' => '.bbpc-same-topic-btn', |
| 137 |
'output_mode' => 'background', |
| 138 |
'output_important' => true, |
| 139 |
'class' => 'st-pro-notice' |
| 140 |
], |
| 141 |
[ |
| 142 |
'id' => 'same_topic_bg_color_hover', |
| 143 |
'type' => 'background', |
| 144 |
'title' => __( 'Hover Background', 'bbp-core' ), |
| 145 |
'background_image' => false, |
| 146 |
'background_attachment' => false, |
| 147 |
'background_position' => false, |
| 148 |
'background_repeat' => false, |
| 149 |
'background_size' => false, |
| 150 |
'output' => '.bbpc-same-topic-btn:hover', |
| 151 |
'output_mode' => 'background', |
| 152 |
'output_important' => true, |
| 153 |
'class' => 'st-pro-notice' |
| 154 |
] |
| 155 |
) |
| 156 |
), |
| 157 |
array( |
| 158 |
'title' => __( 'Success', 'bbp-core' ), |
| 159 |
'fields' => array( |
| 160 |
[ |
| 161 |
'id' => 'same_topic_voting_success', |
| 162 |
'type' => 'text', |
| 163 |
'title' => __( 'Text', 'bbp-core' ), |
| 164 |
'default' => __( 'Updated vote successfully', 'bbp-core' ), |
| 165 |
'class' => 'st-pro-notice' |
| 166 |
], |
| 167 |
[ |
| 168 |
'id' => 'same_topic_success_color', |
| 169 |
'type' => 'link_color', |
| 170 |
'title' => __( 'Color', 'bbp-core' ), |
| 171 |
'default' => array( |
| 172 |
'color' => '#4a4a4a', |
| 173 |
'hover' => '#4a4a4a', |
| 174 |
), |
| 175 |
'output' => '.same-topic-voting-notice', |
| 176 |
'output_mode' => 'color', |
| 177 |
'output_important' => true, |
| 178 |
'class' => 'st-pro-notice' |
| 179 |
], |
| 180 |
[ |
| 181 |
'id' => 'same_topic_bg_success_color', |
| 182 |
'type' => 'background', |
| 183 |
'title' => __( 'Background', 'bbp-core' ), |
| 184 |
'background_image' => false, |
| 185 |
'background_attachment' => false, |
| 186 |
'background_position' => false, |
| 187 |
'background_repeat' => false, |
| 188 |
'background_size' => false, |
| 189 |
'default' => [ |
| 190 |
'background-color' => '#f9f9f9' |
| 191 |
], |
| 192 |
'output' => '.same-topic-voting-notice', |
| 193 |
'output_mode' => 'background', |
| 194 |
'output_important' => true, |
| 195 |
'class' => 'st-pro-notice' |
| 196 |
], |
| 197 |
[ |
| 198 |
'id' => 'same_topic_bg_success_color_hover', |
| 199 |
'type' => 'background', |
| 200 |
'title' => __( 'Hover Background', 'bbp-core' ), |
| 201 |
'background_image' => false, |
| 202 |
'background_attachment' => false, |
| 203 |
'background_position' => false, |
| 204 |
'background_repeat' => false, |
| 205 |
'background_size' => false, |
| 206 |
'default' => [ |
| 207 |
'background-color' => '#f9f9f9' |
| 208 |
], |
| 209 |
'output' => '.same-topic-voting-notice:hover', |
| 210 |
'output_mode' => 'background', |
| 211 |
'output_important' => true, |
| 212 |
'class' => 'st-pro-notice' |
| 213 |
] |
| 214 |
) |
| 215 |
) |
| 216 |
) |
| 217 |
) |
| 218 |
] |
| 219 |
] |
| 220 |
); |