WordPress.org

Making WordPress.org


Ignore:
Timestamp:
07/29/2016 10:44:47 AM (4 years ago)
Author:
ocean90
Message:

Support: Use wporg-forums as the text domain for bbPress plugins.

We already use it for the theme.

See #1544.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-term-subscription/inc/class-plugin.php

    r3719 r3739  
    7979
    8080        // Get required data.
    81         $user_id = get_current_user_id(); 
     81        $user_id = get_current_user_id();
    8282        $term_id = intval( $_GET['term_id'] );
    8383        $term = get_term( $term_id );
     
    8585        // Check for empty term id.
    8686        if ( ! $term ) {
    87             bbp_add_error( 'wporg_bbp_subscribe_term_id', __( '<strong>ERROR</strong>: No term was found! Which term are you subscribing/unsubscribing to?', 'wporg' ) );
     87            bbp_add_error( 'wporg_bbp_subscribe_term_id', __( '<strong>ERROR</strong>: No term was found! Which term are you subscribing/unsubscribing to?', 'wporg-forums' ) );
    8888
    8989        // Check for current user.
    9090        } elseif ( empty( $user_id ) ) {
    91             bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>ERROR</strong>: You must be logged in to do this!', 'wporg' ) );
     91            bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>ERROR</strong>: You must be logged in to do this!', 'wporg-forums' ) );
    9292
    9393        // Check nonce.
    9494        } elseif ( ! bbp_verify_nonce_request( 'toggle-term-subscription_' . $user_id . '_' . $term_id ) ) {
    95             bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg' ) );
     95            bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
    9696
    9797        // Check current user's ability to spectate.
    9898        } elseif ( ! current_user_can( 'spectate' ) ) {
    99             bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg' ) );
     99            bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg-forums' ) );
    100100        }
    101101
     
    118118            bbp_redirect( $redirect );
    119119        } elseif ( true === $is_subscribed && 'wporg_bbp_subscribe_term' === $action ) {
    120             bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>ERROR</strong>: There was a problem subscribing to that term!', 'wporg' ) );
     120            bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>ERROR</strong>: There was a problem subscribing to that term!', 'wporg-forums' ) );
    121121        } elseif ( false === $is_subscribed && 'wporg_bbp_unsubscribe_term' === $action ) {
    122             bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that term!', 'wporg' ) );
     122            bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that term!', 'wporg-forums' ) );
    123123        }
    124124    }
     
    206206You are receiving this email because you subscribed to a topic tag.
    207207
    208 Login and visit the topic to unsubscribe from these emails.', 'wporg' ),
     208Login and visit the topic to unsubscribe from these emails.', 'wporg-forums' ),
    209209            $topic_author_name,
    210210            $topic_content,
     
    297297You are receiving this email because you subscribed to a topic tag.
    298298
    299 Login and visit the topic to unsubscribe from these emails.', 'wporg' ),
     299Login and visit the topic to unsubscribe from these emails.', 'wporg-forums' ),
    300300            $reply_author_name,
    301301            $reply_content,
     
    376376     * @param $user_id int The user id
    377377     * @param $term_id int The term id
    378      * @return bool False if invalid, otherwise true 
     378     * @return bool False if invalid, otherwise true
    379379     */
    380380    public static function add_user_subscription( $user_id = 0, $term_id = 0 ) {
     
    384384
    385385        if ( ! self::is_user_subscribed_to_term( $user_id, $term_id ) ) {
    386             add_term_meta( $term_id, self::META_KEY, $user_id ); 
     386            add_term_meta( $term_id, self::META_KEY, $user_id );
    387387            wp_cache_delete( 'wporg_bbp_get_term_subscribers_' . $term_id, 'bbpress_users' );
    388388        }
     
    429429            'user_id'     => get_current_user_id(),
    430430            'term_id'     => 0,
    431             'subscribe'   => esc_html__( 'Subscribe to this topic tag', 'wporg' ),
    432             'unsubscribe' => esc_html__( 'Unsubscribe from this topic tag', 'wporg' ),
     431            'subscribe'   => esc_html__( 'Subscribe to this topic tag', 'wporg-forums' ),
     432            'unsubscribe' => esc_html__( 'Unsubscribe from this topic tag', 'wporg-forums' ),
    433433        ), 'get_term_subscription_link' );
    434434        if ( empty( $r['user_id'] ) || empty( $r['term_id'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.