Making WordPress.org


Ignore:
Timestamp:
03/16/2021 02:05:35 AM (5 years ago)
Author:
dd32
Message:

Support Forums: Also Viewing: Code / warning cleanups.

  • Don't use deprecated jQuery functionality
  • Properly clear the caches when expiring some 'viewing' notifications.
  • Use a per-site, rather than per-network option for creating the table. Only affects networks with multiple sites using it.
  • Mark the option in the user profile as translatable.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-also-viewing/wporg-bbp-also-viewing.php

    r10662 r10821  
    200200                checked( enabled( $user_id ), true, false ),
    201201                sprintf(
    202                         'Enable the <a href="%s">Also Viewing</a> feature.', // TODO: Translate once text is figured out __( , 'wporg-forums' ),
     202                        __( 'Enable the <a href="%s">Also Viewing</a> feature.', 'wporg-forums' ),
    203203                        'https://make.wordpress.org/support/handbook/appendix/helpful-tools/#avoiding-overlapping-replies'
    204204                )
     
    368368
    369369        foreach ( $pages as $p ) {
    370                 wp_cache_delete( $page, CACHE_GROUP );
     370                wp_cache_delete( $p, CACHE_GROUP );
    371371        }
    372372}
     
    442442        global $wpdb;
    443443
    444         if ( get_site_option( 'also-viewing' ) ) {
     444        if ( get_option( 'also-viewing' ) ) {
    445445                return;
    446446        }
     
    462462        );
    463463
    464         update_site_option( 'also-viewing', true );
    465 }
     464        update_option( 'also-viewing', true );
     465}
Note: See TracChangeset for help on using the changeset viewer.