| @@ -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' => 'bbp_admin_sanitize_default_role', | |
| 119 | - 'args' => array() | |
| 120 | - ), | |
| 116 | + // Default role setting | |
| 117 | + '_bbp_default_role' => array( | |
| 118 | + 'sanitize_callback' => 'bbp_admin_sanitize_default_role', | |
| 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' => 'bbp_admin_sanitize_theme_package_id', | |
| 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' => 'bbp_admin_sanitize_theme_package_id', | |
| 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 |
| @@ -661,10 +661,10 @@ | ||
| 661 | 661 | * Get settings fields by section. |
| 662 | 662 | * |
| 663 | 663 | * @since 2.1.0 bbPress (r4002) |
| 664 | 664 | * |
| 665 | - * @param string $section_id ID of the section to get fields for. | |
| 666 | - * @staticvar array $fields All of the available fields. | |
| 665 | + * @param string $section_id ID of the section to get fields for | |
| 666 | + * @staticvar array $fields All of the available fields | |
| 667 | 667 | * @return mixed False if section is invalid, array of fields otherwise. |
| 668 | 668 | */ |
| 669 | 669 | function bbp_admin_get_settings_fields_for_section( $section_id = '' ) { |
| 670 | 670 | static $fields = array(); |
| @@ -693,9 +693,9 @@ | ||
| 693 | 693 | |
| 694 | 694 | /** User Section **************************************************************/ |
| 695 | 695 | |
| 696 | 696 | /** |
| 697 | - * User settings section description for the settings page. | |
| 697 | + * User settings section description for the settings page | |
| 698 | 698 | * |
| 699 | 699 | * @since 2.4.0 bbPress (r4968) |
| 700 | 700 | */ |
| 701 | 701 | function bbp_admin_setting_callback_user_section() { |
| @@ -707,9 +707,9 @@ | ||
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | |
| 710 | 710 | /** |
| 711 | - * Edit lock setting field. | |
| 711 | + * Edit lock setting field | |
| 712 | 712 | * |
| 713 | 713 | * @since 2.0.0 bbPress (r2737) |
| 714 | 714 | */ |
| 715 | 715 | function bbp_admin_setting_callback_editlock() { |
| @@ -738,9 +738,9 @@ | ||
| 738 | 738 | <?php |
| 739 | 739 | } |
| 740 | 740 | |
| 741 | 741 | /** |
| 742 | - * Throttle setting field. | |
| 742 | + * Throttle setting field | |
| 743 | 743 | * |
| 744 | 744 | * @since 2.0.0 bbPress (r2737) |
| 745 | 745 | */ |
| 746 | 746 | function bbp_admin_setting_callback_throttle() { |
| @@ -769,9 +769,9 @@ | ||
| 769 | 769 | <?php |
| 770 | 770 | } |
| 771 | 771 | |
| 772 | 772 | /** |
| 773 | - * Allow anonymous posting setting field. | |
| 773 | + * Allow anonymous posting setting field | |
| 774 | 774 | * |
| 775 | 775 | * @since 2.0.0 bbPress (r2737) |
| 776 | 776 | */ |
| 777 | 777 | function bbp_admin_setting_callback_anonymous() { |
| @@ -784,9 +784,9 @@ | ||
| 784 | 784 | <?php |
| 785 | 785 | } |
| 786 | 786 | |
| 787 | 787 | /** |
| 788 | - * Allow global access setting field. | |
| 788 | + * Allow global access setting field | |
| 789 | 789 | * |
| 790 | 790 | * @since 2.0.0 bbPress (r3378) |
| 791 | 791 | */ |
| 792 | 792 | function bbp_admin_setting_callback_global_access() { |
| @@ -827,9 +827,9 @@ | ||
| 827 | 827 | |
| 828 | 828 | /** Features Section **********************************************************/ |
| 829 | 829 | |
| 830 | 830 | /** |
| 831 | - * Features settings section description for the settings page. | |
| 831 | + * Features settings section description for the settings page | |
| 832 | 832 | * |
| 833 | 833 | * @since 2.4.0 bbPress (r4968) |
| 834 | 834 | */ |
| 835 | 835 | function bbp_admin_setting_callback_features_section() { |
| @@ -840,9 +840,9 @@ | ||
| 840 | 840 | <?php |
| 841 | 841 | } |
| 842 | 842 | |
| 843 | 843 | /** |
| 844 | - * Allow favorites setting field. | |
| 844 | + * Allow favorites setting field | |
| 845 | 845 | * |
| 846 | 846 | * @since 2.0.0 bbPress (r2786) |
| 847 | 847 | */ |
| 848 | 848 | function bbp_admin_setting_callback_favorites() { |
| @@ -854,9 +854,9 @@ | ||
| 854 | 854 | <?php |
| 855 | 855 | } |
| 856 | 856 | |
| 857 | 857 | /** |
| 858 | - * Allow subscriptions setting field. | |
| 858 | + * Allow subscriptions setting field | |
| 859 | 859 | * |
| 860 | 860 | * @since 2.0.0 bbPress (r2737) |
| 861 | 861 | */ |
| 862 | 862 | function bbp_admin_setting_callback_subscriptions() { |
| @@ -868,9 +868,9 @@ | ||
| 868 | 868 | <?php |
| 869 | 869 | } |
| 870 | 870 | |
| 871 | 871 | /** |
| 872 | - * Allow engagements setting field. | |
| 872 | + * Allow engagements setting field | |
| 873 | 873 | * |
| 874 | 874 | * @since 2.6.0 bbPress (r6321) |
| 875 | 875 | */ |
| 876 | 876 | function bbp_admin_setting_callback_engagements() { |
| @@ -882,9 +882,9 @@ | ||
| 882 | 882 | <?php |
| 883 | 883 | } |
| 884 | 884 | |
| 885 | 885 | /** |
| 886 | - * Allow topic tags setting field. | |
| 886 | + * Allow topic tags setting field | |
| 887 | 887 | * |
| 888 | 888 | * @since 2.2.0 bbPress (r4098) |
| 889 | 889 | */ |
| 890 | 890 | function bbp_admin_setting_callback_topic_tags() { |
| @@ -896,9 +896,9 @@ | ||
| 896 | 896 | <?php |
| 897 | 897 | } |
| 898 | 898 | |
| 899 | 899 | /** |
| 900 | - * Allow forum-mods setting field. | |
| 900 | + * Allow forum-mods setting field | |
| 901 | 901 | * |
| 902 | 902 | * @since 2.6.0 bbPress (r5834) |
| 903 | 903 | */ |
| 904 | 904 | function bbp_admin_setting_callback_forum_mods() { |
| @@ -911,9 +911,9 @@ | ||
| 911 | 911 | <?php |
| 912 | 912 | } |
| 913 | 913 | |
| 914 | 914 | /** |
| 915 | - * Allow super-mods setting field. | |
| 915 | + * Allow super-mods setting field | |
| 916 | 916 | * |
| 917 | 917 | * @since 2.6.0 bbPress (r6563) |
| 918 | 918 | */ |
| 919 | 919 | function bbp_admin_setting_callback_super_mods() { |
| @@ -926,9 +926,9 @@ | ||
| 926 | 926 | <?php |
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | /** |
| 930 | - * Allow forum wide search. | |
| 930 | + * Allow forum wide search | |
| 931 | 931 | * |
| 932 | 932 | * @since 2.4.0 bbPress (r4971) |
| 933 | 933 | */ |
| 934 | 934 | function bbp_admin_setting_callback_search() { |
| @@ -940,11 +940,11 @@ | ||
| 940 | 940 | <?php |
| 941 | 941 | } |
| 942 | 942 | |
| 943 | 943 | /** |
| 944 | - * Hierarchical reply maximum depth level setting field. | |
| 944 | + * Hierarchical reply maximum depth level setting field | |
| 945 | 945 | * |
| 946 | - * Replies will be threaded if depth is 2 or greater. | |
| 946 | + * Replies will be threaded if depth is 2 or greater | |
| 947 | 947 | * |
| 948 | 948 | * @since 2.4.0 bbPress (r4944) |
| 949 | 949 | */ |
| 950 | 950 | function bbp_admin_setting_callback_thread_replies_depth() { |
| @@ -968,16 +968,11 @@ | ||
| 968 | 968 | |
| 969 | 969 | <?php $select = ob_get_clean(); ?> |
| 970 | 970 | |
| 971 | 971 | <label for="_bbp_allow_threaded_replies"> |
| 972 | - <input name="_bbp_allow_threaded_replies" id="_bbp_allow_threaded_replies" type="checkbox" value="1" | |
| 973 | - <?php | |
| 974 | - checked( '1', bbp_allow_threaded_replies( false ) ); | |
| 975 | - bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); | |
| 976 | - ?> | |
| 977 | - /> | |
| 978 | - <?php | |
| 979 | - printf( | |
| 972 | + <input name="_bbp_allow_threaded_replies" id="_bbp_allow_threaded_replies" type="checkbox" value="1" <?php checked( '1', bbp_allow_threaded_replies( false ) ); | |
| 973 | + bbp_maybe_admin_setting_disabled( '_bbp_allow_threaded_replies' ); ?> /> | |
| 974 | + <?php printf( | |
| 980 | 975 | /* translators: %s: Depth level input field HTML */ |
| 981 | 976 | esc_html__( 'Enable threaded (nested) replies %s levels deep', 'bbpress' ), |
| 982 | 977 | $select |
| 983 | 978 | ); |
| @@ -987,9 +982,9 @@ | ||
| 987 | 982 | <?php |
| 988 | 983 | } |
| 989 | 984 | |
| 990 | 985 | /** |
| 991 | - * Allow topic and reply revisions. | |
| 986 | + * Allow topic and reply revisions | |
| 992 | 987 | * |
| 993 | 988 | * @since 2.0.0 bbPress (r3416) |
| 994 | 989 | */ |
| 995 | 990 | function bbp_admin_setting_callback_revisions() { |
| @@ -1001,9 +996,9 @@ | ||
| 1001 | 996 | <?php |
| 1002 | 997 | } |
| 1003 | 998 | |
| 1004 | 999 | /** |
| 1005 | - * Use the WordPress editor setting field. | |
| 1000 | + * Use the WordPress editor setting field | |
| 1006 | 1001 | * |
| 1007 | 1002 | * @since 2.1.0 bbPress (r3586) |
| 1008 | 1003 | */ |
| 1009 | 1004 | function bbp_admin_setting_callback_use_wp_editor() { |
| @@ -1015,9 +1010,9 @@ | ||
| 1015 | 1010 | <?php |
| 1016 | 1011 | } |
| 1017 | 1012 | |
| 1018 | 1013 | /** |
| 1019 | - * Main subtheme section. | |
| 1014 | + * Main subtheme section | |
| 1020 | 1015 | * |
| 1021 | 1016 | * @since 2.1.0 bbPress (r3830) |
| 1022 | 1017 | */ |
| 1023 | 1018 | function bbp_admin_setting_callback_subtheme_section() { |
| @@ -1028,9 +1023,9 @@ | ||
| 1028 | 1023 | <?php |
| 1029 | 1024 | } |
| 1030 | 1025 | |
| 1031 | 1026 | /** |
| 1032 | - * Use the WordPress editor setting field. | |
| 1027 | + * Use the WordPress editor setting field | |
| 1033 | 1028 | * |
| 1034 | 1029 | * @since 2.1.0 bbPress (r3830) |
| 1035 | 1030 | */ |
| 1036 | 1031 | function bbp_admin_setting_callback_subtheme_id() { |
| @@ -1060,9 +1055,9 @@ | ||
| 1060 | 1055 | <?php endif; |
| 1061 | 1056 | } |
| 1062 | 1057 | |
| 1063 | 1058 | /** |
| 1064 | - * Allow oEmbed in replies. | |
| 1059 | + * Allow oEmbed in replies | |
| 1065 | 1060 | * |
| 1066 | 1061 | * @since 2.1.0 bbPress (r3753) |
| 1067 | 1062 | */ |
| 1068 | 1063 | function bbp_admin_setting_callback_use_autoembed() { |
| @@ -1076,9 +1071,9 @@ | ||
| 1076 | 1071 | |
| 1077 | 1072 | /** Per Page Section **********************************************************/ |
| 1078 | 1073 | |
| 1079 | 1074 | /** |
| 1080 | - * Per page settings section description for the settings page. | |
| 1075 | + * Per page settings section description for the settings page | |
| 1081 | 1076 | * |
| 1082 | 1077 | * @since 2.0.0 bbPress (r2786) |
| 1083 | 1078 | */ |
| 1084 | 1079 | function bbp_admin_setting_callback_per_page_section() { |
| @@ -1089,9 +1084,9 @@ | ||
| 1089 | 1084 | <?php |
| 1090 | 1085 | } |
| 1091 | 1086 | |
| 1092 | 1087 | /** |
| 1093 | - * Topics per page setting field. | |
| 1088 | + * Topics per page setting field | |
| 1094 | 1089 | * |
| 1095 | 1090 | * @since 2.0.0 bbPress (r2786) |
| 1096 | 1091 | */ |
| 1097 | 1092 | function bbp_admin_setting_callback_topics_per_page() { |
| @@ -1103,9 +1098,9 @@ | ||
| 1103 | 1098 | <?php |
| 1104 | 1099 | } |
| 1105 | 1100 | |
| 1106 | 1101 | /** |
| 1107 | - * Replies per page setting field. | |
| 1102 | + * Replies per page setting field | |
| 1108 | 1103 | * |
| 1109 | 1104 | * @since 2.0.0 bbPress (r2786) |
| 1110 | 1105 | */ |
| 1111 | 1106 | function bbp_admin_setting_callback_replies_per_page() { |
| @@ -1119,9 +1114,9 @@ | ||
| 1119 | 1114 | |
| 1120 | 1115 | /** Per RSS Page Section ******************************************************/ |
| 1121 | 1116 | |
| 1122 | 1117 | /** |
| 1123 | - * Per page settings section description for the settings page. | |
| 1118 | + * Per page settings section description for the settings page | |
| 1124 | 1119 | * |
| 1125 | 1120 | * @since 2.0.0 bbPress (r3170) |
| 1126 | 1121 | */ |
| 1127 | 1122 | function bbp_admin_setting_callback_per_rss_page_section() { |
| @@ -1132,9 +1127,9 @@ | ||
| 1132 | 1127 | <?php |
| 1133 | 1128 | } |
| 1134 | 1129 | |
| 1135 | 1130 | /** |
| 1136 | - * Topics per RSS page setting field. | |
| 1131 | + * Topics per RSS page setting field | |
| 1137 | 1132 | * |
| 1138 | 1133 | * @since 2.0.0 bbPress (r3170) |
| 1139 | 1134 | */ |
| 1140 | 1135 | function bbp_admin_setting_callback_topics_per_rss_page() { |
| @@ -1146,9 +1141,9 @@ | ||
| 1146 | 1141 | <?php |
| 1147 | 1142 | } |
| 1148 | 1143 | |
| 1149 | 1144 | /** |
| 1150 | - * Replies per RSS page setting field. | |
| 1145 | + * Replies per RSS page setting field | |
| 1151 | 1146 | * |
| 1152 | 1147 | * @since 2.0.0 bbPress (r3170) |
| 1153 | 1148 | */ |
| 1154 | 1149 | function bbp_admin_setting_callback_replies_per_rss_page() { |
| @@ -1162,9 +1157,9 @@ | ||
| 1162 | 1157 | |
| 1163 | 1158 | /** Slug Section **************************************************************/ |
| 1164 | 1159 | |
| 1165 | 1160 | /** |
| 1166 | - * Slugs settings section description for the settings page. | |
| 1161 | + * Slugs settings section description for the settings page | |
| 1167 | 1162 | * |
| 1168 | 1163 | * @since 2.0.0 bbPress (r3170) |
| 1169 | 1164 | */ |
| 1170 | 1165 | function bbp_admin_setting_callback_root_slug_section() { |
| @@ -1179,9 +1174,9 @@ | ||
| 1179 | 1174 | <?php |
| 1180 | 1175 | } |
| 1181 | 1176 | |
| 1182 | 1177 | /** |
| 1183 | - * Root slug setting field. | |
| 1178 | + * Root slug setting field | |
| 1184 | 1179 | * |
| 1185 | 1180 | * @since 2.0.0 bbPress (r2786) |
| 1186 | 1181 | */ |
| 1187 | 1182 | function bbp_admin_setting_callback_root_slug() { |
| @@ -1194,9 +1189,9 @@ | ||
| 1194 | 1189 | bbp_form_slug_conflict_check( '_bbp_root_slug', 'forums' ); |
| 1195 | 1190 | } |
| 1196 | 1191 | |
| 1197 | 1192 | /** |
| 1198 | - * Include root slug setting field. | |
| 1193 | + * Include root slug setting field | |
| 1199 | 1194 | * |
| 1200 | 1195 | * @since 2.0.0 bbPress (r2786) |
| 1201 | 1196 | */ |
| 1202 | 1197 | function bbp_admin_setting_callback_include_root() { |
| @@ -1208,9 +1203,9 @@ | ||
| 1208 | 1203 | <?php |
| 1209 | 1204 | } |
| 1210 | 1205 | |
| 1211 | 1206 | /** |
| 1212 | - * Include root slug setting field. | |
| 1207 | + * Include root slug setting field | |
| 1213 | 1208 | * |
| 1214 | 1209 | * @since 2.4.0 bbPress (r4932) |
| 1215 | 1210 | */ |
| 1216 | 1211 | function bbp_admin_setting_callback_show_on_root() { |
| @@ -1245,17 +1240,13 @@ | ||
| 1245 | 1240 | |
| 1246 | 1241 | // This setting doesn't work if the theme has an archive-forum.php template. |
| 1247 | 1242 | if ( ! empty( $forum_archive ) ) : ?> |
| 1248 | 1243 | |
| 1249 | - <p class="description"> | |
| 1250 | - <?php | |
| 1251 | - printf( | |
| 1244 | + <p class="description"><?php printf( | |
| 1252 | 1245 | /* translators: %s: Forum archive template file path */ |
| 1253 | - esc_html__( 'This setting will be ignored because %s was found in your theme.', 'bbpress' ), | |
| 1254 | - '<code>' . $forum_archive . '</code>' | |
| 1255 | - ); | |
| 1256 | - ?> | |
| 1257 | - </p> | |
| 1246 | + esc_html__( 'This setting will be ignored because %s was found in your theme.', 'bbpress' ), | |
| 1247 | + '<code>' . $forum_archive . '</code>' | |
| 1248 | + ); ?></p> | |
| 1258 | 1249 | |
| 1259 | 1250 | <?php endif; |
| 1260 | 1251 | } |
| 1261 | 1252 | |
| @@ -1261,9 +1252,9 @@ | ||
| 1261 | 1252 | |
| 1262 | 1253 | /** User Slug Section *********************************************************/ |
| 1263 | 1254 | |
| 1264 | 1255 | /** |
| 1265 | - * Slugs settings section description for the settings page. | |
| 1256 | + * Slugs settings section description for the settings page | |
| 1266 | 1257 | * |
| 1267 | 1258 | * @since 2.4.0 bbPress (r4932) |
| 1268 | 1259 | */ |
| 1269 | 1260 | function bbp_admin_setting_callback_user_slug_section() { |
| @@ -1274,9 +1265,9 @@ | ||
| 1274 | 1265 | <?php |
| 1275 | 1266 | } |
| 1276 | 1267 | |
| 1277 | 1268 | /** |
| 1278 | - * User slug setting field. | |
| 1269 | + * User slug setting field | |
| 1279 | 1270 | * |
| 1280 | 1271 | * @since 2.0.0 bbPress (r2786) |
| 1281 | 1272 | */ |
| 1282 | 1273 | function bbp_admin_setting_callback_user_slug() { |
| @@ -1289,9 +1280,9 @@ | ||
| 1289 | 1280 | bbp_form_slug_conflict_check( '_bbp_user_slug', 'users' ); |
| 1290 | 1281 | } |
| 1291 | 1282 | |
| 1292 | 1283 | /** |
| 1293 | - * Topic archive slug setting field. | |
| 1284 | + * Topic archive slug setting field | |
| 1294 | 1285 | * |
| 1295 | 1286 | * @since 2.0.0 bbPress (r3186) |
| 1296 | 1287 | */ |
| 1297 | 1288 | function bbp_admin_setting_callback_topic_archive_slug() { |
| @@ -1304,9 +1295,9 @@ | ||
| 1304 | 1295 | bbp_form_slug_conflict_check( '_bbp_topic_archive_slug', 'topics' ); |
| 1305 | 1296 | } |
| 1306 | 1297 | |
| 1307 | 1298 | /** |
| 1308 | - * Reply archive slug setting field. | |
| 1299 | + * Reply archive slug setting field | |
| 1309 | 1300 | * |
| 1310 | 1301 | * @since 2.4.0 bbPress (r4932) |
| 1311 | 1302 | */ |
| 1312 | 1303 | function bbp_admin_setting_callback_reply_archive_slug() { |
| @@ -1319,9 +1310,9 @@ | ||
| 1319 | 1310 | bbp_form_slug_conflict_check( '_bbp_reply_archive_slug', 'replies' ); |
| 1320 | 1311 | } |
| 1321 | 1312 | |
| 1322 | 1313 | /** |
| 1323 | - * Favorites slug setting field. | |
| 1314 | + * Favorites slug setting field | |
| 1324 | 1315 | * |
| 1325 | 1316 | * @since 2.4.0 bbPress (r4932) |
| 1326 | 1317 | */ |
| 1327 | 1318 | function bbp_admin_setting_callback_user_favs_slug() { |
| @@ -1334,9 +1325,9 @@ | ||
| 1334 | 1325 | bbp_form_slug_conflict_check( '_bbp_user_favs_slug', 'favorites' ); |
| 1335 | 1326 | } |
| 1336 | 1327 | |
| 1337 | 1328 | /** |
| 1338 | - * Subscriptions slug setting field. | |
| 1329 | + * Subscriptions slug setting field | |
| 1339 | 1330 | * |
| 1340 | 1331 | * @since 2.4.0 bbPress (r4932) |
| 1341 | 1332 | */ |
| 1342 | 1333 | function bbp_admin_setting_callback_user_subs_slug() { |
| @@ -1349,9 +1340,9 @@ | ||
| 1349 | 1340 | bbp_form_slug_conflict_check( '_bbp_user_subs_slug', 'subscriptions' ); |
| 1350 | 1341 | } |
| 1351 | 1342 | |
| 1352 | 1343 | /** |
| 1353 | - * Engagements slug setting field. | |
| 1344 | + * Engagements slug setting field | |
| 1354 | 1345 | * |
| 1355 | 1346 | * @since 2.6.0 bbPress (r6320) |
| 1356 | 1347 | */ |
| 1357 | 1348 | function bbp_admin_setting_callback_user_engagements_slug() { |
| @@ -1366,9 +1357,9 @@ | ||
| 1366 | 1357 | |
| 1367 | 1358 | /** Single Slugs **************************************************************/ |
| 1368 | 1359 | |
| 1369 | 1360 | /** |
| 1370 | - * Slugs settings section description for the settings page. | |
| 1361 | + * Slugs settings section description for the settings page | |
| 1371 | 1362 | * |
| 1372 | 1363 | * @since 2.0.0 bbPress (r3170) |
| 1373 | 1364 | */ |
| 1374 | 1365 | function bbp_admin_setting_callback_single_slug_section() { |
| @@ -1379,9 +1370,9 @@ | ||
| 1379 | 1370 | <?php |
| 1380 | 1371 | } |
| 1381 | 1372 | |
| 1382 | 1373 | /** |
| 1383 | - * Forum slug setting field. | |
| 1374 | + * Forum slug setting field | |
| 1384 | 1375 | * |
| 1385 | 1376 | * @since 2.0.0 bbPress (r2786) |
| 1386 | 1377 | */ |
| 1387 | 1378 | function bbp_admin_setting_callback_forum_slug() { |
| @@ -1394,9 +1385,9 @@ | ||
| 1394 | 1385 | bbp_form_slug_conflict_check( '_bbp_forum_slug', 'forum' ); |
| 1395 | 1386 | } |
| 1396 | 1387 | |
| 1397 | 1388 | /** |
| 1398 | - * Topic slug setting field. | |
| 1389 | + * Topic slug setting field | |
| 1399 | 1390 | * |
| 1400 | 1391 | * @since 2.0.0 bbPress (r2786) |
| 1401 | 1392 | */ |
| 1402 | 1393 | function bbp_admin_setting_callback_topic_slug() { |
| @@ -1409,9 +1400,9 @@ | ||
| 1409 | 1400 | bbp_form_slug_conflict_check( '_bbp_topic_slug', 'topic' ); |
| 1410 | 1401 | } |
| 1411 | 1402 | |
| 1412 | 1403 | /** |
| 1413 | - * Reply slug setting field. | |
| 1404 | + * Reply slug setting field | |
| 1414 | 1405 | * |
| 1415 | 1406 | * @since 2.0.0 bbPress (r2786) |
| 1416 | 1407 | */ |
| 1417 | 1408 | function bbp_admin_setting_callback_reply_slug() { |
| @@ -1424,9 +1415,9 @@ | ||
| 1424 | 1415 | bbp_form_slug_conflict_check( '_bbp_reply_slug', 'reply' ); |
| 1425 | 1416 | } |
| 1426 | 1417 | |
| 1427 | 1418 | /** |
| 1428 | - * Topic tag slug setting field. | |
| 1419 | + * Topic tag slug setting field | |
| 1429 | 1420 | * |
| 1430 | 1421 | * @since 2.0.0 bbPress (r2786) |
| 1431 | 1422 | */ |
| 1432 | 1423 | function bbp_admin_setting_callback_topic_tag_slug() { |
| @@ -1440,9 +1431,9 @@ | ||
| 1440 | 1431 | bbp_form_slug_conflict_check( '_bbp_topic_tag_slug', 'topic-tag' ); |
| 1441 | 1432 | } |
| 1442 | 1433 | |
| 1443 | 1434 | /** |
| 1444 | - * View slug setting field. | |
| 1435 | + * View slug setting field | |
| 1445 | 1436 | * |
| 1446 | 1437 | * @since 2.0.0 bbPress (r2789) |
| 1447 | 1438 | */ |
| 1448 | 1439 | function bbp_admin_setting_callback_view_slug() { |
| @@ -1455,9 +1446,9 @@ | ||
| 1455 | 1446 | bbp_form_slug_conflict_check( '_bbp_view_slug', 'view' ); |
| 1456 | 1447 | } |
| 1457 | 1448 | |
| 1458 | 1449 | /** |
| 1459 | - * Search slug setting field. | |
| 1450 | + * Search slug setting field | |
| 1460 | 1451 | * |
| 1461 | 1452 | * @since 2.3.0 bbPress (r4579) |
| 1462 | 1453 | */ |
| 1463 | 1454 | function bbp_admin_setting_callback_search_slug() { |
| @@ -1470,11 +1461,11 @@ | ||
| 1470 | 1461 | bbp_form_slug_conflict_check( '_bbp_search_slug', 'search' ); |
| 1471 | 1462 | } |
| 1472 | 1463 | |
| 1473 | 1464 | /** |
| 1474 | - * Edit slug setting field. | |
| 1465 | + * Edit slug setting field | |
| 1475 | 1466 | * |
| 1476 | - * @since 2.6.2 bbPress (r6967) | |
| 1467 | + * @since 2.6.2 bbPress (r6966) | |
| 1477 | 1468 | */ |
| 1478 | 1469 | function bbp_admin_setting_callback_edit_slug() { |
| 1479 | 1470 | ?> |
| 1480 | 1471 | |
| @@ -1487,9 +1478,9 @@ | ||
| 1487 | 1478 | |
| 1488 | 1479 | /** BuddyPress ****************************************************************/ |
| 1489 | 1480 | |
| 1490 | 1481 | /** |
| 1491 | - * Extension settings section description for the settings page. | |
| 1482 | + * Extension settings section description for the settings page | |
| 1492 | 1483 | * |
| 1493 | 1484 | * @since 2.1.0 bbPress (r3575) |
| 1494 | 1485 | */ |
| 1495 | 1486 | function bbp_admin_setting_callback_buddypress_section() { |
| @@ -1500,9 +1491,9 @@ | ||
| 1500 | 1491 | <?php |
| 1501 | 1492 | } |
| 1502 | 1493 | |
| 1503 | 1494 | /** |
| 1504 | - * Allow BuddyPress group forums setting field. | |
| 1495 | + * Allow BuddyPress group forums setting field | |
| 1505 | 1496 | * |
| 1506 | 1497 | * @since 2.1.0 bbPress (r3575) |
| 1507 | 1498 | */ |
| 1508 | 1499 | function bbp_admin_setting_callback_group_forums() { |
| @@ -1514,9 +1505,9 @@ | ||
| 1514 | 1505 | <?php |
| 1515 | 1506 | } |
| 1516 | 1507 | |
| 1517 | 1508 | /** |
| 1518 | - * Replies per page setting field. | |
| 1509 | + * Replies per page setting field | |
| 1519 | 1510 | * |
| 1520 | 1511 | * @since 2.1.0 bbPress (r3575) |
| 1521 | 1512 | */ |
| 1522 | 1513 | function bbp_admin_setting_callback_group_forums_root_id() { |
| @@ -1561,10 +1552,9 @@ | ||
| 1561 | 1552 | ); |
| 1562 | 1553 | |
| 1563 | 1554 | // Button & text |
| 1564 | 1555 | $button = '<a href="' . esc_url( $new_url ) . '">' . esc_html__( 'create a new one', 'bbpress' ) . '</a>'; |
| 1565 | - /* translators: 1: Forum select dropdown HTML, 2: Create new forum link HTML */ | |
| 1566 | - $text = esc_html__( 'Use %1$s to contain your group forums, or %2$s', 'bbpress' ); | |
| 1556 | + $text = esc_html__( 'Use %s to contain your group forums, or %s', 'bbpress' ); //phpcs:ignore | |
| 1567 | 1557 | } else { |
| 1568 | 1558 | /* translators: %s: Forum select dropdown HTML */ |
| 1569 | 1559 | $text = esc_html__( 'Use %s to contain your group forums', 'bbpress' ); |
| 1570 | 1560 | } |
| @@ -1578,9 +1568,9 @@ | ||
| 1578 | 1568 | |
| 1579 | 1569 | /** Akismet *******************************************************************/ |
| 1580 | 1570 | |
| 1581 | 1571 | /** |
| 1582 | - * Extension settings section description for the settings page. | |
| 1572 | + * Extension settings section description for the settings page | |
| 1583 | 1573 | * |
| 1584 | 1574 | * @since 2.1.0 bbPress (r3575) |
| 1585 | 1575 | */ |
| 1586 | 1576 | function bbp_admin_setting_callback_akismet_section() { |
| @@ -1592,9 +1582,9 @@ | ||
| 1592 | 1582 | } |
| 1593 | 1583 | |
| 1594 | 1584 | |
| 1595 | 1585 | /** |
| 1596 | - * Allow Akismet setting field. | |
| 1586 | + * Allow Akismet setting field | |
| 1597 | 1587 | * |
| 1598 | 1588 | * @since 2.1.0 bbPress (r3575) |
| 1599 | 1589 | */ |
| 1600 | 1590 | function bbp_admin_setting_callback_akismet() { |
| @@ -1600,9 +1590,9 @@ | ||
| 1600 | 1590 | function bbp_admin_setting_callback_akismet() { |
| 1601 | 1591 | ?> |
| 1602 | 1592 | |
| 1603 | 1593 | <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' ); ?> /> |
| 1604 | - <label for="_bbp_enable_akismet"><?php esc_html_e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); ?></label> | |
| 1594 | + <label for="_bbp_enable_akismet"><?php _e( 'Allow Akismet to actively prevent forum spam.', 'bbpress' ); // phpcs:ignore WordPress.Security.EscapeOutput.UnsafePrintingFunction ?></label> | |
| 1605 | 1595 | |
| 1606 | 1596 | <?php |
| 1607 | 1597 | } |
| 1608 | 1598 | |
| @@ -1608,9 +1598,9 @@ | ||
| 1608 | 1598 | |
| 1609 | 1599 | /** Settings Page *************************************************************/ |
| 1610 | 1600 | |
| 1611 | 1601 | /** |
| 1612 | - * The main settings page. | |
| 1602 | + * The main settings page | |
| 1613 | 1603 | * |
| 1614 | 1604 | * @since 2.0.0 bbPress (r2594) |
| 1615 | 1605 | */ |
| 1616 | 1606 | function bbp_admin_settings() { |
| @@ -1637,9 +1627,9 @@ | ||
| 1637 | 1627 | |
| 1638 | 1628 | /** Converter Section *********************************************************/ |
| 1639 | 1629 | |
| 1640 | 1630 | /** |
| 1641 | - * Main settings section description for the settings page. | |
| 1631 | + * Main settings section description for the settings page | |
| 1642 | 1632 | * |
| 1643 | 1633 | * @since 2.1.0 bbPress (r3816) |
| 1644 | 1634 | */ |
| 1645 | 1635 | function bbp_converter_setting_callback_main_section() { |
| @@ -1650,9 +1640,9 @@ | ||
| 1650 | 1640 | <?php |
| 1651 | 1641 | } |
| 1652 | 1642 | |
| 1653 | 1643 | /** |
| 1654 | - * Edit Platform setting field. | |
| 1644 | + * Edit Platform setting field | |
| 1655 | 1645 | * |
| 1656 | 1646 | * @since 2.1.0 bbPress (r3816) |
| 1657 | 1647 | */ |
| 1658 | 1648 | function bbp_converter_setting_callback_platform() { |
| @@ -1673,64 +1663,46 @@ | ||
| 1673 | 1663 | <?php |
| 1674 | 1664 | } |
| 1675 | 1665 | |
| 1676 | 1666 | /** |
| 1677 | - * Edit Database Server setting field. | |
| 1667 | + * Edit Database Server setting field | |
| 1678 | 1668 | * |
| 1679 | 1669 | * @since 2.1.0 bbPress (r3816) |
| 1680 | 1670 | */ |
| 1681 | 1671 | function bbp_converter_setting_callback_dbserver() { |
| 1682 | 1672 | ?> |
| 1683 | - <input | |
| 1684 | - name="_bbp_converter_db_server" | |
| 1685 | - id="_bbp_converter_db_server" | |
| 1686 | - type="text" | |
| 1687 | - class="code" | |
| 1688 | - value="<?php bbp_form_option( '_bbp_converter_db_server', 'localhost' ); ?>" | |
| 1689 | - <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_server' ); ?> | |
| 1690 | - /> | |
| 1691 | - <p class="description"> | |
| 1692 | - <?php | |
| 1693 | - printf( | |
| 1673 | + | |
| 1674 | + <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' ); ?> /> | |
| 1675 | + <p class="description"><?php printf( | |
| 1694 | 1676 | /* translators: %s: Default value wrapped in code tags */ |
| 1695 | - esc_html__( 'Use default %s if same server, or IP or hostname', 'bbpress' ), | |
| 1696 | - '<code>localhost</code>' | |
| 1697 | - ); | |
| 1698 | - ?> | |
| 1699 | - </p> | |
| 1700 | - <?php | |
| 1677 | + esc_html__( 'Use default %s if same server, or IP or hostname', 'bbpress' ), | |
| 1678 | + '<code>localhost</code>' | |
| 1679 | + ); ?></p> | |
| 1680 | + | |
| 1681 | +<?php | |
| 1701 | 1682 | } |
| 1702 | 1683 | |
| 1703 | 1684 | /** |
| 1704 | - * Edit Database Server Port setting field. | |
| 1685 | + * Edit Database Server Port setting field | |
| 1705 | 1686 | * |
| 1706 | 1687 | * @since 2.1.0 bbPress (r3816) |
| 1707 | 1688 | */ |
| 1708 | 1689 | function bbp_converter_setting_callback_dbport() { |
| 1709 | 1690 | ?> |
| 1710 | - <input | |
| 1711 | - name="_bbp_converter_db_port" | |
| 1712 | - id="_bbp_converter_db_port" | |
| 1713 | - type="text" | |
| 1714 | - class="code" | |
| 1715 | - value="<?php bbp_form_option( '_bbp_converter_db_port', '3306' ); ?>" | |
| 1716 | - <?php bbp_maybe_admin_setting_disabled( '_bbp_converter_db_port' ); ?> | |
| 1717 | - /> | |
| 1718 | - <p class="description"> | |
| 1719 | - <?php | |
| 1720 | 1691 | |
| 1692 | + <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' ); ?> /> | |
| 1693 | + <p class="description"><?php | |
| 1721 | 1694 | printf( |
| 1722 | 1695 | /* translators: %s: Default port number wrapped in code tags */ |
| 1723 | 1696 | esc_html__( 'Use default %s if unsure', 'bbpress' ), |
| 1724 | 1697 | '<code>3306</code>' |
| 1725 | - ); | |
| 1726 | - ?> | |
| 1727 | - </p> | |
| 1728 | - <?php | |
| 1698 | + ); ?></p> | |
| 1699 | + | |
| 1700 | +<?php | |
| 1729 | 1701 | } |
| 1730 | 1702 | |
| 1731 | 1703 | /** |
| 1732 | - * Edit Database User setting field. | |
| 1704 | + * Edit Database User setting field | |
| 1733 | 1705 | * |
| 1734 | 1706 | * @since 2.1.0 bbPress (r3816) |
| 1735 | 1707 | */ |
| 1736 | 1708 | function bbp_converter_setting_callback_dbuser() { |
| @@ -1742,9 +1714,9 @@ | ||
| 1742 | 1714 | <?php |
| 1743 | 1715 | } |
| 1744 | 1716 | |
| 1745 | 1717 | /** |
| 1746 | - * Edit Database Pass setting field. | |
| 1718 | + * Edit Database Pass setting field | |
| 1747 | 1719 | * |
| 1748 | 1720 | * @since 2.1.0 bbPress (r3816) |
| 1749 | 1721 | * @since 2.6.19 bbPress (r7739) Stop displaying the saved source password. |
| 1750 | 1722 | */ |
| @@ -1767,9 +1739,9 @@ | ||
| 1767 | 1739 | <?php |
| 1768 | 1740 | } |
| 1769 | 1741 | |
| 1770 | 1742 | /** |
| 1771 | - * Edit Database Name setting field. | |
| 1743 | + * Edit Database Name setting field | |
| 1772 | 1744 | * |
| 1773 | 1745 | * @since 2.1.0 bbPress (r3816) |
| 1774 | 1746 | */ |
| 1775 | 1747 | function bbp_converter_setting_callback_dbname() { |
| @@ -1781,9 +1753,9 @@ | ||
| 1781 | 1753 | <?php |
| 1782 | 1754 | } |
| 1783 | 1755 | |
| 1784 | 1756 | /** |
| 1785 | - * Main settings section description for the settings page. | |
| 1757 | + * Main settings section description for the settings page | |
| 1786 | 1758 | * |
| 1787 | 1759 | * @since 2.1.0 bbPress (r3872) |
| 1788 | 1760 | */ |
| 1789 | 1761 | function bbp_converter_setting_callback_options_section() { |
| @@ -1794,9 +1766,9 @@ | ||
| 1794 | 1766 | <?php |
| 1795 | 1767 | } |
| 1796 | 1768 | |
| 1797 | 1769 | /** |
| 1798 | - * Edit Table Prefix setting field. | |
| 1770 | + * Edit Table Prefix setting field | |
| 1799 | 1771 | * |
| 1800 | 1772 | * @since 2.1.0 bbPress (r3816) |
| 1801 | 1773 | */ |
| 1802 | 1774 | function bbp_converter_setting_callback_dbprefix() { |
| @@ -1802,22 +1774,19 @@ | ||
| 1802 | 1774 | function bbp_converter_setting_callback_dbprefix() { |
| 1803 | 1775 | ?> |
| 1804 | 1776 | |
| 1805 | 1777 | <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' ); ?> /> |
| 1806 | - <p class="description"> | |
| 1807 | - <?php printf( | |
| 1778 | + <p class="description"><?php printf( | |
| 1808 | 1779 | /* translators: %s: Database prefix example wrapped in code tags */ |
| 1809 | - esc_html__( 'Use %s if converting from BuddyPress Legacy', 'bbpress' ), | |
| 1810 | - '<code>wp_bb_</code>' | |
| 1811 | - ); | |
| 1812 | - ?> | |
| 1813 | - </p> | |
| 1780 | + esc_html__( 'Use %s if converting from BuddyPress Legacy', 'bbpress' ), | |
| 1781 | + '<code>wp_bb_</code>' | |
| 1782 | + ); ?></p> | |
| 1814 | 1783 | |
| 1815 | 1784 | <?php |
| 1816 | 1785 | } |
| 1817 | 1786 | |
| 1818 | 1787 | /** |
| 1819 | - * Edit Rows Limit setting field. | |
| 1788 | + * Edit Rows Limit setting field | |
| 1820 | 1789 | * |
| 1821 | 1790 | * @since 2.1.0 bbPress (r3816) |
| 1822 | 1791 | */ |
| 1823 | 1792 | function bbp_converter_setting_callback_rows() { |
| @@ -1830,9 +1799,9 @@ | ||
| 1830 | 1799 | <?php |
| 1831 | 1800 | } |
| 1832 | 1801 | |
| 1833 | 1802 | /** |
| 1834 | - * Edit Delay Time setting field. | |
| 1803 | + * Edit Delay Time setting field | |
| 1835 | 1804 | * |
| 1836 | 1805 | * @since 2.1.0 bbPress (r3816) |
| 1837 | 1806 | */ |
| 1838 | 1807 | function bbp_converter_setting_callback_delay_time() { |
| @@ -1845,9 +1814,9 @@ | ||
| 1845 | 1814 | <?php |
| 1846 | 1815 | } |
| 1847 | 1816 | |
| 1848 | 1817 | /** |
| 1849 | - * Edit Halt setting field. | |
| 1818 | + * Edit Halt setting field | |
| 1850 | 1819 | * |
| 1851 | 1820 | * @since 2.6.0 bbPress (r6600) |
| 1852 | 1821 | */ |
| 1853 | 1822 | function bbp_converter_setting_callback_halt() { |
| @@ -1861,9 +1830,9 @@ | ||
| 1861 | 1830 | } |
| 1862 | 1831 | |
| 1863 | 1832 | |
| 1864 | 1833 | /** |
| 1865 | - * Edit Restart setting field. | |
| 1834 | + * Edit Restart setting field | |
| 1866 | 1835 | * |
| 1867 | 1836 | * @since 2.1.0 bbPress (r3816) |
| 1868 | 1837 | */ |
| 1869 | 1838 | function bbp_converter_setting_callback_restart() { |
| @@ -1876,9 +1845,9 @@ | ||
| 1876 | 1845 | <?php |
| 1877 | 1846 | } |
| 1878 | 1847 | |
| 1879 | 1848 | /** |
| 1880 | - * Edit Clean setting field. | |
| 1849 | + * Edit Clean setting field | |
| 1881 | 1850 | * |
| 1882 | 1851 | * @since 2.1.0 bbPress (r3816) |
| 1883 | 1852 | */ |
| 1884 | 1853 | function bbp_converter_setting_callback_clean() { |
| @@ -1891,9 +1860,9 @@ | ||
| 1891 | 1860 | <?php |
| 1892 | 1861 | } |
| 1893 | 1862 | |
| 1894 | 1863 | /** |
| 1895 | - * Edit Convert Users setting field. | |
| 1864 | + * Edit Convert Users setting field | |
| 1896 | 1865 | * |
| 1897 | 1866 | * @since 2.1.0 bbPress (r3816) |
| 1898 | 1867 | */ |
| 1899 | 1868 | function bbp_converter_setting_callback_convert_users() { |
| @@ -1913,9 +1882,9 @@ | ||
| 1913 | 1882 | |
| 1914 | 1883 | /** Converter Page ************************************************************/ |
| 1915 | 1884 | |
| 1916 | 1885 | /** |
| 1917 | - * The main settings page. | |
| 1886 | + * The main settings page | |
| 1918 | 1887 | * |
| 1919 | 1888 | * @since 2.6.0 bbPress (r6277) |
| 1920 | 1889 | */ |
| 1921 | 1890 | function bbp_converter_settings_page() { |
| @@ -1994,9 +1963,9 @@ | ||
| 1994 | 1963 | |
| 1995 | 1964 | /** Helpers *******************************************************************/ |
| 1996 | 1965 | |
| 1997 | 1966 | /** |
| 1998 | - * Contextual help for Forums settings page. | |
| 1967 | + * Contextual help for Forums settings page | |
| 1999 | 1968 | * |
| 2000 | 1969 | * @since 2.0.0 bbPress (r3119) |
| 2001 | 1970 | */ |
| 2002 | 1971 | function bbp_admin_settings_help() { |
| @@ -2109,9 +2078,9 @@ | ||
| 2109 | 2078 | disabled( isset( bbpress()->options[ $option_key ] ) ); |
| 2110 | 2079 | } |
| 2111 | 2080 | |
| 2112 | 2081 | /** |
| 2113 | - * Output settings API option. | |
| 2082 | + * Output settings API option | |
| 2114 | 2083 | * |
| 2115 | 2084 | * @since 2.0.0 bbPress (r3203) |
| 2116 | 2085 | * |
| 2117 | 2086 | * @param string $option |
| @@ -2120,43 +2089,42 @@ | ||
| 2120 | 2089 | */ |
| 2121 | 2090 | function bbp_form_option( $option, $default = '', $slug = false ) { |
| 2122 | 2091 | echo bbp_get_form_option( $option, $default, $slug ); |
| 2123 | 2092 | } |
| 2093 | + /** | |
| 2094 | + * Return settings API option | |
| 2095 | + * | |
| 2096 | + * @since 2.0.0 bbPress (r3203) | |
| 2097 | + * | |
| 2098 | + * @param string $option | |
| 2099 | + * @param string $default | |
| 2100 | + * @param bool $is_slug | |
| 2101 | + * | |
| 2102 | + * @return mixed | |
| 2103 | + */ | |
| 2104 | + function bbp_get_form_option( $option, $default = '', $is_slug = false ) { | |
| 2124 | 2105 | |
| 2125 | -/** | |
| 2126 | - * Return settings API option. | |
| 2127 | - * | |
| 2128 | - * @since 2.0.0 bbPress (r3203) | |
| 2129 | - * | |
| 2130 | - * @param string $option | |
| 2131 | - * @param string $default | |
| 2132 | - * @param bool $is_slug | |
| 2133 | - * | |
| 2134 | - * @return mixed | |
| 2135 | - */ | |
| 2136 | -function bbp_get_form_option( $option, $default = '', $is_slug = false ) { | |
| 2106 | + // Get the option and sanitize it | |
| 2107 | + $value = get_option( $option, $default ); | |
| 2137 | 2108 | |
| 2138 | - // Get the option and sanitize it | |
| 2139 | - $value = get_option( $option, $default ); | |
| 2109 | + // Slug? | |
| 2110 | + if ( true === $is_slug ) { | |
| 2111 | + $value = esc_attr( apply_filters( 'editable_slug', $value ) ); | |
| 2140 | 2112 | |
| 2141 | - // Slug? | |
| 2142 | - if ( true === $is_slug ) { | |
| 2143 | - $value = esc_attr( apply_filters( 'editable_slug', $value ) ); | |
| 2113 | + // Not a slug | |
| 2114 | + } else { | |
| 2115 | + $value = esc_attr( $value ); | |
| 2116 | + } | |
| 2144 | 2117 | |
| 2145 | - // Not a slug | |
| 2146 | - } else { | |
| 2147 | - $value = esc_attr( $value ); | |
| 2148 | - } | |
| 2118 | + // Fallback to default, unless numeric (allow zero) | |
| 2119 | + if ( empty( $value ) && ! is_numeric( $value ) ) { | |
| 2120 | + $value = $default; | |
| 2121 | + } | |
| 2149 | 2122 | |
| 2150 | - // Fallback to default, unless numeric (allow zero) | |
| 2151 | - if ( empty( $value ) && ! is_numeric( $value ) ) { | |
| 2152 | - $value = $default; | |
| 2123 | + // Filter & return | |
| 2124 | + return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug ); | |
| 2153 | 2125 | } |
| 2154 | 2126 | |
| 2155 | - // Filter & return | |
| 2156 | - return apply_filters( 'bbp_get_form_option', $value, $option, $default, $is_slug ); | |
| 2157 | -} | |
| 2158 | - | |
| 2159 | 2127 | /** |
| 2160 | 2128 | * Used to check if a bbPress slug conflicts with an existing known slug. |
| 2161 | 2129 | * |
| 2162 | 2130 | * @since 2.0.0 bbPress (r3306) |
| @@ -2178,16 +2146,16 @@ | ||
| 2178 | 2146 | $core_slugs = apply_filters( |
| 2179 | 2147 | 'bbp_slug_conflict_check', |
| 2180 | 2148 | array( |
| 2181 | 2149 | |
| 2182 | - /** WordPress Core ********************************************/ | |
| 2150 | + /** WordPress Core ****************************************************/ | |
| 2183 | 2151 | |
| 2184 | - // Core Post Types | |
| 2185 | - 'post_base' => array( | |
| 2186 | - 'name' => esc_html__( 'Posts', 'bbpress' ), | |
| 2187 | - 'default' => 'post', | |
| 2188 | - 'context' => 'WordPress' | |
| 2189 | - ), | |
| 2152 | + // Core Post Types | |
| 2153 | + 'post_base' => array( | |
| 2154 | + 'name' => esc_html__( 'Posts', 'bbpress' ), | |
| 2155 | + 'default' => 'post', | |
| 2156 | + 'context' => 'WordPress' | |
| 2157 | + ), | |
| 2190 | 2158 | 'page_base' => array( |
| 2191 | 2159 | 'name' => esc_html__( 'Pages', 'bbpress' ), |
| 2192 | 2160 | 'default' => 'page', |
| 2193 | 2161 | 'context' => 'WordPress' |
| @@ -2221,16 +2189,16 @@ | ||
| 2221 | 2189 | 'default' => 'category', |
| 2222 | 2190 | 'context' => 'WordPress' |
| 2223 | 2191 | ), |
| 2224 | 2192 | |
| 2225 | - /** bbPress Core **********************************************/ | |
| 2193 | + /** bbPress Core ******************************************************/ | |
| 2226 | 2194 | |
| 2227 | - // Forum archive slug | |
| 2228 | - '_bbp_root_slug' => array( | |
| 2229 | - 'name' => esc_html__( 'Forums base', 'bbpress' ), | |
| 2230 | - 'default' => 'forums', | |
| 2231 | - 'context' => 'bbPress' | |
| 2232 | - ), | |
| 2195 | + // Forum archive slug | |
| 2196 | + '_bbp_root_slug' => array( | |
| 2197 | + 'name' => esc_html__( 'Forums base', 'bbpress' ), | |
| 2198 | + 'default' => 'forums', | |
| 2199 | + 'context' => 'bbPress' | |
| 2200 | + ), | |
| 2233 | 2201 | |
| 2234 | 2202 | // Topic archive slug |
| 2235 | 2203 | '_bbp_topic_archive_slug' => array( |
| 2236 | 2204 | 'name' => esc_html__( 'Topics base', 'bbpress' ), |
| @@ -2288,9 +2256,9 @@ | ||
| 2288 | 2256 | ), |
| 2289 | 2257 | ) |
| 2290 | 2258 | ); |
| 2291 | 2259 | |
| 2292 | - /** BuddyPress Core ***************************************************/ | |
| 2260 | + /** BuddyPress Core *******************************************************/ | |
| 2293 | 2261 | |
| 2294 | 2262 | if ( defined( 'BP_VERSION' ) ) { |
| 2295 | 2263 | $bp = buddypress(); |
| 2296 | 2264 | |
| @@ -2321,18 +2289,15 @@ | ||
| 2321 | 2289 | |
| 2322 | 2290 | // Compare |
| 2323 | 2291 | if ( ( $slug !== $key ) && ( $slug_check === $this_slug ) ) : |
| 2324 | 2292 | ?> |
| 2325 | - <span class="attention"> | |
| 2326 | - <?php | |
| 2327 | - printf( | |
| 2293 | + | |
| 2294 | + <span class="attention"><?php printf( | |
| 2328 | 2295 | /* translators: 1: Context (e.g., "BuddyPress"), 2: Name of the conflicting item */ |
| 2329 | - esc_html__( 'Possible %1$s conflict: %2$s', 'bbpress' ), | |
| 2330 | - $value['context'], | |
| 2331 | - '<strong>' . $value['name'] . '</strong>' | |
| 2332 | - ); | |
| 2333 | - ?> | |
| 2334 | - </span> | |
| 2335 | - <?php | |
| 2336 | - endif; | |
| 2296 | + esc_html__( 'Possible %1$s conflict: %2$s', 'bbpress' ), | |
| 2297 | + $value['context'], | |
| 2298 | + '<strong>' . $value['name'] . '</strong>' | |
| 2299 | + ); ?></span> | |
| 2300 | + | |
| 2301 | + <?php endif; | |
| 2337 | 2302 | } |
| 2338 | 2303 | } |