Plugin Directory

Changeset 3454946


Ignore:
Timestamp:
02/05/2026 08:58:10 PM (4 weeks ago)
Author:
needle
Message:

Release 0.4.0

Location:
bp-group-sites/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bp-group-sites/trunk/bp-group-sites.php

    r3173019 r3454946  
    77 * Plugin URI:        https://github.com/christianwach/bp-group-sites
    88 * GitHub Plugin URI: https://github.com/christianwach/bp-group-sites
    9  * Version:           0.3.3
     9 * Version:           0.4.0
    1010 * Author:            Christian Wach
    1111 * Author URI:        https://haystack.co.uk
     
    3737
    3838// Set our version here.
    39 define( 'BPGSITES_VERSION', '0.3.3' );
     39define( 'BPGSITES_VERSION', '0.4.0' );
    4040
    4141// Store reference to this file.
     
    375375
    376376        // CommentPress theme compat.
    377         if ( function_exists( 'commentpress_get_comments_by_para' ) ) {
    378 
    379             // Enqueue common js.
     377        if ( ! function_exists( 'commentpress_get_comments_by_para' ) ) {
     378            return;
     379        }
     380
     381        // Set dependency for original CommentPress-based theme.
     382        $dependency = 'jquery_commentpress';
     383
     384        // Try to discover the current CommentPress-based theme.
     385        $theme_slug    = '';
     386        $current_theme = wp_get_theme();
     387        if ( $current_theme->exists() ) {
     388            if ( ! empty( $current_theme->parent() ) ) {
     389                $parent_theme = $current_theme->parent();
     390                if ( $parent_theme->exists() ) {
     391                    $theme_slug = $parent_theme->get_stylesheet();
     392                }
     393            } else {
     394                $theme_slug = $current_theme->get_stylesheet();
     395            }
     396        }
     397
     398        /*
     399         * Maybe add the jQuery Cookie plugin bundled with CommentPress.
     400         *
     401         * Version 4.0.0 of CommentPress removed this for all but the original theme,
     402         * but the "Filter Comments by Group" selector uses it to retain state so we
     403         * need to enqueue it for other CommentPress-based themes.
     404         */
     405        if ( in_array( $theme_slug, [ 'commentpress-modern', 'commentpress-flat' ], true ) ) {
     406
     407            // Enqueue cookie Javascript.
    380408            wp_enqueue_script(
    381                 'bpgsites_cp_js',
    382                 BPGSITES_URL . 'assets/js/bpgsites-commentpress.js',
     409                'bpgsites_cp_jquery_cookie',
     410                plugins_url( 'includes/core/assets/js/jquery.biscuit.js', COMMENTPRESS_PLUGIN_FILE ),
    383411                [ 'cp_common_js' ],
    384                 BPGSITES_VERSION,
    385                 true
     412                COMMENTPRESS_VERSION, // Version.
     413                true // In footer.
    386414            );
    387415
    388             // Get vars.
    389             $vars = [
    390                 'show_public' => $this->admin->option_get( 'bpgsites_public' ),
    391             ];
    392 
    393             // Localise with wp function.
    394             wp_localize_script( 'bpgsites_cp_js', 'BpgsitesSettings', $vars );
     416            // Switch dependency.
     417            $dependency = 'bpgsites_cp_jquery_cookie';
    395418
    396419        }
     420
     421        // Enqueue this plugin's Javascript.
     422        wp_enqueue_script(
     423            'bpgsites_cp_js',
     424            BPGSITES_URL . 'assets/js/bpgsites-commentpress.js',
     425            [ $dependency ],
     426            BPGSITES_VERSION,
     427            true // In footer.
     428        );
     429
     430        // Get vars.
     431        $vars = [
     432            'show_public' => $this->admin->option_get( 'bpgsites_public' ),
     433        ];
     434
     435        // Localise with wp function.
     436        wp_localize_script( 'bpgsites_cp_js', 'BpgsitesSettings', $vars );
    397437
    398438    }
  • bp-group-sites/trunk/languages/bp-group-sites.pot

    r3173019 r3454946  
    1 # Copyright (C) 2024 Christian Wach
     1# Copyright (C) 2026 Christian Wach
    22# This file is distributed under the GPLv2 or later.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: BP Group Sites 0.3.3a\n"
     5"Project-Id-Version: BP Group Sites 0.4.0a\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/bp-group-sites\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2024-10-21T14:41:27+00:00\n"
     12"POT-Creation-Date: 2026-02-05T20:55:09+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    14 "X-Generator: WP-CLI 2.11.0\n"
     14"X-Generator: WP-CLI 2.12.0\n"
    1515"X-Domain: bp-group-sites\n"
    1616
     
    9696#: assets/templates/bpgsites/index.php:31
    9797#: assets/templates/twentysixteen/index.php:30
     98#, php-format
    9899msgid "%s Directory"
    99100msgstr ""
     
    102103#: assets/templates/bpgsites/index.php:53
    103104#: assets/templates/twentysixteen/index.php:61
     105#, php-format
    104106msgid "All %1$s %2$s"
    105107msgstr ""
     
    127129#. translators: %s: The plural name for Group Sites.
    128130#: includes/bp-bpgsites-component.php:88
     131#, php-format
    129132msgid "Search %s..."
    130133msgstr ""
     
    132135#. translators: %s The link to the Group.
    133136#: includes/bpgsites-activity.php:195
     137#, php-format
    134138msgid "Posted in: %s"
    135139msgstr ""
     
    145149#. translators: %s The name of the Group.
    146150#: includes/bpgsites-activity.php:268
     151#, php-format
    147152msgid "This comment appears in the group %s."
    148153msgstr ""
     
    163168#. translators: 1: The User link, 2: The link to the comment, 3: The activity name, 4: The link to the post, 5: The link to the group.
    164169#: includes/bpgsites-activity.php:499
     170#, php-format
    165171msgid "%1$s left a %2$s on a %3$s %4$s in the group %5$s:"
    166172msgstr ""
     
    172178#. translators: %s: The plural name for Group Sites.
    173179#: includes/bpgsites-activity.php:606
     180#, php-format
    174181msgid "Comments in %s"
    175182msgstr ""
     
    200207#: includes/bpgsites-activity.php:1001
    201208#: includes/bpgsites-activity.php:1017
     209#, php-format
    202210msgid "<a href=\"%1$s\">%2$s</a>"
    203211msgstr ""
     
    209217#. translators: %s: The paragraph text.
    210218#: includes/bpgsites-activity.php:1054
     219#, php-format
    211220msgid "Join a group to leave a comment on %s"
    212221msgstr ""
     
    214223#. translators: %s: The singular name of a Group Site.
    215224#: includes/bpgsites-activity.php:1290
     225#, php-format
    216226msgid "Groups reading this %s"
    217227msgstr ""
     
    260270#. translators: %s: The plural name of the User's Group Sites.
    261271#: includes/bpgsites-activity.php:2350
     272#, php-format
    262273msgid "All Recent Activity in your %s"
    263274msgstr ""
     
    265276#. translators: %s: The plural name of the public Group Sites.
    266277#: includes/bpgsites-activity.php:2368
     278#, php-format
    267279msgid "Recent Activity in Public %s"
    268280msgstr ""
     
    270282#. translators: %s: The plural name of Group Sites.
    271283#: includes/bpgsites-activity.php:2420
     284#, php-format
    272285msgid "Friends Activity in your %s"
    273286msgstr ""
     
    275288#. translators: %s: The singular name of a Group Site.
    276289#: includes/bpgsites-activity.php:2514
     290#, php-format
    277291msgid "Recent Comments in this %s"
    278292msgstr ""
     
    304318#. translators: %s: The singular name for Group Sites.
    305319#: includes/bpgsites-blogs.php:242
     320#, php-format
    306321msgid "Viewing 1 %s"
    307322msgstr ""
     
    309324#. translators: 1: The site from number, 2: The site to number, 3: The total number of sites, 4: The singular name for Group Sites, 5: The plural name for Group Sites.
    310325#: includes/bpgsites-blogs.php:248
     326#, php-format
    311327msgid "Viewing %1$s - %2$s of %3$s %4$s"
    312328msgid_plural "Viewing %1$s - %2$s of %3$s %5$s"
     
    324340#. translators: %s: The singular name for Group Sites.
    325341#: includes/bpgsites-groups.php:176
     342#, php-format
    326343msgid "%s successfully added to Group"
    327344msgstr ""
     
    329346#. translators: %s: The singular name for Group Sites.
    330347#: includes/bpgsites-groups.php:192
     348#, php-format
    331349msgid "%s successfully removed from Group"
    332350msgstr ""
     
    350368#. translators: 1: The name of the site, 2: The name of the Group.
    351369#: includes/bpgsites-groups.php:260
     370#, php-format
    352371msgid "Your group is no longer reading \"%1$s\" with %2$s"
    353372msgstr ""
     
    355374#. translators: 1: The name of the invited group.
    356375#: includes/bpgsites-groups.php:474
     376#, php-format
    357377msgid "You are receiving this message because you are an administrator of the group \"%1$s\""
    358378msgstr ""
     
    360380#. translators: 2: The singular name for Group Sites, 3: The name of the site, 4: The name of the inviting group, 5: The plural name for Group Sites.
    361381#: includes/bpgsites-groups.php:476
     382#, php-format
    362383msgid "Your group has been invited to read the %2$s \"%3$s\" with the group \"%4$s\". To accept or decline the invitation, click the link below to visit the %5$s admin page for your group."
    363384msgstr ""
     
    365386#. translators: 1: The blog name, 2: The name of the inviting group.
    366387#: includes/bpgsites-groups.php:494
     388#, php-format
    367389msgid "An invitation to read \"%1$s\" with the group \"%2$s\""
    368390msgstr ""
     
    378400#. translators: 1: The name of the blog, 2: The name of the inviting group.
    379401#: includes/bpgsites-groups.php:819
     402#, php-format
    380403msgid "Read \"%1$s\" with \"%2$s\""
    381404msgstr ""
     
    424447#: includes/bpgsites-widgets.php:31
    425448#: includes/bpgsites-widgets.php:140
     449#, php-format
    426450msgid "List of %s"
    427451msgstr ""
     
    429453#. translators: %s: The plural name of Group Sites.
    430454#: includes/bpgsites-widgets.php:39
     455#, php-format
    431456msgid "Use this widget to show a list of %s."
    432457msgstr ""
  • bp-group-sites/trunk/readme.txt

    r3173019 r3454946  
    44Tags: buddypress, groups, sites, reading groups
    55Requires at least: 4.9
    6 Tested up to: 6.6
    7 Stable tag: 0.3.3
     6Tested up to: 6.9
     7Stable tag: 0.4.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    4646
    4747== Changelog ==
     48
     49= 0.4.0 =
     50
     51* Fixes the "Filter Comments by Group" filter
    4852
    4953= 0.3.3 =
Note: See TracChangeset for help on using the changeset viewer.