BBP_Forums_Admin::admin_head()

Add some general styling to the admin area

Description

Source

File: bp-forums/admin/forums.php

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
public function admin_head() {
 
    if ( $this->bail() ) return;
 
 
    global $post, $pagenow;
    if ( ( isset( $post->post_type ) && $post->post_type === bbp_get_forum_post_type() && $pagenow == 'edit.php' ) || ( isset( $post->post_type ) && $post->post_type == bbp_get_forum_post_type() && $pagenow == 'post-new.php' ) || ( isset( $post->post_type ) && $post->post_type == bbp_get_forum_post_type() && $pagenow == 'post.php' ) ) {
        ?>
        <style media="screen">
            /*<![CDATA[*/
 
            #misc-publishing-actions,
            #save-post {
                display: block !important;
            }
 
            /*]]>*/
        </style>
        <?php
    }
        ?>
 
    <style media="screen">
    /*<![CDATA[*/
 
        #misc-publishing-actions,
        #save-post {
            display: none;
        }
 
        strong.label {
            display: inline-block;
            width: 60px;
        }
 
        #bbp_forum_attributes hr {
            border-style: solid;
            border-width: 1px;
            border-color: #ccc #fff #fff #ccc;
        }
 
        .column-bbp_forum_topic_count,
        .column-bbp_forum_reply_count,
        .column-bbp_topic_reply_count,
        .column-bbp_topic_voice_count {
            width: 10% !important;
        }
 
        .column-author,
        .column-bbp_reply_author,
        .column-bbp_topic_author {
            width: 10% !important;
        }
 
        .column-bbp_topic_forum,
        .column-bbp_reply_forum,
        .column-bbp_reply_topic {
            width: 10% !important;
        }
 
        .column-bbp_forum_freshness,
        .column-bbp_topic_freshness {
            width: 10% !important;
        }
 
        .column-bbp_forum_created,
        .column-bbp_topic_created,
        .column-bbp_reply_created {
            width: 15% !important;
        }
 
        .status-closed {
            background-color: #eaeaea;
        }
 
        .status-spam {
            background-color: #faeaea;
        }
 
    /*]]>*/
    </style>
 
    <?php
}

Changelog

Changelog
Version Description
bbPress (r2464) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.