Making WordPress.org

Ticket #3456: 3546.diff

File 3546.diff, 3.5 KB (added by psusu, 6 years ago)

first attempt to patch

  • wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php

    diff --git a/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php b/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-directory-compat.php
    index 8b632b6..6ebdd7c 100644
    a b abstract class Directory_Compat { 
    751751                        if ( 'plugin' == $this->compat() ) {
    752752                                $subscribe   = esc_html__( 'Subscribe to this plugin', 'wporg-forums' );
    753753                                $unsubscribe = esc_html__( 'Unsubscribe from this plugin', 'wporg-forums' );
     754                                $subscribe_description   = esc_html__( 'Receive email updates about new topics on this plugin', 'wporg-forums' );
     755                                $unsubscribe_description = esc_html__( 'Unsubscribe from email updates about new topics on this plugin', 'wporg-forums' );
    754756                        } else {
    755757                                $subscribe   = esc_html__( 'Subscribe to this theme', 'wporg-forums' );
    756758                                $unsubscribe = esc_html__( 'Unsubscribe from this theme', 'wporg-forums' );
     759                                $subscribe_description   = esc_html__( 'Receive email updates about new topics on this theme', 'wporg-forums' );
     760                                $unsubscribe_description = esc_html__( 'Unsubscribe from email updates about new topics on this theme', 'wporg-forums' );
    757761                        }
    758762                        $term_subscription = Term_Subscription\Plugin::get_subscription_link( array(
    759763                                'term_id'     => $term->term_id,
    760764                                'taxonomy'    => $this->taxonomy(),
    761765                                'subscribe'   => $subscribe,
    762766                                'unsubscribe' => $unsubscribe,
     767                                'subscribe_description'   => $subscribe_description,
     768                                'unsubscribe_description' => $unsubscribe_description,
    763769                        ) );
    764770                }
    765771
  • wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php

    diff --git a/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php b/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php
    index 08f77d4..e6aaf98 100644
    a b Login and visit the topic to reply to the topic or unsubscribe from these emails 
    579579                        'taxonomy'    => 'topic-tag',
    580580                        'subscribe'   => esc_html__( 'Subscribe to this topic tag', 'wporg-forums' ),
    581581                        'unsubscribe' => esc_html__( 'Unsubscribe from this topic tag', 'wporg-forums' ),
     582                        'subscribe_description'   => esc_html__( 'Receive email updates about new topics', 'wporg-forums' ),
     583                        'unsubscribe_description' => esc_html__( 'Unsubscribe from email updates about new topics', 'wporg-forums' ),
    582584                ), 'get_term_subscription_link' );
    583585                if ( empty( $r['user_id'] ) || empty( $r['term_id'] ) || empty( $r['taxonomy'] ) ) {
    584586                        return false;
    Login and visit the topic to reply to the topic or unsubscribe from these emails 
    590592
    591593                $url = self::get_subscription_url( $r['user_id'], $r['term_id'], $r['taxonomy'] );
    592594                $text = $r['subscribe'];
     595                $description = $r['subscribe_description'];
    593596                if ( self::is_user_subscribed_to_term( $r['user_id'], $r['term_id'] ) ) {
    594597                        $text = $r['unsubscribe'];
     598                        $description = $r['unsubscribe_description'];
    595599                }
    596                 return sprintf( "<div class='wporg-bbp-term-subscription'><a href='%s'>%s</a></div>",
     600                               
     601                return sprintf( "<div class='wporg-bbp-term-subscription'><a href='%s'>%s</a> <div class='notice notice-info notice-alt'>%s</div></div>",
    597602                        $url,
    598                         esc_html( $text ) );
     603                        esc_html( $text ),
     604                        esc_html( $description )
     605                );
    599606        }
    600607
    601608        public static function get_valid_actions() {