Skip to:
Content

bbPress.org

Ticket #2582: 2582.patch

File 2582.patch, 2.7 KB (added by dilip2615, 6 months ago)

Hello, attached 2582.patch for replacing +/× toggle symbols with Dashicons in user favorites/subscriptions templates (loop-single-topic.php and loop-single-forum.php), along with related CSS adjustments in bbpress.css.

  • src/templates/default/bbpress/loop-single-forum.php

    diff --git a/src/templates/default/bbpress/loop-single-forum.php b/src/templates/default/bbpress/loop-single-forum.php
    index b3a3846..cbb4e28 100644
    a b defined( 'ABSPATH' ) || exit;  
    2424                                <?php bbp_forum_subscription_link(
    2525                                        array(
    2626                                                'before'      => '',
    27                                                 'subscribe'   => '+',
    28                                                 'unsubscribe' => '&times;'
     27                                                'subscribe'   => '<span class="dashicons dashicons-plus" aria-hidden="true"></span>',
     28                                                'unsubscribe' => '<span class="dashicons dashicons-no" aria-hidden="true"></span>'
    2929                                        )
    3030                                ); ?>
    3131
  • src/templates/default/bbpress/loop-single-topic.php

    diff --git a/src/templates/default/bbpress/loop-single-topic.php b/src/templates/default/bbpress/loop-single-topic.php
    index 531a705..a9afa49 100644
    a b defined( 'ABSPATH' ) || exit;  
    2626                                        <?php bbp_topic_favorite_link(
    2727                                                array(
    2828                                                        'before'    => '',
    29                                                         'favorite'  => '+',
    30                                                         'favorited' => '&times;'
     29                                                        'favorite'  => '<span class="dashicons dashicons-plus" aria-hidden="true"></span>',
     30                                                        'favorited' => '<span class="dashicons dashicons-no" aria-hidden="true"></span>'
    3131                                                )
    3232                                        ); ?>
    3333
    defined( 'ABSPATH' ) || exit;  
    4444                                        <?php bbp_topic_subscription_link(
    4545                                                array(
    4646                                                        'before'      => '',
    47                                                         'subscribe'   => '+',
    48                                                         'unsubscribe' => '&times;'
     47                                                        'subscribe'   => '<span class="dashicons dashicons-plus" aria-hidden="true"></span>',
     48                                                        'unsubscribe' => '<span class="dashicons dashicons-no" aria-hidden="true"></span>'
    4949                                                )
    5050                                        ); ?>
    5151
  • src/templates/default/css/bbpress.css

    diff --git a/src/templates/default/css/bbpress.css b/src/templates/default/css/bbpress.css
    index 8b87ad6..d2baa70 100644
    a b td.bbp-topic-counts {  
    562562        background-color: #dfd;
    563563        font-weight: 700;
    564564        font-size: 12px;
     565        line-height: 1;
     566        display: inline-flex;
     567        align-items: center;
     568        justify-content: center;
    565569}
    566570
    567571.bbp-row-actions #favorite-toggle a:hover {
    td.bbp-topic-counts {  
    590594        background-color: #dfd;
    591595        font-weight: 700;
    592596        font-size: 12px;
     597        line-height: 1;
     598        display: inline-flex;
     599        align-items: center;
     600        justify-content: center;
    593601}
    594602
    595603.bbp-row-actions #subscription-toggle a:hover {
    td.bbp-topic-counts {  
    610618        background-color: #fdd;
    611619}
    612620
     621.bbp-row-actions #favorite-toggle a .dashicons,
     622.bbp-row-actions #subscription-toggle a .dashicons {
     623        width: 16px;
     624        height: 16px;
     625        font-size: 16px;
     626        line-height: 16px;
     627}
     628
    613629#bbpress-forums .bbp-forum-info .bbp-forum-content,
    614630#bbpress-forums p.bbp-topic-meta {
    615631        font-size: 11px;