| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * bbPress Admin Settings. | |
| 4 | + * bbPress Admin Settings | |
| 5 | 5 | * |
| 6 | 6 | * @package bbPress |
| 7 | 7 | * @subpackage Administration |
| 8 | 8 | */ |
| @@ -108,457 +108,457 @@ | ||
| 108 | 108 | return (array) apply_filters( |
| 109 | 109 | 'bbp_admin_get_settings_fields', |
| 110 | 110 | array( |
| 111 | 111 | |
| 112 | - /** User Section **************************************************/ | |
| 112 | + /** User Section ******************************************************/ | |
| 113 | 113 | |
| 114 | - 'bbp_settings_users' => array( | |
| 114 | + 'bbp_settings_users' => array( | |
| 115 | 115 | |
| 116 | - // Default role setting | |
| 117 | - '_bbp_default_role' => array( | |
| 118 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 119 | - 'args' => array() | |
| 120 | - ), | |
| 116 | + // Default role setting | |
| 117 | + '_bbp_default_role' => array( | |
| 118 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 119 | + 'args' => array() | |
| 120 | + ), | |
| 121 | 121 | |
| 122 | - // Allow global access | |
| 123 | - '_bbp_allow_global_access' => array( | |
| 124 | - 'title' => esc_html__( 'Roles', 'bbpress' ), | |
| 125 | - 'callback' => 'bbp_admin_setting_callback_global_access', | |
| 126 | - 'sanitize_callback' => 'intval', | |
| 127 | - 'args' => array() | |
| 128 | - ), | |
| 122 | + // Allow global access | |
| 123 | + '_bbp_allow_global_access' => array( | |
| 124 | + 'title' => esc_html__( 'Roles', 'bbpress' ), | |
| 125 | + 'callback' => 'bbp_admin_setting_callback_global_access', | |
| 126 | + 'sanitize_callback' => 'intval', | |
| 127 | + 'args' => array() | |
| 128 | + ), | |
| 129 | 129 | |
| 130 | - // Allow content throttling | |
| 131 | - '_bbp_allow_content_throttle' => array( | |
| 132 | - 'sanitize_callback' => 'intval', | |
| 133 | - 'args' => array() | |
| 134 | - ), | |
| 130 | + // Allow content throttling | |
| 131 | + '_bbp_allow_content_throttle' => array( | |
| 132 | + 'sanitize_callback' => 'intval', | |
| 133 | + 'args' => array() | |
| 134 | + ), | |
| 135 | 135 | |
| 136 | - // Throttle setting | |
| 137 | - '_bbp_throttle_time' => array( | |
| 138 | - 'title' => esc_html__( 'Flooding', 'bbpress' ), | |
| 139 | - 'callback' => 'bbp_admin_setting_callback_throttle', | |
| 140 | - 'sanitize_callback' => 'intval', | |
| 141 | - 'args' => array() | |
| 142 | - ), | |
| 136 | + // Throttle setting | |
| 137 | + '_bbp_throttle_time' => array( | |
| 138 | + 'title' => esc_html__( 'Flooding', 'bbpress' ), | |
| 139 | + 'callback' => 'bbp_admin_setting_callback_throttle', | |
| 140 | + 'sanitize_callback' => 'intval', | |
| 141 | + 'args' => array() | |
| 142 | + ), | |
| 143 | 143 | |
| 144 | - // Allow content editing | |
| 145 | - '_bbp_allow_content_edit' => array( | |
| 146 | - 'sanitize_callback' => 'intval', | |
| 147 | - 'args' => array() | |
| 148 | - ), | |
| 144 | + // Allow content editing | |
| 145 | + '_bbp_allow_content_edit' => array( | |
| 146 | + 'sanitize_callback' => 'intval', | |
| 147 | + 'args' => array() | |
| 148 | + ), | |
| 149 | 149 | |
| 150 | - // Edit lock setting | |
| 151 | - '_bbp_edit_lock' => array( | |
| 152 | - 'title' => esc_html__( 'Editing', 'bbpress' ), | |
| 153 | - 'callback' => 'bbp_admin_setting_callback_editlock', | |
| 154 | - 'sanitize_callback' => 'intval', | |
| 155 | - 'args' => array() | |
| 150 | + // Edit lock setting | |
| 151 | + '_bbp_edit_lock' => array( | |
| 152 | + 'title' => esc_html__( 'Editing', 'bbpress' ), | |
| 153 | + 'callback' => 'bbp_admin_setting_callback_editlock', | |
| 154 | + 'sanitize_callback' => 'intval', | |
| 155 | + 'args' => array() | |
| 156 | + ), | |
| 157 | + | |
| 158 | + // Allow anonymous posting setting | |
| 159 | + '_bbp_allow_anonymous' => array( | |
| 160 | + 'title' => esc_html__( 'Anonymous', 'bbpress' ), | |
| 161 | + 'callback' => 'bbp_admin_setting_callback_anonymous', | |
| 162 | + 'sanitize_callback' => 'intval', | |
| 163 | + 'args' => array() | |
| 164 | + ) | |
| 156 | 165 | ), |
| 157 | 166 | |
| 158 | - // Allow anonymous posting setting | |
| 159 | - '_bbp_allow_anonymous' => array( | |
| 160 | - 'title' => esc_html__( 'Anonymous', 'bbpress' ), | |
| 161 | - 'callback' => 'bbp_admin_setting_callback_anonymous', | |
| 162 | - 'sanitize_callback' => 'intval', | |
| 163 | - 'args' => array() | |
| 164 | - ) | |
| 165 | - ), | |
| 167 | + /** Features Section **************************************************/ | |
| 166 | 168 | |
| 167 | - /** Features Section **********************************************/ | |
| 169 | + 'bbp_settings_features' => array( | |
| 168 | 170 | |
| 169 | - 'bbp_settings_features' => array( | |
| 171 | + // Allow auto embedding setting | |
| 172 | + '_bbp_use_autoembed' => array( | |
| 173 | + 'title' => esc_html__( 'Auto-embed links', 'bbpress' ), | |
| 174 | + 'callback' => 'bbp_admin_setting_callback_use_autoembed', | |
| 175 | + 'sanitize_callback' => 'intval', | |
| 176 | + 'args' => array() | |
| 177 | + ), | |
| 170 | 178 | |
| 171 | - // Allow auto embedding setting | |
| 172 | - '_bbp_use_autoembed' => array( | |
| 173 | - 'title' => esc_html__( 'Auto-embed links', 'bbpress' ), | |
| 174 | - 'callback' => 'bbp_admin_setting_callback_use_autoembed', | |
| 175 | - 'sanitize_callback' => 'intval', | |
| 176 | - 'args' => array() | |
| 177 | - ), | |
| 179 | + // Set reply threading level | |
| 180 | + '_bbp_thread_replies_depth' => array( | |
| 181 | + 'title' => esc_html__( 'Reply Threading', 'bbpress' ), | |
| 182 | + 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', | |
| 183 | + 'sanitize_callback' => 'intval', | |
| 184 | + 'args' => array() | |
| 185 | + ), | |
| 178 | 186 | |
| 179 | - // Set reply threading level | |
| 180 | - '_bbp_thread_replies_depth' => array( | |
| 181 | - 'title' => esc_html__( 'Reply Threading', 'bbpress' ), | |
| 182 | - 'callback' => 'bbp_admin_setting_callback_thread_replies_depth', | |
| 183 | - 'sanitize_callback' => 'intval', | |
| 184 | - 'args' => array() | |
| 185 | - ), | |
| 187 | + // Allow threaded replies | |
| 188 | + '_bbp_allow_threaded_replies' => array( | |
| 189 | + 'sanitize_callback' => 'intval', | |
| 190 | + 'args' => array() | |
| 191 | + ), | |
| 186 | 192 | |
| 187 | - // Allow threaded replies | |
| 188 | - '_bbp_allow_threaded_replies' => array( | |
| 189 | - 'sanitize_callback' => 'intval', | |
| 190 | - 'args' => array() | |
| 191 | - ), | |
| 193 | + // Allow topic and reply revisions | |
| 194 | + '_bbp_allow_revisions' => array( | |
| 195 | + 'title' => esc_html__( 'Revisions', 'bbpress' ), | |
| 196 | + 'callback' => 'bbp_admin_setting_callback_revisions', | |
| 197 | + 'sanitize_callback' => 'intval', | |
| 198 | + 'args' => array() | |
| 199 | + ), | |
| 192 | 200 | |
| 193 | - // Allow topic and reply revisions | |
| 194 | - '_bbp_allow_revisions' => array( | |
| 195 | - 'title' => esc_html__( 'Revisions', 'bbpress' ), | |
| 196 | - 'callback' => 'bbp_admin_setting_callback_revisions', | |
| 197 | - 'sanitize_callback' => 'intval', | |
| 198 | - 'args' => array() | |
| 199 | - ), | |
| 201 | + // Allow favorites setting | |
| 202 | + '_bbp_enable_favorites' => array( | |
| 203 | + 'title' => esc_html__( 'Favorites', 'bbpress' ), | |
| 204 | + 'callback' => 'bbp_admin_setting_callback_favorites', | |
| 205 | + 'sanitize_callback' => 'intval', | |
| 206 | + 'args' => array() | |
| 207 | + ), | |
| 200 | 208 | |
| 201 | - // Allow favorites setting | |
| 202 | - '_bbp_enable_favorites' => array( | |
| 203 | - 'title' => esc_html__( 'Favorites', 'bbpress' ), | |
| 204 | - 'callback' => 'bbp_admin_setting_callback_favorites', | |
| 205 | - 'sanitize_callback' => 'intval', | |
| 206 | - 'args' => array() | |
| 207 | - ), | |
| 209 | + // Allow subscriptions setting | |
| 210 | + '_bbp_enable_subscriptions' => array( | |
| 211 | + 'title' => esc_html__( 'Subscriptions', 'bbpress' ), | |
| 212 | + 'callback' => 'bbp_admin_setting_callback_subscriptions', | |
| 213 | + 'sanitize_callback' => 'intval', | |
| 214 | + 'args' => array() | |
| 215 | + ), | |
| 208 | 216 | |
| 209 | - // Allow subscriptions setting | |
| 210 | - '_bbp_enable_subscriptions' => array( | |
| 211 | - 'title' => esc_html__( 'Subscriptions', 'bbpress' ), | |
| 212 | - 'callback' => 'bbp_admin_setting_callback_subscriptions', | |
| 213 | - 'sanitize_callback' => 'intval', | |
| 214 | - 'args' => array() | |
| 215 | - ), | |
| 217 | + // Allow engagements setting | |
| 218 | + '_bbp_enable_engagements' => array( | |
| 219 | + 'title' => esc_html__( 'Engagements', 'bbpress' ), | |
| 220 | + 'callback' => 'bbp_admin_setting_callback_engagements', | |
| 221 | + 'sanitize_callback' => 'intval', | |
| 222 | + 'args' => array() | |
| 223 | + ), | |
| 216 | 224 | |
| 217 | - // Allow engagements setting | |
| 218 | - '_bbp_enable_engagements' => array( | |
| 219 | - 'title' => esc_html__( 'Engagements', 'bbpress' ), | |
| 220 | - 'callback' => 'bbp_admin_setting_callback_engagements', | |
| 221 | - 'sanitize_callback' => 'intval', | |
| 222 | - 'args' => array() | |
| 223 | - ), | |
| 225 | + // Allow topic tags | |
| 226 | + '_bbp_allow_topic_tags' => array( | |
| 227 | + 'title' => esc_html__( 'Topic tags', 'bbpress' ), | |
| 228 | + 'callback' => 'bbp_admin_setting_callback_topic_tags', | |
| 229 | + 'sanitize_callback' => 'intval', | |
| 230 | + 'args' => array() | |
| 231 | + ), | |
| 224 | 232 | |
| 225 | - // Allow topic tags | |
| 226 | - '_bbp_allow_topic_tags' => array( | |
| 227 | - 'title' => esc_html__( 'Topic tags', 'bbpress' ), | |
| 228 | - 'callback' => 'bbp_admin_setting_callback_topic_tags', | |
| 229 | - 'sanitize_callback' => 'intval', | |
| 230 | - 'args' => array() | |
| 231 | - ), | |
| 233 | + // Allow topic tags | |
| 234 | + '_bbp_allow_search' => array( | |
| 235 | + 'title' => esc_html__( 'Search', 'bbpress' ), | |
| 236 | + 'callback' => 'bbp_admin_setting_callback_search', | |
| 237 | + 'sanitize_callback' => 'intval', | |
| 238 | + 'args' => array() | |
| 239 | + ), | |
| 232 | 240 | |
| 233 | - // Allow topic tags | |
| 234 | - '_bbp_allow_search' => array( | |
| 235 | - 'title' => esc_html__( 'Search', 'bbpress' ), | |
| 236 | - 'callback' => 'bbp_admin_setting_callback_search', | |
| 237 | - 'sanitize_callback' => 'intval', | |
| 238 | - 'args' => array() | |
| 239 | - ), | |
| 241 | + // Allow fancy editor setting | |
| 242 | + '_bbp_use_wp_editor' => array( | |
| 243 | + 'title' => esc_html__( 'Post Formatting', 'bbpress' ), | |
| 244 | + 'callback' => 'bbp_admin_setting_callback_use_wp_editor', | |
| 245 | + 'args' => array(), | |
| 246 | + 'sanitize_callback' => 'intval' | |
| 247 | + ), | |
| 240 | 248 | |
| 241 | - // Allow fancy editor setting | |
| 242 | - '_bbp_use_wp_editor' => array( | |
| 243 | - 'title' => esc_html__( 'Post Formatting', 'bbpress' ), | |
| 244 | - 'callback' => 'bbp_admin_setting_callback_use_wp_editor', | |
| 245 | - 'args' => array(), | |
| 246 | - 'sanitize_callback' => 'intval' | |
| 247 | - ), | |
| 249 | + // Allow per-forum moderators | |
| 250 | + '_bbp_allow_forum_mods' => array( | |
| 251 | + 'title' => esc_html__( 'Per-Forum Moderators', 'bbpress' ), | |
| 252 | + 'callback' => 'bbp_admin_setting_callback_forum_mods', | |
| 253 | + 'sanitize_callback' => 'intval', | |
| 254 | + 'args' => array() | |
| 255 | + ), | |
| 248 | 256 | |
| 249 | - // Allow per-forum moderators | |
| 250 | - '_bbp_allow_forum_mods' => array( | |
| 251 | - 'title' => esc_html__( 'Per-Forum Moderators', 'bbpress' ), | |
| 252 | - 'callback' => 'bbp_admin_setting_callback_forum_mods', | |
| 253 | - 'sanitize_callback' => 'intval', | |
| 254 | - 'args' => array() | |
| 257 | + // Allow moderators to edit users | |
| 258 | + '_bbp_allow_super_mods' => array( | |
| 259 | + 'title' => esc_html__( 'Super Moderators', 'bbpress' ), | |
| 260 | + 'callback' => 'bbp_admin_setting_callback_super_mods', | |
| 261 | + 'sanitize_callback' => 'intval', | |
| 262 | + 'capability' => 'edit_users', | |
| 263 | + 'args' => array() | |
| 264 | + ) | |
| 255 | 265 | ), |
| 256 | 266 | |
| 257 | - // Allow moderators to edit users | |
| 258 | - '_bbp_allow_super_mods' => array( | |
| 259 | - 'title' => esc_html__( 'Super Moderators', 'bbpress' ), | |
| 260 | - 'callback' => 'bbp_admin_setting_callback_super_mods', | |
| 261 | - 'sanitize_callback' => 'intval', | |
| 262 | - 'capability' => 'edit_users', | |
| 263 | - 'args' => array() | |
| 264 | - ) | |
| 265 | - ), | |
| 267 | + /** Theme Packages ****************************************************/ | |
| 266 | 268 | |
| 267 | - /** Theme Packages ************************************************/ | |
| 269 | + 'bbp_settings_theme_compat' => array( | |
| 268 | 270 | |
| 269 | - 'bbp_settings_theme_compat' => array( | |
| 271 | + // Theme package setting | |
| 272 | + '_bbp_theme_package_id' => array( | |
| 273 | + 'title' => esc_html__( 'Current Package', 'bbpress' ), | |
| 274 | + 'callback' => 'bbp_admin_setting_callback_subtheme_id', | |
| 275 | + 'sanitize_callback' => 'esc_sql', | |
| 276 | + 'args' => array() | |
| 277 | + ) | |
| 278 | + ), | |
| 270 | 279 | |
| 271 | - // Theme package setting | |
| 272 | - '_bbp_theme_package_id' => array( | |
| 273 | - 'title' => esc_html__( 'Current Package', 'bbpress' ), | |
| 274 | - 'callback' => 'bbp_admin_setting_callback_subtheme_id', | |
| 275 | - 'sanitize_callback' => 'esc_sql', | |
| 276 | - 'args' => array() | |
| 277 | - ) | |
| 278 | - ), | |
| 280 | + /** Per Page Section **************************************************/ | |
| 279 | 281 | |
| 280 | - /** Per Page Section **********************************************/ | |
| 282 | + 'bbp_settings_per_page' => array( | |
| 281 | 283 | |
| 282 | - 'bbp_settings_per_page' => array( | |
| 284 | + // Topics per page setting | |
| 285 | + '_bbp_topics_per_page' => array( | |
| 286 | + 'title' => esc_html__( 'Topics', 'bbpress' ), | |
| 287 | + 'callback' => 'bbp_admin_setting_callback_topics_per_page', | |
| 288 | + 'sanitize_callback' => 'intval', | |
| 289 | + 'args' => array( 'label_for' => '_bbp_topics_per_page' ) | |
| 290 | + ), | |
| 283 | 291 | |
| 284 | - // Topics per page setting | |
| 285 | - '_bbp_topics_per_page' => array( | |
| 286 | - 'title' => esc_html__( 'Topics', 'bbpress' ), | |
| 287 | - 'callback' => 'bbp_admin_setting_callback_topics_per_page', | |
| 288 | - 'sanitize_callback' => 'intval', | |
| 289 | - 'args' => array( 'label_for' => '_bbp_topics_per_page' ) | |
| 292 | + // Replies per page setting | |
| 293 | + '_bbp_replies_per_page' => array( | |
| 294 | + 'title' => esc_html__( 'Replies', 'bbpress' ), | |
| 295 | + 'callback' => 'bbp_admin_setting_callback_replies_per_page', | |
| 296 | + 'sanitize_callback' => 'intval', | |
| 297 | + 'args' => array( 'label_for' => '_bbp_replies_per_page' ) | |
| 298 | + ) | |
| 290 | 299 | ), |
| 291 | 300 | |
| 292 | - // Replies per page setting | |
| 293 | - '_bbp_replies_per_page' => array( | |
| 294 | - 'title' => esc_html__( 'Replies', 'bbpress' ), | |
| 295 | - 'callback' => 'bbp_admin_setting_callback_replies_per_page', | |
| 296 | - 'sanitize_callback' => 'intval', | |
| 297 | - 'args' => array( 'label_for' => '_bbp_replies_per_page' ) | |
| 298 | - ) | |
| 299 | - ), | |
| 301 | + /** Per RSS Page Section **********************************************/ | |
| 300 | 302 | |
| 301 | - /** Per RSS Page Section ******************************************/ | |
| 303 | + 'bbp_settings_per_rss_page' => array( | |
| 302 | 304 | |
| 303 | - 'bbp_settings_per_rss_page' => array( | |
| 305 | + // Topics per page setting | |
| 306 | + '_bbp_topics_per_rss_page' => array( | |
| 307 | + 'title' => esc_html__( 'Topics', 'bbpress' ), | |
| 308 | + 'callback' => 'bbp_admin_setting_callback_topics_per_rss_page', | |
| 309 | + 'sanitize_callback' => 'intval', | |
| 310 | + 'args' => array( 'label_for' => '_bbp_topics_per_rss_page' ) | |
| 311 | + ), | |
| 304 | 312 | |
| 305 | - // Topics per page setting | |
| 306 | - '_bbp_topics_per_rss_page' => array( | |
| 307 | - 'title' => esc_html__( 'Topics', 'bbpress' ), | |
| 308 | - 'callback' => 'bbp_admin_setting_callback_topics_per_rss_page', | |
| 309 | - 'sanitize_callback' => 'intval', | |
| 310 | - 'args' => array( 'label_for' => '_bbp_topics_per_rss_page' ) | |
| 313 | + // Replies per page setting | |
| 314 | + '_bbp_replies_per_rss_page' => array( | |
| 315 | + 'title' => esc_html__( 'Replies', 'bbpress' ), | |
| 316 | + 'callback' => 'bbp_admin_setting_callback_replies_per_rss_page', | |
| 317 | + 'sanitize_callback' => 'intval', | |
| 318 | + 'args' => array( 'label_for' => '_bbp_replies_per_rss_page' ) | |
| 319 | + ) | |
| 311 | 320 | ), |
| 312 | 321 | |
| 313 | - // Replies per page setting | |
| 314 | - '_bbp_replies_per_rss_page' => array( | |
| 315 | - 'title' => esc_html__( 'Replies', 'bbpress' ), | |
| 316 | - 'callback' => 'bbp_admin_setting_callback_replies_per_rss_page', | |
| 317 | - 'sanitize_callback' => 'intval', | |
| 318 | - 'args' => array( 'label_for' => '_bbp_replies_per_rss_page' ) | |
| 319 | - ) | |
| 320 | - ), | |
| 322 | + /** Front Slugs *******************************************************/ | |
| 321 | 323 | |
| 322 | - /** Front Slugs ***************************************************/ | |
| 324 | + 'bbp_settings_root_slugs' => array( | |
| 323 | 325 | |
| 324 | - 'bbp_settings_root_slugs' => array( | |
| 326 | + // Root slug setting | |
| 327 | + '_bbp_root_slug' => array( | |
| 328 | + 'title' => esc_html__( 'Forum Root', 'bbpress' ), | |
| 329 | + 'callback' => 'bbp_admin_setting_callback_root_slug', | |
| 330 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 331 | + 'args' => array( 'label_for' => '_bbp_root_slug' ) | |
| 332 | + ), | |
| 325 | 333 | |
| 326 | - // Root slug setting | |
| 327 | - '_bbp_root_slug' => array( | |
| 328 | - 'title' => esc_html__( 'Forum Root', 'bbpress' ), | |
| 329 | - 'callback' => 'bbp_admin_setting_callback_root_slug', | |
| 330 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 331 | - 'args' => array( 'label_for' => '_bbp_root_slug' ) | |
| 332 | - ), | |
| 334 | + // Include root setting | |
| 335 | + '_bbp_include_root' => array( | |
| 336 | + 'title' => esc_html__( 'Forum Prefix', 'bbpress' ), | |
| 337 | + 'callback' => 'bbp_admin_setting_callback_include_root', | |
| 338 | + 'sanitize_callback' => 'intval', | |
| 339 | + 'args' => array() | |
| 340 | + ), | |
| 333 | 341 | |
| 334 | - // Include root setting | |
| 335 | - '_bbp_include_root' => array( | |
| 336 | - 'title' => esc_html__( 'Forum Prefix', 'bbpress' ), | |
| 337 | - 'callback' => 'bbp_admin_setting_callback_include_root', | |
| 338 | - 'sanitize_callback' => 'intval', | |
| 339 | - 'args' => array() | |
| 342 | + // What to show on Forum Root | |
| 343 | + '_bbp_show_on_root' => array( | |
| 344 | + 'title' => esc_html__( 'Forum root should show', 'bbpress' ), | |
| 345 | + 'callback' => 'bbp_admin_setting_callback_show_on_root', | |
| 346 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 347 | + 'args' => array( 'label_for' => '_bbp_show_on_root' ) | |
| 348 | + ), | |
| 340 | 349 | ), |
| 341 | 350 | |
| 342 | - // What to show on Forum Root | |
| 343 | - '_bbp_show_on_root' => array( | |
| 344 | - 'title' => esc_html__( 'Forum root should show', 'bbpress' ), | |
| 345 | - 'callback' => 'bbp_admin_setting_callback_show_on_root', | |
| 346 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 347 | - 'args' => array( 'label_for' => '_bbp_show_on_root' ) | |
| 348 | - ), | |
| 349 | - ), | |
| 351 | + /** Single Slugs ******************************************************/ | |
| 350 | 352 | |
| 351 | - /** Single Slugs **************************************************/ | |
| 353 | + 'bbp_settings_single_slugs' => array( | |
| 352 | 354 | |
| 353 | - 'bbp_settings_single_slugs' => array( | |
| 355 | + // Forum slug setting | |
| 356 | + '_bbp_forum_slug' => array( | |
| 357 | + 'title' => esc_html__( 'Forum', 'bbpress' ), | |
| 358 | + 'callback' => 'bbp_admin_setting_callback_forum_slug', | |
| 359 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 360 | + 'args' => array( 'label_for' => '_bbp_forum_slug' ) | |
| 361 | + ), | |
| 354 | 362 | |
| 355 | - // Forum slug setting | |
| 356 | - '_bbp_forum_slug' => array( | |
| 357 | - 'title' => esc_html__( 'Forum', 'bbpress' ), | |
| 358 | - 'callback' => 'bbp_admin_setting_callback_forum_slug', | |
| 359 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 360 | - 'args' => array( 'label_for' => '_bbp_forum_slug' ) | |
| 361 | - ), | |
| 363 | + // Topic slug setting | |
| 364 | + '_bbp_topic_slug' => array( | |
| 365 | + 'title' => esc_html__( 'Topic', 'bbpress' ), | |
| 366 | + 'callback' => 'bbp_admin_setting_callback_topic_slug', | |
| 367 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 368 | + 'args' => array( 'label_for' => '_bbp_topic_slug' ) | |
| 369 | + ), | |
| 362 | 370 | |
| 363 | - // Topic slug setting | |
| 364 | - '_bbp_topic_slug' => array( | |
| 365 | - 'title' => esc_html__( 'Topic', 'bbpress' ), | |
| 366 | - 'callback' => 'bbp_admin_setting_callback_topic_slug', | |
| 367 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 368 | - 'args' => array( 'label_for' => '_bbp_topic_slug' ) | |
| 369 | - ), | |
| 371 | + // Topic tag slug setting | |
| 372 | + '_bbp_topic_tag_slug' => array( | |
| 373 | + 'title' => esc_html__( 'Topic Tag', 'bbpress' ), | |
| 374 | + 'callback' => 'bbp_admin_setting_callback_topic_tag_slug', | |
| 375 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 376 | + 'args' => array( 'label_for' => '_bbp_topic_tag_slug' ) | |
| 377 | + ), | |
| 370 | 378 | |
| 371 | - // Topic tag slug setting | |
| 372 | - '_bbp_topic_tag_slug' => array( | |
| 373 | - 'title' => esc_html__( 'Topic Tag', 'bbpress' ), | |
| 374 | - 'callback' => 'bbp_admin_setting_callback_topic_tag_slug', | |
| 375 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 376 | - 'args' => array( 'label_for' => '_bbp_topic_tag_slug' ) | |
| 377 | - ), | |
| 379 | + // View slug setting | |
| 380 | + '_bbp_view_slug' => array( | |
| 381 | + 'title' => esc_html__( 'Topic View', 'bbpress' ), | |
| 382 | + 'callback' => 'bbp_admin_setting_callback_view_slug', | |
| 383 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 384 | + 'args' => array( 'label_for' => '_bbp_view_slug' ) | |
| 385 | + ), | |
| 378 | 386 | |
| 379 | - // View slug setting | |
| 380 | - '_bbp_view_slug' => array( | |
| 381 | - 'title' => esc_html__( 'Topic View', 'bbpress' ), | |
| 382 | - 'callback' => 'bbp_admin_setting_callback_view_slug', | |
| 383 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 384 | - 'args' => array( 'label_for' => '_bbp_view_slug' ) | |
| 385 | - ), | |
| 387 | + // Reply slug setting | |
| 388 | + '_bbp_reply_slug' => array( | |
| 389 | + 'title' => _x( 'Reply', 'noun', 'bbpress' ), | |
| 390 | + 'callback' => 'bbp_admin_setting_callback_reply_slug', | |
| 391 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 392 | + 'args' => array( 'label_for' => '_bbp_reply_slug' ) | |
| 393 | + ), | |
| 386 | 394 | |
| 387 | - // Reply slug setting | |
| 388 | - '_bbp_reply_slug' => array( | |
| 389 | - 'title' => _x( 'Reply', 'noun', 'bbpress' ), | |
| 390 | - 'callback' => 'bbp_admin_setting_callback_reply_slug', | |
| 391 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 392 | - 'args' => array( 'label_for' => '_bbp_reply_slug' ) | |
| 393 | - ), | |
| 395 | + // Edit slug setting | |
| 396 | + '_bbp_edit_slug' => array( | |
| 397 | + 'title' => esc_html__( 'Edit', 'bbpress' ), | |
| 398 | + 'callback' => 'bbp_admin_setting_callback_edit_slug', | |
| 399 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 400 | + 'args' => array( 'label_for' => '_bbp_edit_slug' ) | |
| 401 | + ), | |
| 394 | 402 | |
| 395 | - // Edit slug setting | |
| 396 | - '_bbp_edit_slug' => array( | |
| 397 | - 'title' => esc_html__( 'Edit', 'bbpress' ), | |
| 398 | - 'callback' => 'bbp_admin_setting_callback_edit_slug', | |
| 399 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 400 | - 'args' => array( 'label_for' => '_bbp_edit_slug' ) | |
| 403 | + // Search slug setting | |
| 404 | + '_bbp_search_slug' => array( | |
| 405 | + 'title' => esc_html__( 'Search', 'bbpress' ), | |
| 406 | + 'callback' => 'bbp_admin_setting_callback_search_slug', | |
| 407 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 408 | + 'args' => array( 'label_for' => '_bbp_search_slug' ) | |
| 409 | + ) | |
| 401 | 410 | ), |
| 402 | 411 | |
| 403 | - // Search slug setting | |
| 404 | - '_bbp_search_slug' => array( | |
| 405 | - 'title' => esc_html__( 'Search', 'bbpress' ), | |
| 406 | - 'callback' => 'bbp_admin_setting_callback_search_slug', | |
| 407 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 408 | - 'args' => array( 'label_for' => '_bbp_search_slug' ) | |
| 409 | - ) | |
| 410 | - ), | |
| 412 | + /** User Slugs ********************************************************/ | |
| 411 | 413 | |
| 412 | - /** User Slugs ****************************************************/ | |
| 414 | + 'bbp_settings_user_slugs' => array( | |
| 413 | 415 | |
| 414 | - 'bbp_settings_user_slugs' => array( | |
| 416 | + // User slug setting | |
| 417 | + '_bbp_user_slug' => array( | |
| 418 | + 'title' => esc_html__( 'User Base', 'bbpress' ), | |
| 419 | + 'callback' => 'bbp_admin_setting_callback_user_slug', | |
| 420 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 421 | + 'args' => array( 'label_for' => '_bbp_user_slug' ) | |
| 422 | + ), | |
| 415 | 423 | |
| 416 | - // User slug setting | |
| 417 | - '_bbp_user_slug' => array( | |
| 418 | - 'title' => esc_html__( 'User Base', 'bbpress' ), | |
| 419 | - 'callback' => 'bbp_admin_setting_callback_user_slug', | |
| 420 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 421 | - 'args' => array( 'label_for' => '_bbp_user_slug' ) | |
| 422 | - ), | |
| 424 | + // Topics slug setting | |
| 425 | + '_bbp_topic_archive_slug' => array( | |
| 426 | + 'title' => esc_html__( 'Topics Started', 'bbpress' ), | |
| 427 | + 'callback' => 'bbp_admin_setting_callback_topic_archive_slug', | |
| 428 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 429 | + 'args' => array( 'label_for' => '_bbp_topic_archive_slug' ) | |
| 430 | + ), | |
| 423 | 431 | |
| 424 | - // Topics slug setting | |
| 425 | - '_bbp_topic_archive_slug' => array( | |
| 426 | - 'title' => esc_html__( 'Topics Started', 'bbpress' ), | |
| 427 | - 'callback' => 'bbp_admin_setting_callback_topic_archive_slug', | |
| 428 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 429 | - 'args' => array( 'label_for' => '_bbp_topic_archive_slug' ) | |
| 430 | - ), | |
| 432 | + // Replies slug setting | |
| 433 | + '_bbp_reply_archive_slug' => array( | |
| 434 | + 'title' => esc_html__( 'Replies Created', 'bbpress' ), | |
| 435 | + 'callback' => 'bbp_admin_setting_callback_reply_archive_slug', | |
| 436 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 437 | + 'args' => array( 'label_for' => '_bbp_reply_archive_slug' ) | |
| 438 | + ), | |
| 431 | 439 | |
| 432 | - // Replies slug setting | |
| 433 | - '_bbp_reply_archive_slug' => array( | |
| 434 | - 'title' => esc_html__( 'Replies Created', 'bbpress' ), | |
| 435 | - 'callback' => 'bbp_admin_setting_callback_reply_archive_slug', | |
| 436 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 437 | - 'args' => array( 'label_for' => '_bbp_reply_archive_slug' ) | |
| 438 | - ), | |
| 440 | + // Favorites slug setting | |
| 441 | + '_bbp_user_favs_slug' => array( | |
| 442 | + 'title' => esc_html__( 'Favorite Topics', 'bbpress' ), | |
| 443 | + 'callback' => 'bbp_admin_setting_callback_user_favs_slug', | |
| 444 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 445 | + 'args' => array( 'label_for' => '_bbp_user_favs_slug' ) | |
| 446 | + ), | |
| 439 | 447 | |
| 440 | - // Favorites slug setting | |
| 441 | - '_bbp_user_favs_slug' => array( | |
| 442 | - 'title' => esc_html__( 'Favorite Topics', 'bbpress' ), | |
| 443 | - 'callback' => 'bbp_admin_setting_callback_user_favs_slug', | |
| 444 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 445 | - 'args' => array( 'label_for' => '_bbp_user_favs_slug' ) | |
| 446 | - ), | |
| 448 | + // Subscriptions slug setting | |
| 449 | + '_bbp_user_subs_slug' => array( | |
| 450 | + 'title' => esc_html__( 'Subscriptions', 'bbpress' ), | |
| 451 | + 'callback' => 'bbp_admin_setting_callback_user_subs_slug', | |
| 452 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 453 | + 'args' => array( 'label_for' => '_bbp_user_subs_slug' ) | |
| 454 | + ), | |
| 447 | 455 | |
| 448 | - // Subscriptions slug setting | |
| 449 | - '_bbp_user_subs_slug' => array( | |
| 450 | - 'title' => esc_html__( 'Subscriptions', 'bbpress' ), | |
| 451 | - 'callback' => 'bbp_admin_setting_callback_user_subs_slug', | |
| 452 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 453 | - 'args' => array( 'label_for' => '_bbp_user_subs_slug' ) | |
| 456 | + // Engagements slug setting | |
| 457 | + '_bbp_user_engs_slug' => array( | |
| 458 | + 'title' => esc_html__( 'Engagements', 'bbpress' ), | |
| 459 | + 'callback' => 'bbp_admin_setting_callback_user_engagements_slug', | |
| 460 | + 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 461 | + 'args' => array( 'label_for' => '_bbp_user_engs_slug' ) | |
| 462 | + ) | |
| 454 | 463 | ), |
| 455 | 464 | |
| 456 | - // Engagements slug setting | |
| 457 | - '_bbp_user_engs_slug' => array( | |
| 458 | - 'title' => esc_html__( 'Engagements', 'bbpress' ), | |
| 459 | - 'callback' => 'bbp_admin_setting_callback_user_engagements_slug', | |
| 460 | - 'sanitize_callback' => 'bbp_sanitize_slug', | |
| 461 | - 'args' => array( 'label_for' => '_bbp_user_engs_slug' ) | |
| 462 | - ) | |
| 463 | - ), | |
| 465 | + /** BuddyPress ********************************************************/ | |
| 464 | 466 | |
| 465 | - /** BuddyPress ****************************************************/ | |
| 467 | + 'bbp_settings_buddypress' => array( | |
| 466 | 468 | |
| 467 | - 'bbp_settings_buddypress' => array( | |
| 469 | + // Are group forums enabled? | |
| 470 | + '_bbp_enable_group_forums' => array( | |
| 471 | + 'title' => esc_html__( 'Group Forums', 'bbpress' ), | |
| 472 | + 'callback' => 'bbp_admin_setting_callback_group_forums', | |
| 473 | + 'sanitize_callback' => 'intval', | |
| 474 | + 'args' => array() | |
| 475 | + ), | |
| 468 | 476 | |
| 469 | - // Are group forums enabled? | |
| 470 | - '_bbp_enable_group_forums' => array( | |
| 471 | - 'title' => esc_html__( 'Group Forums', 'bbpress' ), | |
| 472 | - 'callback' => 'bbp_admin_setting_callback_group_forums', | |
| 473 | - 'sanitize_callback' => 'intval', | |
| 474 | - 'args' => array() | |
| 477 | + // Group forums parent forum ID | |
| 478 | + '_bbp_group_forums_root_id' => array( | |
| 479 | + 'title' => esc_html__( 'Primary Forum', 'bbpress' ), | |
| 480 | + 'callback' => 'bbp_admin_setting_callback_group_forums_root_id', | |
| 481 | + 'sanitize_callback' => 'intval', | |
| 482 | + 'args' => array( 'label_for' => '_bbp_group_forums_root_id' ) | |
| 483 | + ) | |
| 475 | 484 | ), |
| 476 | 485 | |
| 477 | - // Group forums parent forum ID | |
| 478 | - '_bbp_group_forums_root_id' => array( | |
| 479 | - 'title' => esc_html__( 'Primary Forum', 'bbpress' ), | |
| 480 | - 'callback' => 'bbp_admin_setting_callback_group_forums_root_id', | |
| 481 | - 'sanitize_callback' => 'intval', | |
| 482 | - 'args' => array( 'label_for' => '_bbp_group_forums_root_id' ) | |
| 483 | - ) | |
| 484 | - ), | |
| 486 | + /** Akismet ***********************************************************/ | |
| 485 | 487 | |
| 486 | - /** Akismet *******************************************************/ | |
| 488 | + 'bbp_settings_akismet' => array( | |
| 487 | 489 | |
| 488 | - 'bbp_settings_akismet' => array( | |
| 490 | + // Should we use Akismet | |
| 491 | + '_bbp_enable_akismet' => array( | |
| 492 | + 'title' => esc_html__( 'Use Akismet', 'bbpress' ), | |
| 493 | + 'callback' => 'bbp_admin_setting_callback_akismet', | |
| 494 | + 'sanitize_callback' => 'intval', | |
| 495 | + 'args' => array() | |
| 496 | + ) | |
| 497 | + ), | |
| 489 | 498 | |
| 490 | - // Should we use Akismet | |
| 491 | - '_bbp_enable_akismet' => array( | |
| 492 | - 'title' => esc_html__( 'Use Akismet', 'bbpress' ), | |
| 493 | - 'callback' => 'bbp_admin_setting_callback_akismet', | |
| 494 | - 'sanitize_callback' => 'intval', | |
| 495 | - 'args' => array() | |
| 496 | - ) | |
| 497 | - ), | |
| 499 | + /** Converter Page ****************************************************/ | |
| 498 | 500 | |
| 499 | - /** Converter Page ************************************************/ | |
| 501 | + // Connection | |
| 502 | + 'bbp_converter_connection' => array( | |
| 500 | 503 | |
| 501 | - // Connection | |
| 502 | - 'bbp_converter_connection' => array( | |
| 504 | + // System Select | |
| 505 | + '_bbp_converter_platform' => array( | |
| 506 | + 'title' => esc_html__( 'Select Platform', 'bbpress' ), | |
| 507 | + 'callback' => 'bbp_converter_setting_callback_platform', | |
| 508 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 509 | + 'args' => array( 'label_for' => '_bbp_converter_platform' ) | |
| 510 | + ), | |
| 503 | 511 | |
| 504 | - // System Select | |
| 505 | - '_bbp_converter_platform' => array( | |
| 506 | - 'title' => esc_html__( 'Select Platform', 'bbpress' ), | |
| 507 | - 'callback' => 'bbp_converter_setting_callback_platform', | |
| 508 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 509 | - 'args' => array( 'label_for' => '_bbp_converter_platform' ) | |
| 510 | - ), | |
| 512 | + // Database Server | |
| 513 | + '_bbp_converter_db_server' => array( | |
| 514 | + 'title' => esc_html__( 'Database Server', 'bbpress' ), | |
| 515 | + 'callback' => 'bbp_converter_setting_callback_dbserver', | |
| 516 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 517 | + 'args' => array( 'label_for' => '_bbp_converter_db_server' ) | |
| 518 | + ), | |
| 511 | 519 | |
| 512 | - // Database Server | |
| 513 | - '_bbp_converter_db_server' => array( | |
| 514 | - 'title' => esc_html__( 'Database Server', 'bbpress' ), | |
| 515 | - 'callback' => 'bbp_converter_setting_callback_dbserver', | |
| 516 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 517 | - 'args' => array( 'label_for' => '_bbp_converter_db_server' ) | |
| 518 | - ), | |
| 520 | + // Database Server Port | |
| 521 | + '_bbp_converter_db_port' => array( | |
| 522 | + 'title' => esc_html__( 'Database Port', 'bbpress' ), | |
| 523 | + 'callback' => 'bbp_converter_setting_callback_dbport', | |
| 524 | + 'sanitize_callback' => 'intval', | |
| 525 | + 'args' => array( 'label_for' => '_bbp_converter_db_port' ) | |
| 526 | + ), | |
| 519 | 527 | |
| 520 | - // Database Server Port | |
| 521 | - '_bbp_converter_db_port' => array( | |
| 522 | - 'title' => esc_html__( 'Database Port', 'bbpress' ), | |
| 523 | - 'callback' => 'bbp_converter_setting_callback_dbport', | |
| 524 | - 'sanitize_callback' => 'intval', | |
| 525 | - 'args' => array( 'label_for' => '_bbp_converter_db_port' ) | |
| 526 | - ), | |
| 528 | + // Database Name | |
| 529 | + '_bbp_converter_db_name' => array( | |
| 530 | + 'title' => esc_html__( 'Database Name', 'bbpress' ), | |
| 531 | + 'callback' => 'bbp_converter_setting_callback_dbname', | |
| 532 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 533 | + 'args' => array( 'label_for' => '_bbp_converter_db_name' ) | |
| 534 | + ), | |
| 527 | 535 | |
| 528 | - // Database Name | |
| 529 | - '_bbp_converter_db_name' => array( | |
| 530 | - 'title' => esc_html__( 'Database Name', 'bbpress' ), | |
| 531 | - 'callback' => 'bbp_converter_setting_callback_dbname', | |
| 532 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 533 | - 'args' => array( 'label_for' => '_bbp_converter_db_name' ) | |
| 534 | - ), | |
| 536 | + // Database User | |
| 537 | + '_bbp_converter_db_user' => array( | |
| 538 | + 'title' => esc_html__( 'Database User', 'bbpress' ), | |
| 539 | + 'callback' => 'bbp_converter_setting_callback_dbuser', | |
| 540 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 541 | + 'args' => array( 'label_for' => '_bbp_converter_db_user' ) | |
| 542 | + ), | |
| 535 | 543 | |
| 536 | - // Database User | |
| 537 | - '_bbp_converter_db_user' => array( | |
| 538 | - 'title' => esc_html__( 'Database User', 'bbpress' ), | |
| 539 | - 'callback' => 'bbp_converter_setting_callback_dbuser', | |
| 540 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 541 | - 'args' => array( 'label_for' => '_bbp_converter_db_user' ) | |
| 542 | - ), | |
| 544 | + // Database Password | |
| 545 | + '_bbp_converter_db_pass' => array( | |
| 546 | + 'title' => esc_html__( 'Database Password', 'bbpress' ), | |
| 547 | + 'callback' => 'bbp_converter_setting_callback_dbpass', | |
| 548 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 549 | + 'args' => array( 'label_for' => '_bbp_converter_db_pass' ) | |
| 550 | + ), | |
| 543 | 551 | |
| 544 | - // Database Password | |
| 545 | - '_bbp_converter_db_pass' => array( | |
| 546 | - 'title' => esc_html__( 'Database Password', 'bbpress' ), | |
| 547 | - 'callback' => 'bbp_converter_setting_callback_dbpass', | |
| 548 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 549 | - 'args' => array( 'label_for' => '_bbp_converter_db_pass' ) | |
| 552 | + // Database Prefix | |
| 553 | + '_bbp_converter_db_prefix' => array( | |
| 554 | + 'title' => esc_html__( 'Table Prefix', 'bbpress' ), | |
| 555 | + 'callback' => 'bbp_converter_setting_callback_dbprefix', | |
| 556 | + 'sanitize_callback' => 'sanitize_text_field', | |
| 557 | + 'args' => array( 'label_for' => '_bbp_converter_db_prefix' ) | |
| 558 | + ) | |
| 550 | 559 | ), |
| 551 | 560 | |
| 552 | - // Database Prefix | |
| 553 | - '_bbp_converter_db_prefix' => array( | |
| 554 | - 'title' => esc_html__( 'Table Prefix', 'bbpress' ), | |
| 555 | - 'callback' => 'bbp_converter_setting_callback_dbprefix', | |
| 556 | - 'sanitize_callback' => 'sanitize_text_field', | |
| 557 | - 'args' => array( 'label_for' => '_bbp_converter_db_prefix' ) | |
| 558 | - ) | |
| 559 | - ), | |
| 560 | - | |
| 561 | 561 | // Options |
| 562 | 562 | 'bbp_converter_options' => array( |
| 563 | 563 | |
| 564 | 564 | // Rows Limit |
| @@ -617,10 +617,10 @@ | ||
| 617 | 617 | * Get settings fields by section. |
| 618 | 618 | * |
| 619 | 619 | * @since 2.1.0 bbPress (r4001) |
| 620 | 620 | * |
| 621 | - * @param string $section_id ID of the section to get fields for. | |
| 622 | - * @staticvar array $fields All of the available fields. | |
| 621 | + * @param string $section_id ID of the section to get fields for | |
| 622 | + * @staticvar array $fields All of the available fields | |
| 623 | 623 | * @return mixed False if section is invalid, array of fields otherwise. |
| 624 | 624 | */ |
| 625 | 625 | function bbp_admin_get_settings_fields_for_section( $section_id = '' ) { |
| 626 | 626 | static $fields = array(); |
| @@ -649,9 +649,9 @@ | ||
| 649 | 649 | |
| 650 | 650 | /** User Section **************************************************************/ |
| 651 | 651 | |
| 652 | 652 | /** |
| 653 | - * User settings section description for the settings page. | |
| 653 | + * User settings section description for the settings page | |
| 654 | 654 | * |
| 655 | 655 | * @since 2.0.0 bbPress (r2786) |
| 656 | 656 | */ |
| 657 | 657 | function bbp_admin_setting_callback_user_section() { |
| @@ -663,9 +663,9 @@ | ||
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | |
| 666 | 666 | /** |
| 667 | - * Edit lock setting field. | |
| 667 | + * Edit lock setting field | |
| 668 | 668 | * |
| 669 | 669 | * @since 2.0.0 bbPress (r2737) |
| 670 | 670 | */ |
| 671 | 671 | function bbp_admin_setting_callback_editlock() { |
| @@ -694,9 +694,9 @@ | ||
| 694 | 694 | <?php |
| 695 | 695 | } |
| 696 | 696 | |
| 697 | 697 | /** |
| 698 | - * Throttle setting field. | |
| 698 | + * Throttle setting field | |
| 699 | 699 | * |
| 700 | 700 | * @since 2.0.0 bbPress (r2737) |
| 701 | 701 | */ |
| 702 | 702 | function bbp_admin_setting_callback_throttle() { |
| @@ -725,9 +725,9 @@ | ||
| 725 | 725 | <?php |
| 726 | 726 | } |
| 727 | 727 | |
| 728 | 728 | /** |
| 729 | - * Allow anonymous posting setting field. | |
| 729 | + * Allow anonymous posting setting field | |
| 730 | 730 | * |
| 731 | 731 | * @since 2.0.0 bbPress (r2737) |
| 732 | 732 | */ |
| 733 | 733 | function bbp_admin_setting_callback_anonymous() { |
| @@ -740,9 +740,9 @@ | ||
| 740 | 740 | <?php |
| 741 | 741 | } |
| 742 | 742 | |
| 743 | 743 | /** |
| 744 | - * Allow global access setting field. | |
| 744 | + * Allow global access setting field | |
| 745 | 745 | * |
| 746 | 746 | * @since 2.0.0 bbPress (r3378) |
| 747 | 747 | */ |
| 748 | 748 | function bbp_admin_setting_callback_global_access() { |
| @@ -783,9 +783,9 @@ | ||
| 783 | 783 | |
| 784 | 784 | /** Features Section **********************************************************/ |
| 785 | 785 | |
| 786 | 786 | /** |
| 787 | - * Features settings section description for the settings page. | |
| 787 | + * Features settings section description for the settings page | |
| 788 | 788 | * |
| 789 | 789 | * @since 2.0.0 bbPress (r2786) |
| 790 | 790 | */ |
| 791 | 791 | function bbp_admin_setting_callback_features_section() { |
| @@ -796,9 +796,9 @@ | ||
| 796 | 796 | <?php |
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | /** |
| 800 | - * Allow favorites setting field. | |
| 800 | + * Allow favorites setting field | |
| 801 | 801 | * |
| 802 | 802 | * @since 2.0.0 bbPress (r2786) |
| 803 | 803 | */ |
| 804 | 804 | function bbp_admin_setting_callback_favorites() { |
| @@ -810,9 +810,9 @@ | ||
| 810 | 810 | <?php |
| 811 | 811 | } |
| 812 | 812 | |
| 813 | 813 | /** |
| 814 | - * Allow subscriptions setting field. | |
| 814 | + * Allow subscriptions setting field | |
| 815 | 815 | * |
| 816 | 816 | * @since 2.0.0 bbPress (r2737) |
| 817 | 817 | */ |
| 818 | 818 | function bbp_admin_setting_callback_subscriptions() { |
| @@ -824,9 +824,9 @@ | ||
| 824 | 824 | <?php |
| 825 | 825 | } |
| 826 | 826 | |
| 827 | 827 | /** |
| 828 | - * Allow engagements setting field. | |
| 828 | + * Allow engagements setting field | |
| 829 | 829 | * |
| 830 | 830 | * @since 2.0.0 bbPress (r2737) |
| 831 | 831 | */ |
| 832 | 832 | function bbp_admin_setting_callback_engagements() { |
| @@ -838,9 +838,9 @@ | ||
| 838 | 838 | <?php |
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | /** |
| 842 | - * Allow topic tags setting field. | |
| 842 | + * Allow topic tags setting field | |
| 843 | 843 | * |
| 844 | 844 | * @since 2.4.0 bbPress (r4944) |
| 845 | 845 | */ |
| 846 | 846 | function bbp_admin_setting_callback_topic_tags() { |
| @@ -852,9 +852,9 @@ | ||
| 852 | 852 | <?php |
| 853 | 853 | } |
| 854 | 854 | |
| 855 | 855 | /** |
| 856 | - * Allow forum-mods setting field. | |
| 856 | + * Allow forum-mods setting field | |
| 857 | 857 | * |
| 858 | 858 | * @since 2.6.0 bbPress (r5834) |
| 859 | 859 | */ |
| 860 | 860 | function bbp_admin_setting_callback_forum_mods() { |
| @@ -867,9 +867,9 @@ | ||
| 867 | 867 | <?php |
| 868 | 868 | } |
| 869 | 869 | |
| 870 | 870 | /** |
| 871 | - * Allow super-mods setting field. | |
| 871 | + * Allow super-mods setting field | |
| 872 | 872 | * |
| 873 | 873 | * @since 2.6.0 bbPress (r6562) |
| 874 | 874 | */ |
| 875 | 875 | function bbp_admin_setting_callback_super_mods() { |
| @@ -882,9 +882,9 @@ | ||
| 882 | 882 | <?php |
| 883 | 883 | } |
| 884 | 884 | |
| 885 | 885 | /** |
| 886 | - * Allow forum wide search. | |
| 886 | + * Allow forum wide search | |
| 887 | 887 | * |
| 888 | 888 | * @since 2.4.0 bbPress (r4970) |
| 889 | 889 | */ |
| 890 | 890 | function bbp_admin_setting_callback_search() { |
| @@ -896,11 +896,11 @@ | ||
| 896 | 896 | <?php |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | /** |
| 900 | - * Hierarchical reply maximum depth level setting field. | |
| 900 | + * Hierarchical reply maximum depth level setting field | |
| 901 | 901 | * |
| 902 | - * Replies will be threaded if depth is 2 or greater. | |
| 902 | + * Replies will be threaded if depth is 2 or greater | |
| 903 | 903 | * |
| 904 | 904 | * @since 2.4.0 bbPress (r4944) |
| 905 | 905 | */ |
| 906 | 906 | function bbp_admin_setting_callback_thread_replies_depth() { |
| @@ -924,16 +924,11 @@ | ||
| 924 | 924 | |
| 925 | 925 | <?php $select = ob_get_clean(); ?> |
| 926 | 926 | |
| 927 | 927 | <label for="_bbp_allow_threaded_replies"> |
| 928 | - <input name="_bbp_allow_threaded_replies" id="_bbp_allow_threaded_replies" type="checkbox" value="1" | |
| 929 | - <?php | |
| 930 | - checked( '1', bbp_allow_threaded_replies( false ) ); | |
| 931 | - bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); | |
| 932 | - ?> | |
| 933 | - /> | |
| 934 | - <?php | |
| 935 | - printf( | |
| 928 | + <input name="_bbp_allow_threaded_replies" id="_bbp_allow_threaded_replies" type="checkbox" value="1" <?php checked( '1', bbp_allow_threaded_replies( false ) ); | |
| 929 | + bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); ?> /> | |
| 930 | + <?php printf( | |
| 936 | 931 | /* translators: %s: Depth level input field HTML */ |
| 937 | 932 | esc_html__( 'Enable threaded (nested) replies %s levels deep', 'bbpress' ), |
| 938 | 933 | $select |
| 939 | 934 | ); |
| @@ -943,9 +938,9 @@ | ||
| 943 | 938 | <?php |
| 944 | 939 | } |
| 945 | 940 | |
| 946 | 941 | /** |
| 947 | - * Allow topic and reply revisions. | |
| 942 | + * Allow topic and reply revisions | |
| 948 | 943 | * |
| 949 | 944 | * @since 2.0.0 bbPress (r3412) |
| 950 | 945 | */ |
| 951 | 946 | function bbp_admin_setting_callback_revisions() { |
| @@ -957,9 +952,9 @@ | ||
| 957 | 952 | <?php |
| 958 | 953 | } |
| 959 | 954 | |
| 960 | 955 | /** |
| 961 | - * Use the WordPress editor setting field. | |
| 956 | + * Use the WordPress editor setting field | |
| 962 | 957 | * |
| 963 | 958 | * @since 2.1.0 bbPress (r3586) |
| 964 | 959 | */ |
| 965 | 960 | function bbp_admin_setting_callback_use_wp_editor() { |
| @@ -971,9 +966,9 @@ | ||
| 971 | 966 | <?php |
| 972 | 967 | } |
| 973 | 968 | |
| 974 | 969 | /** |
| 975 | - * Main subtheme section. | |
| 970 | + * Main subtheme section | |
| 976 | 971 | * |
| 977 | 972 | * @since 2.0.0 bbPress (r2786) |
| 978 | 973 | */ |
| 979 | 974 | function bbp_admin_setting_callback_subtheme_section() { |
| @@ -984,9 +979,9 @@ | ||
| 984 | 979 | <?php |
| 985 | 980 | } |
| 986 | 981 | |
| 987 | 982 | /** |
| 988 | - * Use the WordPress editor setting field. | |
| 983 | + * Use the WordPress editor setting field | |
| 989 | 984 | * |
| 990 | 985 | * @since 2.1.0 bbPress (r3586) |
| 991 | 986 | */ |
| 992 | 987 | function bbp_admin_setting_callback_subtheme_id() { |
| @@ -1016,9 +1011,9 @@ | ||
| 1016 | 1011 | <?php endif; |
| 1017 | 1012 | } |
| 1018 | 1013 | |
| 1019 | 1014 | /** |
| 1020 | - * Allow oEmbed in replies. | |
| 1015 | + * Allow oEmbed in replies | |
| 1021 | 1016 | * |
| 1022 | 1017 | * @since 2.1.0 bbPress (r3752) |
| 1023 | 1018 | */ |
| 1024 | 1019 | function bbp_admin_setting_callback_use_autoembed() { |
| @@ -1032,9 +1027,9 @@ | ||
| 1032 | 1027 | |
| 1033 | 1028 | /** Per Page Section **********************************************************/ |
| 1034 | 1029 | |
| 1035 | 1030 | /** |
| 1036 | - * Per page settings section description for the settings page. | |
| 1031 | + * Per page settings section description for the settings page | |
| 1037 | 1032 | * |
| 1038 | 1033 | * @since 2.0.0 bbPress (r2786) |
| 1039 | 1034 | */ |
| 1040 | 1035 | function bbp_admin_setting_callback_per_page_section() { |
| @@ -1045,9 +1040,9 @@ | ||
| 1045 | 1040 | <?php |
| 1046 | 1041 | } |
| 1047 | 1042 | |
| 1048 | 1043 | /** |
| 1049 | - * Topics per page setting field. | |
| 1044 | + * Topics per page setting field | |
| 1050 | 1045 | * |
| 1051 | 1046 | * @since 2.0.0 bbPress (r2786) |
| 1052 | 1047 | */ |
| 1053 | 1048 | function bbp_admin_setting_callback_topics_per_page() { |
| @@ -1059,9 +1054,9 @@ | ||
| 1059 | 1054 | <?php |
| 1060 | 1055 | } |
| 1061 | 1056 | |
| 1062 | 1057 | /** |
| 1063 | - * Replies per page setting field. | |
| 1058 | + * Replies per page setting field | |
| 1064 | 1059 | * |
| 1065 | 1060 | * @since 2.0.0 bbPress (r2786) |
| 1066 | 1061 | */ |
| 1067 | 1062 | function bbp_admin_setting_callback_replies_per_page() { |
| @@ -1075,9 +1070,9 @@ | ||
| 1075 | 1070 | |
| 1076 | 1071 | /** Per RSS Page Section ******************************************************/ |
| 1077 | 1072 | |
| 1078 | 1073 | /** |
| 1079 | - * Per page settings section description for the settings page. | |
| 1074 | + * Per page settings section description for the settings page | |
| 1080 | 1075 | * |
| 1081 | 1076 | * @since 2.0.0 bbPress (r2786) |
| 1082 | 1077 | */ |
| 1083 | 1078 | function bbp_admin_setting_callback_per_rss_page_section() { |
| @@ -1088,9 +1083,9 @@ | ||
| 1088 | 1083 | <?php |
| 1089 | 1084 | } |
| 1090 | 1085 | |
| 1091 | 1086 | /** |
| 1092 | - * Topics per RSS page setting field. | |
| 1087 | + * Topics per RSS page setting field | |
| 1093 | 1088 | * |
| 1094 | 1089 | * @since 2.0.0 bbPress (r2786) |
| 1095 | 1090 | */ |
| 1096 | 1091 | function bbp_admin_setting_callback_topics_per_rss_page() { |
| @@ -1102,9 +1097,9 @@ | ||
| 1102 | 1097 | <?php |
| 1103 | 1098 | } |
| 1104 | 1099 | |
| 1105 | 1100 | /** |
| 1106 | - * Replies per RSS page setting field. | |
| 1101 | + * Replies per RSS page setting field | |
| 1107 | 1102 | * |
| 1108 | 1103 | * @since 2.0.0 bbPress (r2786) |
| 1109 | 1104 | */ |
| 1110 | 1105 | function bbp_admin_setting_callback_replies_per_rss_page() { |
| @@ -1118,9 +1113,9 @@ | ||
| 1118 | 1113 | |
| 1119 | 1114 | /** Slug Section **************************************************************/ |
| 1120 | 1115 | |
| 1121 | 1116 | /** |
| 1122 | - * Slugs settings section description for the settings page. | |
| 1117 | + * Slugs settings section description for the settings page | |
| 1123 | 1118 | * |
| 1124 | 1119 | * @since 2.0.0 bbPress (r2786) |
| 1125 | 1120 | */ |
| 1126 | 1121 | function bbp_admin_setting_callback_root_slug_section() { |
| @@ -1135,9 +1130,9 @@ | ||
| 1135 | 1130 | <?php |
| 1136 | 1131 | } |
| 1137 | 1132 | |
| 1138 | 1133 | /** |
| 1139 | - * Root slug setting field. | |
| 1134 | + * Root slug setting field | |
| 1140 | 1135 | * |
| 1141 | 1136 | * @since 2.0.0 bbPress (r2786) |
| 1142 | 1137 | */ |
| 1143 | 1138 | function bbp_admin_setting_callback_root_slug() { |
| @@ -1150,9 +1145,9 @@ | ||
| 1150 | 1145 | bbp_form_slug_conflict_check( '_bbp_root_slug', 'forums' ); |
| 1151 | 1146 | } |
| 1152 | 1147 | |
| 1153 | 1148 | /** |
| 1154 | - * Include root slug setting field. | |
| 1149 | + * Include root slug setting field | |
| 1155 | 1150 | * |
| 1156 | 1151 | * @since 2.0.0 bbPress (r2786) |
| 1157 | 1152 | */ |
| 1158 | 1153 | function bbp_admin_setting_callback_include_root() { |
| @@ -1164,9 +1159,9 @@ | ||
| 1164 | 1159 | <?php |
| 1165 | 1160 | } |
| 1166 | 1161 | |
| 1167 | 1162 | /** |
| 1168 | - * Include root slug setting field. | |
| 1163 | + * Include root slug setting field | |
| 1169 | 1164 | * |
| 1170 | 1165 | * @since 2.0.0 bbPress (r2786) |
| 1171 | 1166 | */ |
| 1172 | 1167 | function bbp_admin_setting_callback_show_on_root() { |
| @@ -1201,17 +1196,13 @@ | ||
| 1201 | 1196 | |
| 1202 | 1197 | // This setting doesn't work if the theme has an archive-forum.php template. |
| 1203 | 1198 | if ( ! empty( $forum_archive ) ) : ?> |
| 1204 | 1199 | |
| 1205 | - <p class="description"> | |
| 1206 | - <?php | |
| 1207 | - printf( | |
| 1200 | + <p class="description"><?php printf( | |
| 1208 | 1201 | /* translators: %s: Forum archive template file path */ |
| 1209 | - esc_html__( 'This setting will be ignored because %s was found in your theme.', 'bbpress' ), | |
| 1210 | - '<code>' . $forum_archive . '</code>' | |
| 1211 | - ); | |
| 1212 | - ?> | |
| 1213 | - </p> | |
| 1202 | + esc_html__( 'This setting will be ignored because %s was found in your theme.', 'bbpress' ), | |
| 1203 | + '<code>' . $forum_archive . '</code>' | |
| 1204 | + ); ?></p> | |
| 1214 | 1205 | |
| 1215 | 1206 | <?php endif; |
| 1216 | 1207 | } |
| 1217 | 1208 | |
| @@ -1217,9 +1208,9 @@ | ||
| 1217 | 1208 | |
| 1218 | 1209 | /** User Slug Section *********************************************************/ |
| 1219 | 1210 | |
| 1220 | 1211 | /** |
| 1221 | - * Slugs settings section description for the settings page. | |
| 1212 | + * Slugs settings section description for the settings page | |
| 1222 | 1213 | * |
| 1223 | 1214 | * @since 2.0.0 bbPress (r2786) |
| 1224 | 1215 | */ |
| 1225 | 1216 | function bbp_admin_setting_callback_user_slug_section() { |
| @@ -1230,9 +1221,9 @@ | ||
| 1230 | 1221 | <?php |
| 1231 | 1222 | } |
| 1232 | 1223 | |
| 1233 | 1224 | /** |
| 1234 | - * User slug setting field. | |
| 1225 | + * User slug setting field | |
| 1235 | 1226 | * |
| 1236 | 1227 | * @since 2.0.0 bbPress (r2786) |
| 1237 | 1228 | */ |
| 1238 | 1229 | function bbp_admin_setting_callback_user_slug() { |
| @@ -1245,9 +1236,9 @@ | ||
| 1245 | 1236 | bbp_form_slug_conflict_check( '_bbp_user_slug', 'users' ); |
| 1246 | 1237 | } |
| 1247 | 1238 | |
| 1248 | 1239 | /** |
| 1249 | - * Topic archive slug setting field. | |
| 1240 | + * Topic archive slug setting field | |
| 1250 | 1241 | * |
| 1251 | 1242 | * @since 2.0.0 bbPress (r2786) |
| 1252 | 1243 | */ |
| 1253 | 1244 | function bbp_admin_setting_callback_topic_archive_slug() { |
| @@ -1260,9 +1251,9 @@ | ||
| 1260 | 1251 | bbp_form_slug_conflict_check( '_bbp_topic_archive_slug', 'topics' ); |
| 1261 | 1252 | } |
| 1262 | 1253 | |
| 1263 | 1254 | /** |
| 1264 | - * Reply archive slug setting field. | |
| 1255 | + * Reply archive slug setting field | |
| 1265 | 1256 | * |
| 1266 | 1257 | * @since 2.4.0 bbPress (r4932) |
| 1267 | 1258 | */ |
| 1268 | 1259 | function bbp_admin_setting_callback_reply_archive_slug() { |
| @@ -1275,9 +1266,9 @@ | ||
| 1275 | 1266 | bbp_form_slug_conflict_check( '_bbp_reply_archive_slug', 'replies' ); |
| 1276 | 1267 | } |
| 1277 | 1268 | |
| 1278 | 1269 | /** |
| 1279 | - * Favorites slug setting field. | |
| 1270 | + * Favorites slug setting field | |
| 1280 | 1271 | * |
| 1281 | 1272 | * @since 2.4.0 bbPress (r4932) |
| 1282 | 1273 | */ |
| 1283 | 1274 | function bbp_admin_setting_callback_user_favs_slug() { |
| @@ -1290,9 +1281,9 @@ | ||
| 1290 | 1281 | bbp_form_slug_conflict_check( '_bbp_user_favs_slug', 'favorites' ); |
| 1291 | 1282 | } |
| 1292 | 1283 | |
| 1293 | 1284 | /** |
| 1294 | - * Subscriptions slug setting field. | |
| 1285 | + * Subscriptions slug setting field | |
| 1295 | 1286 | * |
| 1296 | 1287 | * @since 2.4.0 bbPress (r4932) |
| 1297 | 1288 | */ |
| 1298 | 1289 | function bbp_admin_setting_callback_user_subs_slug() { |
| @@ -1305,9 +1296,9 @@ | ||
| 1305 | 1296 | bbp_form_slug_conflict_check( '_bbp_user_subs_slug', 'subscriptions' ); |
| 1306 | 1297 | } |
| 1307 | 1298 | |
| 1308 | 1299 | /** |
| 1309 | - * Engagements slug setting field. | |
| 1300 | + * Engagements slug setting field | |
| 1310 | 1301 | * |
| 1311 | 1302 | * @since 2.6.0 bbPress (r6320) |
| 1312 | 1303 | */ |
| 1313 | 1304 | function bbp_admin_setting_callback_user_engagements_slug() { |
| @@ -1322,9 +1313,9 @@ | ||
| 1322 | 1313 | |
| 1323 | 1314 | /** Single Slugs **************************************************************/ |
| 1324 | 1315 | |
| 1325 | 1316 | /** |
| 1326 | - * Slugs settings section description for the settings page. | |
| 1317 | + * Slugs settings section description for the settings page | |
| 1327 | 1318 | * |
| 1328 | 1319 | * @since 2.0.0 bbPress (r2786) |
| 1329 | 1320 | */ |
| 1330 | 1321 | function bbp_admin_setting_callback_single_slug_section() { |
| @@ -1335,9 +1326,9 @@ | ||
| 1335 | 1326 | <?php |
| 1336 | 1327 | } |
| 1337 | 1328 | |
| 1338 | 1329 | /** |
| 1339 | - * Forum slug setting field. | |
| 1330 | + * Forum slug setting field | |
| 1340 | 1331 | * |
| 1341 | 1332 | * @since 2.0.0 bbPress (r2786) |
| 1342 | 1333 | */ |
| 1343 | 1334 | function bbp_admin_setting_callback_forum_slug() { |
| @@ -1350,9 +1341,9 @@ | ||
| 1350 | 1341 | bbp_form_slug_conflict_check( '_bbp_forum_slug', 'forum' ); |
| 1351 | 1342 | } |
| 1352 | 1343 | |
| 1353 | 1344 | /** |
| 1354 | - * Topic slug setting field. | |
| 1345 | + * Topic slug setting field | |
| 1355 | 1346 | * |
| 1356 | 1347 | * @since 2.0.0 bbPress (r2786) |
| 1357 | 1348 | */ |
| 1358 | 1349 | function bbp_admin_setting_callback_topic_slug() { |
| @@ -1365,9 +1356,9 @@ | ||
| 1365 | 1356 | bbp_form_slug_conflict_check( '_bbp_topic_slug', 'topic' ); |
| 1366 | 1357 | } |
| 1367 | 1358 | |
| 1368 | 1359 | /** |
| 1369 | - * Reply slug setting field. | |
| 1360 | + * Reply slug setting field | |
| 1370 | 1361 | * |
| 1371 | 1362 | * @since 2.0.0 bbPress (r2786) |
| 1372 | 1363 | */ |
| 1373 | 1364 | function bbp_admin_setting_callback_reply_slug() { |
| @@ -1380,9 +1371,9 @@ | ||
| 1380 | 1371 | bbp_form_slug_conflict_check( '_bbp_reply_slug', 'reply' ); |
| 1381 | 1372 | } |
| 1382 | 1373 | |
| 1383 | 1374 | /** |
| 1384 | - * Topic tag slug setting field. | |
| 1375 | + * Topic tag slug setting field | |
| 1385 | 1376 | * |
| 1386 | 1377 | * @since 2.0.0 bbPress (r2786) |
| 1387 | 1378 | */ |
| 1388 | 1379 | function bbp_admin_setting_callback_topic_tag_slug() { |
| @@ -1396,9 +1387,9 @@ | ||
| 1396 | 1387 | bbp_form_slug_conflict_check( '_bbp_topic_tag_slug', 'topic-tag' ); |
| 1397 | 1388 | } |
| 1398 | 1389 | |
| 1399 | 1390 | /** |
| 1400 | - * View slug setting field. | |
| 1391 | + * View slug setting field | |
| 1401 | 1392 | * |
| 1402 | 1393 | * @since 2.0.0 bbPress (r2789) |
| 1403 | 1394 | */ |
| 1404 | 1395 | function bbp_admin_setting_callback_view_slug() { |
| @@ -1411,9 +1402,9 @@ | ||
| 1411 | 1402 | bbp_form_slug_conflict_check( '_bbp_view_slug', 'view' ); |
| 1412 | 1403 | } |
| 1413 | 1404 | |
| 1414 | 1405 | /** |
| 1415 | - * Search slug setting field. | |
| 1406 | + * Search slug setting field | |
| 1416 | 1407 | * |
| 1417 | 1408 | * @since 2.3.0 bbPress (r4579) |
| 1418 | 1409 | */ |
| 1419 | 1410 | function bbp_admin_setting_callback_search_slug() { |
| @@ -1426,9 +1417,9 @@ | ||
| 1426 | 1417 | bbp_form_slug_conflict_check( '_bbp_search_slug', 'search' ); |
| 1427 | 1418 | } |
| 1428 | 1419 | |
| 1429 | 1420 | /** |
| 1430 | - * Edit slug setting field. | |
| 1421 | + * Edit slug setting field | |
| 1431 | 1422 | * |
| 1432 | 1423 | * @since 2.6.2 bbPress (r6965) |
| 1433 | 1424 | */ |
| 1434 | 1425 | function bbp_admin_setting_callback_edit_slug() { |
| @@ -1443,9 +1434,9 @@ | ||
| 1443 | 1434 | |
| 1444 | 1435 | /** BuddyPress ****************************************************************/ |
| 1445 | 1436 | |
| 1446 | 1437 | /** |
| 1447 | - * Extension settings section description for the settings page. | |
| 1438 | + * Extension settings section description for the settings page | |
| 1448 | 1439 | * |
| 1449 | 1440 | * @since 2.1.0 bbPress (r3575) |
| 1450 | 1441 | */ |
| 1451 | 1442 | function bbp_admin_setting_callback_buddypress_section() { |
| @@ -1456,9 +1447,9 @@ | ||
| 1456 | 1447 | <?php |
| 1457 | 1448 | } |
| 1458 | 1449 | |
| 1459 | 1450 | /** |
| 1460 | - * Allow BuddyPress group forums setting field. | |
| 1451 | + * Allow BuddyPress group forums setting field | |
| 1461 | 1452 | * |
| 1462 | 1453 | * @since 2.1.0 bbPress (r3575) |
| 1463 | 1454 | */ |
| 1464 | 1455 | function bbp_admin_setting_callback_group_forums() { |
| @@ -1470,9 +1461,9 @@ | ||
| 1470 | 1461 | <?php |
| 1471 | 1462 | } |
| 1472 | 1463 | |
| 1473 | 1464 | /** |
| 1474 | - * Replies per page setting field. | |
| 1465 | + * Replies per page setting field | |
| 1475 | 1466 | * |
| 1476 | 1467 | * @since 2.1.0 bbPress (r3575) |
| 1477 | 1468 | */ |
| 1478 | 1469 | function bbp_admin_setting_callback_group_forums_root_id() { |
| @@ -1517,10 +1508,9 @@ | ||
| 1517 | 1508 | ); |
| 1518 | 1509 | |
| 1519 | 1510 | // Button & text |
| 1520 | 1511 | $button = '<a href="' . esc_url( $new_url ) . '">' . esc_html__( 'create a new one', 'bbpress' ) . '</a>'; |
| 1521 | - /* translators: 1: Forum select dropdown HTML, 2: Create new forum link HTML */ | |
| 1522 | - $text = esc_html__( 'Use %1$s to contain your group forums, or %2$s', 'bbpress' ); | |
| 1512 | + $text = esc_html__( 'Use %s to contain your group forums, or %s', 'bbpress' ); //phpcs:ignore | |
| 1523 | 1513 | } else { |
| 1524 | 1514 | /* translators: %s: Forum select dropdown HTML */ |
| 1525 | 1515 | $text = esc_html__( 'Use %s to contain your group forums', 'bbpress' ); |
| 1526 | 1516 | } |
| @@ -1534,9 +1524,9 @@ | ||
| 1534 | 1524 | |
| 1535 | 1525 | /** Akismet *******************************************************************/ |
| 1536 | 1526 | |
| 1537 | 1527 | /** |
| 1538 | - * Extension settings section description for the settings page. | |
| 1528 | + * Extension settings section description for the settings page | |
| 1539 | 1529 | * |
| 1540 | 1530 | * @since 2.1.0 bbPress (r3575) |
| 1541 | 1531 | */ |
| 1542 | 1532 | function bbp_admin_setting_callback_akismet_section() { |
| @@ -1548,9 +1538,9 @@ | ||
| 1548 | 1538 | } |
| 1549 | 1539 | |
| 1550 | 1540 | |
| 1551 | 1541 | /** |
| 1552 | - * Allow Akismet setting field. | |
| 1542 | + * Allow Akismet setting field | |
| 1553 | 1543 | * |
| 1554 | 1544 | * @since 2.1.0 bbPress (r3575) |
| 1555 | 1545 | */ |
| 1556 | 1546 | function bbp_admin_setting_callback_akismet() { |
| @@ -1556,9 +1546,9 @@ | ||
| 1556 | 1546 | function bbp_admin_setting_callback_akismet() { |
| 1557 | 1547 | ?> |
| 1558 | 1548 | |
| 1559 | 1549 | <input name="_bbp_enable_akismet" id="_bbp_enable_akismet" type="checkbox" value="1" <?php checked( bbp_is_akismet_active( true ) ); ?><?php bbp_maybe_admin_setting_disabled( '_bbp_enable_akismet' ); ?> /> |
| 1560 | - <label for="_bbp_enable_akismet"><?php esc_html_e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label> | |
| 1550 | + <label for="_bbp_enable_akismet"><?php _e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); // phpcs:ignore WordPress.Security.EscapeOutput.UnsafePrintingFunction ?></label> | |
| 1561 | 1551 | |
| 1562 | 1552 | <?php |
| 1563 | 1553 | } |
| 1564 | 1554 | |
| @@ -1564,9 +1554,9 @@ | ||
| 1564 | 1554 | |
| 1565 | 1555 | /** Settings Page *************************************************************/ |
| 1566 | 1556 | |
| 1567 | 1557 | /** |
| 1568 | - * The main settings page. | |
| 1558 | + * The main settings page | |
| 1569 | 1559 | * |
| 1570 | 1560 | * @since 2.0.0 bbPress (r2643) |
| 1571 | 1561 | */ |
| 1572 | 1562 | function bbp_admin_settings() { |
| @@ -1593,9 +1583,9 @@ | ||
| 1593 | 1583 | |
| 1594 | 1584 | /** Converter Section *********************************************************/ |
| 1595 | 1585 | |
| 1596 | 1586 | /** |
| 1597 | - * Main settings section description for the settings page. | |
| 1587 | + * Main settings section description for the settings page | |
| 1598 | 1588 | * |
| 1599 | 1589 | * @since 2.1.0 bbPress (r3813) |
| 1600 | 1590 | */ |
| 1601 | 1591 | function bbp_converter_setting_callback_main_section() { |
| @@ -1606,9 +1596,9 @@ | ||
| 1606 | 1596 | <?php |
| 1607 | 1597 | } |
| 1608 | 1598 | |
| 1609 | 1599 | /** |
| 1610 | - * Edit Platform setting field. | |
| 1600 | + * Edit Platform setting field | |
| 1611 | 1601 | * |
| 1612 | 1602 | * @since 2.1.0 bbPress (r3813) |
| 1613 | 1603 | */ |
| 1614 | 1604 | function bbp_converter_setting_callback_platform() { |
| @@ -1629,64 +1619,46 @@ | ||
| 1629 | 1619 | <?php |
| 1630 | 1620 | } |
| 1631 | 1621 | |
| 1632 | 1622 | /** |
| 1633 | - * Edit Database Server setting field. | |
| 1623 | + * Edit Database Server setting field | |
| 1634 | 1624 | * |
| 1635 | 1625 | * @since 2.1.0 bbPress (r3813) |
| 1636 | 1626 | */ |
| 1637 | 1627 | function bbp_converter_setting_callback_dbserver() { |
| 1638 | 1628 | ?> |
| 1639 | - <input | |
| 1640 | - name="_bbp_converter_db_server" | |
| 1641 | - id="_bbp_converter_db_server" | |
| 1642 | - type="text" | |
| 1643 | - class="code" | |
| 1644 | - value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" | |
| 1645 | - <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_server' ); ?> | |
| 1646 | - /> | |
| 1647 | - <p class="description"> | |
| 1648 | - <?php | |
| 1649 | - printf( | |
| 1629 | + | |
| 1630 | + <input name="_bbp_converter_db_server" id="_bbp_converter_db_server" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_server' ); ?> /> | |
| 1631 | + <p class="description"><?php printf( | |
| 1650 | 1632 | /* translators: %s: Default value wrapped in code tags */ |
| 1651 | - esc_html__( 'Use default %s if same server, or IP or hostname', 'bbpress' ), | |
| 1652 | - '<code>localhost</code>' | |
| 1653 | - ); | |
| 1654 | - ?> | |
| 1655 | - </p> | |
| 1656 | - <?php | |
| 1633 | + esc_html__( 'Use default %s if same server, or IP or hostname', 'bbpress' ), | |
| 1634 | + '<code>localhost</code>' | |
| 1635 | + ); ?></p> | |
| 1636 | + | |
| 1637 | +<?php | |
| 1657 | 1638 | } |
| 1658 | 1639 | |
| 1659 | 1640 | /** |
| 1660 | - * Edit Database Server Port setting field. | |
| 1641 | + * Edit Database Server Port setting field | |
| 1661 | 1642 | * |
| 1662 | 1643 | * @since 2.1.0 bbPress (r3813) |
| 1663 | 1644 | */ |
| 1664 | 1645 | function bbp_converter_setting_callback_dbport() { |
| 1665 | 1646 | ?> |
| 1666 | - <input | |
| 1667 | - name="_bbp_converter_db_port" | |
| 1668 | - id="_bbp_converter_db_port" | |
| 1669 | - type="text" | |
| 1670 | - class="code" | |
| 1671 | - value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" | |
| 1672 | - <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_port' ); ?> | |
| 1673 | - /> | |
| 1674 | - <p class="description"> | |
| 1675 | - <?php | |
| 1676 | 1647 | |
| 1648 | + <input name="_bbp_converter_db_port" id="_bbp_converter_db_port" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_port' ); ?> /> | |
| 1649 | + <p class="description"><?php | |
| 1677 | 1650 | printf( |
| 1678 | 1651 | /* translators: %s: Default port number wrapped in code tags */ |
| 1679 | 1652 | esc_html__( 'Use default %s if unsure', 'bbpress' ), |
| 1680 | 1653 | '<code>3306</code>' |
| 1681 | - ); | |
| 1682 | - ?> | |
| 1683 | - </p> | |
| 1684 | - <?php | |
| 1654 | + ); ?></p> | |
| 1655 | + | |
| 1656 | +<?php | |
| 1685 | 1657 | } |
| 1686 | 1658 | |
| 1687 | 1659 | /** |
| 1688 | - * Edit Database User setting field. | |
| 1660 | + * Edit Database User setting field | |
| 1689 | 1661 | * |
| 1690 | 1662 | * @since 2.1.0 bbPress (r3813) |
| 1691 | 1663 | */ |
| 1692 | 1664 | function bbp_converter_setting_callback_dbuser() { |
| @@ -1698,9 +1670,9 @@ | ||
| 1698 | 1670 | <?php |
| 1699 | 1671 | } |
| 1700 | 1672 | |
| 1701 | 1673 | /** |
| 1702 | - * Edit Database Pass setting field. | |
| 1674 | + * Edit Database Pass setting field | |
| 1703 | 1675 | * |
| 1704 | 1676 | * @since 2.1.0 bbPress (r3813) |
| 1705 | 1677 | */ |
| 1706 | 1678 | function bbp_converter_setting_callback_dbpass() { |
| @@ -1718,9 +1690,9 @@ | ||
| 1718 | 1690 | <?php |
| 1719 | 1691 | } |
| 1720 | 1692 | |
| 1721 | 1693 | /** |
| 1722 | - * Edit Database Name setting field. | |
| 1694 | + * Edit Database Name setting field | |
| 1723 | 1695 | * |
| 1724 | 1696 | * @since 2.1.0 bbPress (r3813) |
| 1725 | 1697 | */ |
| 1726 | 1698 | function bbp_converter_setting_callback_dbname() { |
| @@ -1732,9 +1704,9 @@ | ||
| 1732 | 1704 | <?php |
| 1733 | 1705 | } |
| 1734 | 1706 | |
| 1735 | 1707 | /** |
| 1736 | - * Main settings section description for the settings page. | |
| 1708 | + * Main settings section description for the settings page | |
| 1737 | 1709 | * |
| 1738 | 1710 | * @since 2.1.0 bbPress (r3813) |
| 1739 | 1711 | */ |
| 1740 | 1712 | function bbp_converter_setting_callback_options_section() { |
| @@ -1745,9 +1717,9 @@ | ||
| 1745 | 1717 | <?php |
| 1746 | 1718 | } |
| 1747 | 1719 | |
| 1748 | 1720 | /** |
| 1749 | - * Edit Table Prefix setting field. | |
| 1721 | + * Edit Table Prefix setting field | |
| 1750 | 1722 | * |
| 1751 | 1723 | * @since 2.1.0 bbPress (r3813) |
| 1752 | 1724 | */ |
| 1753 | 1725 | function bbp_converter_setting_callback_dbprefix() { |
| @@ -1753,22 +1725,19 @@ | ||
| 1753 | 1725 | function bbp_converter_setting_callback_dbprefix() { |
| 1754 | 1726 | ?> |
| 1755 | 1727 | |
| 1756 | 1728 | <input name="_bbp_converter_db_prefix" id="_bbp_converter_db_prefix" type="text" class="code" value="<?php bbp_form_option( '_bbp_converter_db_prefix' ); ?>" <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_prefix' ); ?> /> |
| 1757 | - <p class="description"> | |
| 1758 | - <?php printf( | |
| 1729 | + <p class="description"><?php printf( | |
| 1759 | 1730 | /* translators: %s: Database prefix example wrapped in code tags */ |
| 1760 | - esc_html__( 'Use %s if converting from BuddyPress Legacy', 'bbpress' ), | |
| 1761 | - '<code>wp_bb_</code>' | |
| 1762 | - ); | |
| 1763 | - ?> | |
| 1764 | - </p> | |
| 1731 | + esc_html__( 'Use %s if converting from BuddyPress Legacy', 'bbpress' ), | |
| 1732 | + '<code>wp_bb_</code>' | |
| 1733 | + ); ?></p> | |
| 1765 | 1734 | |
| 1766 | 1735 | <?php |
| 1767 | 1736 | } |
| 1768 | 1737 | |
| 1769 | 1738 | /** |
| 1770 | - * Edit Rows Limit setting field. | |
| 1739 | + * Edit Rows Limit setting field | |
| 1771 | 1740 | * |
| 1772 | 1741 | * @since 2.1.0 bbPress (r3813) |
| 1773 | 1742 | */ |
| 1774 | 1743 | function bbp_converter_setting_callback_rows() { |
| @@ -1781,9 +1750,9 @@ | ||
| 1781 | 1750 | <?php |
| 1782 | 1751 | } |
| 1783 | 1752 | |
| 1784 | 1753 | /** |
| 1785 | - * Edit Delay Time setting field. | |
| 1754 | + * Edit Delay Time setting field | |
| 1786 | 1755 | * |
| 1787 | 1756 | * @since 2.1.0 bbPress (r3813) |
| 1788 | 1757 | */ |
| 1789 | 1758 | function bbp_converter_setting_callback_delay_time() { |
| @@ -1796,9 +1765,9 @@ | ||
| 1796 | 1765 | <?php |
| 1797 | 1766 | } |
| 1798 | 1767 | |
| 1799 | 1768 | /** |
| 1800 | - * Edit Halt setting field. | |
| 1769 | + * Edit Halt setting field | |
| 1801 | 1770 | * |
| 1802 | 1771 | * @since 2.6.0 bbPress (r6599) |
| 1803 | 1772 | */ |
| 1804 | 1773 | function bbp_converter_setting_callback_halt() { |
| @@ -1812,9 +1781,9 @@ | ||
| 1812 | 1781 | } |
| 1813 | 1782 | |
| 1814 | 1783 | |
| 1815 | 1784 | /** |
| 1816 | - * Edit Restart setting field. | |
| 1785 | + * Edit Restart setting field | |
| 1817 | 1786 | * |
| 1818 | 1787 | * @since 2.1.0 bbPress (r3813) |
| 1819 | 1788 | */ |
| 1820 | 1789 | function bbp_converter_setting_callback_restart() { |
| @@ -1827,9 +1796,9 @@ | ||
| 1827 | 1796 | <?php |
| 1828 | 1797 | } |
| 1829 | 1798 | |
| 1830 | 1799 | /** |
| 1831 | - * Edit Clean setting field. | |
| 1800 | + * Edit Clean setting field | |
| 1832 | 1801 | * |
| 1833 | 1802 | * @since 2.1.0 bbPress (r3813) |
| 1834 | 1803 | */ |
| 1835 | 1804 | function bbp_converter_setting_callback_clean() { |
| @@ -1842,9 +1811,9 @@ | ||
| 1842 | 1811 | <?php |
| 1843 | 1812 | } |
| 1844 | 1813 | |
| 1845 | 1814 | /** |
| 1846 | - * Edit Convert Users setting field. | |
| 1815 | + * Edit Convert Users setting field | |
| 1847 | 1816 | * |
| 1848 | 1817 | * @since 2.1.0 bbPress (r3813) |
| 1849 | 1818 | */ |
| 1850 | 1819 | function bbp_converter_setting_callback_convert_users() { |
| @@ -1859,9 +1828,9 @@ | ||
| 1859 | 1828 | |
| 1860 | 1829 | /** Converter Page ************************************************************/ |
| 1861 | 1830 | |
| 1862 | 1831 | /** |
| 1863 | - * The main settings page. | |
| 1832 | + * The main settings page | |
| 1864 | 1833 | * |
| 1865 | 1834 | * @since 2.1.0 bbPress (r3186) |
| 1866 | 1835 | */ |
| 1867 | 1836 | function bbp_converter_settings_page() { |
| @@ -1940,9 +1909,9 @@ | ||
| 1940 | 1909 | |
| 1941 | 1910 | /** Helpers *******************************************************************/ |
| 1942 | 1911 | |
| 1943 | 1912 | /** |
| 1944 | - * Contextual help for Forums settings page. | |
| 1913 | + * Contextual help for Forums settings page | |
| 1945 | 1914 | * |
| 1946 | 1915 | * @since 2.0.0 bbPress (r3119) |
| 1947 | 1916 | */ |
| 1948 | 1917 | function bbp_admin_settings_help() { |
| @@ -2055,9 +2024,9 @@ | ||
| 2055 | 2024 | disabled( isset( bbpress()->options[ $option_key ] ) ); |
| 2056 | 2025 | } |
| 2057 | 2026 | |
| 2058 | 2027 | /** |
| 2059 | - * Output settings API option. | |
| 2028 | + * Output settings API option | |
| 2060 | 2029 | * |
| 2061 | 2030 | * @since 2.0.0 bbPress (r3203) |
| 2062 | 2031 | * |
| 2063 | 2032 | * @param string $option |
| @@ -2066,43 +2035,42 @@ | ||
| 2066 | 2035 | */ |
| 2067 | 2036 | function bbp_form_option( $option, $default = '', $slug = false ) { |
| 2068 | 2037 | echo bbp_get_form_option( $option, $default, $slug ); |
| 2069 | 2038 | } |
| 2039 | + /** | |
| 2040 | + * Return settings API option | |
| 2041 | + * | |
| 2042 | + * @since 2.0.0 bbPress (r3203) | |
| 2043 | + * | |
| 2044 | + * @param string $option | |
| 2045 | + * @param string $default | |
| 2046 | + * @param bool $is_slug | |
| 2047 | + * | |
| 2048 | + * @return mixed | |
| 2049 | + */ | |
| 2050 | + function bbp_get_form_option( $option, $default = '', $is_slug = false ) { | |
| 2070 | 2051 | |
| 2071 | -/** | |
| 2072 | - * Return settings API option. | |
| 2073 | - * | |
| 2074 | - * @since 2.0.0 bbPress (r3203) | |
| 2075 | - * | |
| 2076 | - * @param string $option | |
| 2077 | - * @param string $default | |
| 2078 | - * @param bool $is_slug | |
| 2079 | - * | |
| 2080 | - * @return mixed | |
| 2081 | - */ | |
| 2082 | -function bbp_get_form_option( $option, $default = '', $is_slug = false ) { | |
| 2052 | + // Get the option and sanitize it | |
| 2053 | + $value = get_option( $option, $default ); | |
| 2083 | 2054 | |
| 2084 | - // Get the option and sanitize it | |
| 2085 | - $value = get_option( $option, $default ); | |
| 2055 | + // Slug? | |
| 2056 | + if ( true === $is_slug ) { | |
| 2057 | + $value = esc_attr( apply_filters( 'editable_slug', $value ) ); | |
| 2086 | 2058 | |
| 2087 | - // Slug? | |
| 2088 | - if ( true === $is_slug ) { | |
| 2089 | - $value = esc_attr( apply_filters( 'editable_slug', $value ) ); | |
| 2059 | + // Not a slug | |
| 2060 | + } else { | |
| 2061 | + $value = esc_attr( $value ); | |
| 2062 | + } | |
| 2090 | 2063 | |
| 2091 | - // Not a slug | |
| 2092 | - } else { | |
| 2093 | - $value = esc_attr( $value ); | |
| 2094 | - } | |
| 2064 | + // Fallback to default, unless numeric (allow zero) | |
| 2065 | + if ( empty( $value ) && ! is_numeric( $value ) ) { | |
| 2066 | + $value = $default; | |
| 2067 | + } | |
| 2095 | 2068 | |
| 2096 | - // Fallback to default, unless numeric (allow zero) | |
| 2097 | - if ( empty( $value ) && ! is_numeric( $value ) ) { | |
| 2098 | - $value = $default; | |
| 2069 | + // Filter & return | |
| 2070 | + return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug ); | |
| 2099 | 2071 | } |
| 2100 | 2072 | |
| 2101 | - // Filter & return | |
| 2102 | - return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug ); | |
| 2103 | -} | |
| 2104 | - | |
| 2105 | 2073 | /** |
| 2106 | 2074 | * Used to check if a bbPress slug conflicts with an existing known slug. |
| 2107 | 2075 | * |
| 2108 | 2076 | * @since 2.0.0 bbPress (r3306) |
| @@ -2124,16 +2092,16 @@ | ||
| 2124 | 2092 | $core_slugs = apply_filters( |
| 2125 | 2093 | 'bbp_slug_conflict_check', |
| 2126 | 2094 | array( |
| 2127 | 2095 | |
| 2128 | - /** WordPress Core ********************************************/ | |
| 2096 | + /** WordPress Core ****************************************************/ | |
| 2129 | 2097 | |
| 2130 | - // Core Post Types | |
| 2131 | - 'post_base' => array( | |
| 2132 | - 'name' => esc_html__( 'Posts', 'bbpress' ), | |
| 2133 | - 'default' => 'post', | |
| 2134 | - 'context' => 'WordPress' | |
| 2135 | - ), | |
| 2098 | + // Core Post Types | |
| 2099 | + 'post_base' => array( | |
| 2100 | + 'name' => esc_html__( 'Posts', 'bbpress' ), | |
| 2101 | + 'default' => 'post', | |
| 2102 | + 'context' => 'WordPress' | |
| 2103 | + ), | |
| 2136 | 2104 | 'page_base' => array( |
| 2137 | 2105 | 'name' => esc_html__( 'Pages', 'bbpress' ), |
| 2138 | 2106 | 'default' => 'page', |
| 2139 | 2107 | 'context' => 'WordPress' |
| @@ -2167,16 +2135,16 @@ | ||
| 2167 | 2135 | 'default' => 'category', |
| 2168 | 2136 | 'context' => 'WordPress' |
| 2169 | 2137 | ), |
| 2170 | 2138 | |
| 2171 | - /** bbPress Core **********************************************/ | |
| 2139 | + /** bbPress Core ******************************************************/ | |
| 2172 | 2140 | |
| 2173 | - // Forum archive slug | |
| 2174 | - '_bbp_root_slug' => array( | |
| 2175 | - 'name' => esc_html__( 'Forums base', 'bbpress' ), | |
| 2176 | - 'default' => 'forums', | |
| 2177 | - 'context' => 'bbPress' | |
| 2178 | - ), | |
| 2141 | + // Forum archive slug | |
| 2142 | + '_bbp_root_slug' => array( | |
| 2143 | + 'name' => esc_html__( 'Forums base', 'bbpress' ), | |
| 2144 | + 'default' => 'forums', | |
| 2145 | + 'context' => 'bbPress' | |
| 2146 | + ), | |
| 2179 | 2147 | |
| 2180 | 2148 | // Topic archive slug |
| 2181 | 2149 | '_bbp_topic_archive_slug' => array( |
| 2182 | 2150 | 'name' => esc_html__( 'Topics base', 'bbpress' ), |
| @@ -2234,9 +2202,9 @@ | ||
| 2234 | 2202 | ), |
| 2235 | 2203 | ) |
| 2236 | 2204 | ); |
| 2237 | 2205 | |
| 2238 | - /** BuddyPress Core ***************************************************/ | |
| 2206 | + /** BuddyPress Core *******************************************************/ | |
| 2239 | 2207 | |
| 2240 | 2208 | if ( defined( 'BP_VERSION' ) ) { |
| 2241 | 2209 | $bp = buddypress(); |
| 2242 | 2210 | |
| @@ -2267,18 +2235,15 @@ | ||
| 2267 | 2235 | |
| 2268 | 2236 | // Compare |
| 2269 | 2237 | if ( ( $slug !== $key ) && ( $slug_check === $this_slug ) ) : |
| 2270 | 2238 | ?> |
| 2271 | - <span class="attention"> | |
| 2272 | - <?php | |
| 2273 | - printf( | |
| 2239 | + | |
| 2240 | + <span class="attention"><?php printf( | |
| 2274 | 2241 | /* translators: 1: Context (e.g., "BuddyPress"), 2: Name of the conflicting item */ |
| 2275 | - esc_html__( 'Possible %1$s conflict: %2$s', 'bbpress' ), | |
| 2276 | - $value['context'], | |
| 2277 | - '<strong>' . $value['name'] . '</strong>' | |
| 2278 | - ); | |
| 2279 | - ?> | |
| 2280 | - </span> | |
| 2281 | - <?php | |
| 2282 | - endif; | |
| 2242 | + esc_html__( 'Possible %1$s conflict: %2$s', 'bbpress' ), | |
| 2243 | + $value['context'], | |
| 2244 | + '<strong>' . $value['name'] . '</strong>' | |
| 2245 | + ); ?></span> | |
| 2246 | + | |
| 2247 | + <?php endif; | |
| 2283 | 2248 | } |
| 2284 | 2249 | } |