Plugin Directory

Changeset 3443037


Ignore:
Timestamp:
01/20/2026 08:14:14 AM (2 months ago)
Author:
wpdevteam
Message:

Update to version 2.6.2 from GitHub

Location:
disable-comments
Files:
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • disable-comments/tags/2.6.2/disable-comments.php

    r3407795 r3443037  
    55 * Plugin URI: https://wordpress.org/plugins/disable-comments/
    66 * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.
    7  * Version: 2.6.1
     7 * Version: 2.6.2
    88 * Author: WPDeveloper
    99 * Author URI: https://wpdeveloper.com
     
    3939
    4040    function __construct() {
    41         define('DC_VERSION', '2.6.1');
     41        define('DC_VERSION', '2.6.2');
    4242        define('DC_PLUGIN_SLUG', 'disable_comments_settings');
    4343        define('DC_PLUGIN_ROOT_PATH', dirname(__FILE__));
     
    641641                if ($comment_id) {
    642642                    $comment = get_comment($comment_id);
     643                    if ($comment && isset($comment->comment_type)) {
     644                        $comment_type = $comment->comment_type;
     645                    }
     646                }
     647            }
     648
     649            // For DELETE requests, extract comment ID from the route path
     650            // The comment ID is only in the URL (e.g., /wp/v2/comments/123), not in request params
     651            if (!$comment_type && $request->is_method('DELETE')) {
     652                $route_parts = explode('/', $request->get_route());
     653                $comment_id = end($route_parts);
     654
     655                // Ensure we have a numeric comment ID
     656                if (is_numeric($comment_id)) {
     657                    $comment = get_comment((int) $comment_id);
    643658                    if ($comment && isset($comment->comment_type)) {
    644659                        $comment_type = $comment->comment_type;
  • disable-comments/tags/2.6.2/languages/disable-comments.pot

    r3407795 r3443037  
    1 # Copyright (C) 2025 WPDeveloper
     1# Copyright (C) 2026 WPDeveloper
    22# This file is distributed under the GPL-3.0+.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Disable Comments 2.6.1\n"
     5"Project-Id-Version: Disable Comments 2.6.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
    7 "POT-Creation-Date: 2025-12-02 10:12:36+00:00\n"
     7"POT-Creation-Date: 2026-01-20 08:13:50+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2025-MO-DA HO:MI+ZONE\n"
     11"PO-Revision-Date: 2026-MO-DA HO:MI+ZONE\n"
    1212"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1313"Language-Team: LANGUAGE <LL@li.org>\n"
     
    6767msgstr ""
    6868
    69 #: disable-comments.php:663 disable-comments.php:861 disable-comments.php:869
     69#: disable-comments.php:678 disable-comments.php:876 disable-comments.php:884
    7070msgid "Comments are closed."
    7171msgstr ""
    7272
    73 #: disable-comments.php:717
     73#: disable-comments.php:732
    7474msgid "Comments are disabled."
    7575msgstr ""
    7676
    77 #: disable-comments.php:817
     77#: disable-comments.php:832
    7878#. translators: %s: disabled post types.
    7979msgid ""
     
    8383msgstr ""
    8484
    85 #: disable-comments.php:817
     85#: disable-comments.php:832
    8686msgid ", "
    8787msgstr ""
    8888
    89 #: disable-comments.php:850
     89#: disable-comments.php:865
    9090#. translators: %s: URL to Disabled Comment settings page.
    9191msgid ""
     
    9595msgstr ""
    9696
    97 #: disable-comments.php:988 views/partials/_disable.php:3
     97#: disable-comments.php:1003 views/partials/_disable.php:3
    9898msgid "Settings"
    9999msgstr ""
    100100
    101 #: disable-comments.php:989
     101#: disable-comments.php:1004
    102102msgid "Tools"
    103103msgstr ""
    104104
    105 #: disable-comments.php:1006 views/partials/_delete.php:9
     105#: disable-comments.php:1021 views/partials/_delete.php:9
    106106#: views/partials/_delete.php:218
    107107msgid "Delete Comments"
    108108msgstr ""
    109109
    110 #: disable-comments.php:1072
     110#: disable-comments.php:1087
    111111msgid "Default (no type)"
    112112msgstr ""
    113113
    114 #: disable-comments.php:1099 disable-comments.php:1730
     114#: disable-comments.php:1114 disable-comments.php:1745
    115115msgid "Logged out users"
    116116msgstr ""
    117117
    118 #: disable-comments.php:1295
     118#: disable-comments.php:1310
    119119msgid "Saved"
    120120msgstr ""
    121121
    122 #: disable-comments.php:1392 disable-comments.php:1447
    123 #: disable-comments.php:1474
     122#: disable-comments.php:1407 disable-comments.php:1462
     123#: disable-comments.php:1489
    124124msgid "All comments have been deleted"
    125125msgstr ""
    126126
    127 #: disable-comments.php:1511
     127#: disable-comments.php:1526
    128128msgid "All spam comments have been deleted."
    129129msgstr ""
    130130
    131 #: disable-comments.php:1797
     131#: disable-comments.php:1812
    132132msgid "Comments are disabled site-wide for all content types"
    133133msgstr ""
    134134
    135 #: disable-comments.php:1798
     135#: disable-comments.php:1813
    136136msgid "Comments are disabled only for blog posts"
    137137msgstr ""
    138138
    139 #: disable-comments.php:1799
     139#: disable-comments.php:1814
    140140msgid "Comments are disabled only for pages"
    141141msgstr ""
    142142
    143 #: disable-comments.php:1800
     143#: disable-comments.php:1815
    144144msgid "Comments are disabled for both posts and pages"
    145145msgstr ""
    146146
    147 #: disable-comments.php:1801
     147#: disable-comments.php:1816
    148148msgid "Comments are disabled for multiple specific content types"
    149149msgstr ""
    150150
    151 #: disable-comments.php:1802
     151#: disable-comments.php:1817
    152152msgid "Comments are enabled everywhere"
    153153msgstr ""
    154154
    155 #: disable-comments.php:1806
     155#: disable-comments.php:1821
    156156#. translators: %s: disabled post types.
    157157msgid "Comments are disabled for: %s"
    158158msgstr ""
    159159
    160 #: disable-comments.php:1813 disable-comments.php:1848
    161 #: disable-comments.php:1852 disable-comments.php:1868
     160#: disable-comments.php:1828 disable-comments.php:1863
     161#: disable-comments.php:1867 disable-comments.php:1883
    162162msgid "Enabled"
    163163msgstr ""
    164164
    165 #: disable-comments.php:1814 disable-comments.php:1848
    166 #: disable-comments.php:1852 disable-comments.php:1868
     165#: disable-comments.php:1829 disable-comments.php:1863
     166#: disable-comments.php:1867 disable-comments.php:1883
    167167msgid "Disabled"
    168168msgstr ""
    169169
    170 #: disable-comments.php:1815
     170#: disable-comments.php:1830
    171171msgid "Not applicable"
    172172msgstr ""
    173173
    174 #: disable-comments.php:1821
     174#: disable-comments.php:1836
    175175msgid "Comment Status"
    176176msgstr ""
    177177
    178 #: disable-comments.php:1825
     178#: disable-comments.php:1840
    179179msgid "Plugin Configured"
    180180msgstr ""
    181181
    182 #: disable-comments.php:1826 disable-comments.php:1834
    183 #: disable-comments.php:1856 disable-comments.php:1860
     182#: disable-comments.php:1841 disable-comments.php:1849
     183#: disable-comments.php:1871 disable-comments.php:1875
    184184msgid "Yes"
    185185msgstr ""
    186186
    187 #: disable-comments.php:1826 disable-comments.php:1834
    188 #: disable-comments.php:1856 disable-comments.php:1860
     187#: disable-comments.php:1841 disable-comments.php:1849
     188#: disable-comments.php:1871 disable-comments.php:1875
    189189msgid "No"
    190190msgstr ""
    191191
    192 #: disable-comments.php:1829
     192#: disable-comments.php:1844
    193193msgid "Total Comments"
    194194msgstr ""
    195195
    196 #: disable-comments.php:1833
     196#: disable-comments.php:1848
    197197msgid "Global Disable Active"
    198198msgstr ""
    199199
    200 #: disable-comments.php:1837
     200#: disable-comments.php:1852
    201201msgid "Disabled Post Types Count"
    202202msgstr ""
    203203
    204 #: disable-comments.php:1841
     204#: disable-comments.php:1856
    205205msgid "Disabled Post Types"
    206206msgstr ""
    207207
    208 #: disable-comments.php:1844 disable-comments.php:1874
     208#: disable-comments.php:1859 disable-comments.php:1889
    209209msgid "None"
    210210msgstr ""
    211211
    212 #: disable-comments.php:1847
     212#: disable-comments.php:1862
    213213msgid "XML-RPC Comments"
    214214msgstr ""
    215215
    216 #: disable-comments.php:1851
     216#: disable-comments.php:1866
    217217msgid "REST API Comments"
    218218msgstr ""
    219219
    220 #: disable-comments.php:1855 views/partials/_disable.php:190
     220#: disable-comments.php:1870 views/partials/_disable.php:190
    221221msgid "Show Existing Comments"
    222222msgstr ""
    223223
    224 #: disable-comments.php:1859
     224#: disable-comments.php:1874
    225225msgid "Network Active"
    226226msgstr ""
    227227
    228 #: disable-comments.php:1863
     228#: disable-comments.php:1878
    229229msgid "Site-wide Settings"
    230230msgstr ""
    231231
    232 #: disable-comments.php:1867
     232#: disable-comments.php:1882
    233233msgid "Role-based Exclusions"
    234234msgstr ""
    235235
    236 #: disable-comments.php:1871
     236#: disable-comments.php:1886
    237237msgid "Excluded Roles"
    238238msgstr ""
    239239
    240 #: disable-comments.php:1881
     240#: disable-comments.php:1896
    241241msgid "Complete overview of comment disable settings and configuration."
    242242msgstr ""
     
    810810msgstr ""
    811811
    812 #: disable-comments.php:997
     812#: disable-comments.php:1012
    813813msgctxt "settings menu title"
    814814msgid "Disable Comments"
  • disable-comments/tags/2.6.2/readme.txt

    r3407795 r3443037  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 2.6.1
     8Stable tag: 2.6.2
    99License: GPL-3.0-or-later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    193193This will be maintained from August 19, 2020 - @asif2bd
    194194
     195= [2.6.2] - 2026-01-20 =
     196* Fixed: An issue where deleting Notes in WordPress 6.9+ throws an error
     197
    195198= [2.6.1] - 2025-12-02 =
    196199* Compatible with WordPress 6.9
  • disable-comments/trunk/disable-comments.php

    r3407795 r3443037  
    55 * Plugin URI: https://wordpress.org/plugins/disable-comments/
    66 * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.
    7  * Version: 2.6.1
     7 * Version: 2.6.2
    88 * Author: WPDeveloper
    99 * Author URI: https://wpdeveloper.com
     
    3939
    4040    function __construct() {
    41         define('DC_VERSION', '2.6.1');
     41        define('DC_VERSION', '2.6.2');
    4242        define('DC_PLUGIN_SLUG', 'disable_comments_settings');
    4343        define('DC_PLUGIN_ROOT_PATH', dirname(__FILE__));
     
    641641                if ($comment_id) {
    642642                    $comment = get_comment($comment_id);
     643                    if ($comment && isset($comment->comment_type)) {
     644                        $comment_type = $comment->comment_type;
     645                    }
     646                }
     647            }
     648
     649            // For DELETE requests, extract comment ID from the route path
     650            // The comment ID is only in the URL (e.g., /wp/v2/comments/123), not in request params
     651            if (!$comment_type && $request->is_method('DELETE')) {
     652                $route_parts = explode('/', $request->get_route());
     653                $comment_id = end($route_parts);
     654
     655                // Ensure we have a numeric comment ID
     656                if (is_numeric($comment_id)) {
     657                    $comment = get_comment((int) $comment_id);
    643658                    if ($comment && isset($comment->comment_type)) {
    644659                        $comment_type = $comment->comment_type;
  • disable-comments/trunk/languages/disable-comments.pot

    r3407795 r3443037  
    1 # Copyright (C) 2025 WPDeveloper
     1# Copyright (C) 2026 WPDeveloper
    22# This file is distributed under the GPL-3.0+.
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Disable Comments 2.6.1\n"
     5"Project-Id-Version: Disable Comments 2.6.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
    7 "POT-Creation-Date: 2025-12-02 10:12:36+00:00\n"
     7"POT-Creation-Date: 2026-01-20 08:13:50+00:00\n"
    88"MIME-Version: 1.0\n"
    99"Content-Type: text/plain; charset=utf-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2025-MO-DA HO:MI+ZONE\n"
     11"PO-Revision-Date: 2026-MO-DA HO:MI+ZONE\n"
    1212"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1313"Language-Team: LANGUAGE <LL@li.org>\n"
     
    6767msgstr ""
    6868
    69 #: disable-comments.php:663 disable-comments.php:861 disable-comments.php:869
     69#: disable-comments.php:678 disable-comments.php:876 disable-comments.php:884
    7070msgid "Comments are closed."
    7171msgstr ""
    7272
    73 #: disable-comments.php:717
     73#: disable-comments.php:732
    7474msgid "Comments are disabled."
    7575msgstr ""
    7676
    77 #: disable-comments.php:817
     77#: disable-comments.php:832
    7878#. translators: %s: disabled post types.
    7979msgid ""
     
    8383msgstr ""
    8484
    85 #: disable-comments.php:817
     85#: disable-comments.php:832
    8686msgid ", "
    8787msgstr ""
    8888
    89 #: disable-comments.php:850
     89#: disable-comments.php:865
    9090#. translators: %s: URL to Disabled Comment settings page.
    9191msgid ""
     
    9595msgstr ""
    9696
    97 #: disable-comments.php:988 views/partials/_disable.php:3
     97#: disable-comments.php:1003 views/partials/_disable.php:3
    9898msgid "Settings"
    9999msgstr ""
    100100
    101 #: disable-comments.php:989
     101#: disable-comments.php:1004
    102102msgid "Tools"
    103103msgstr ""
    104104
    105 #: disable-comments.php:1006 views/partials/_delete.php:9
     105#: disable-comments.php:1021 views/partials/_delete.php:9
    106106#: views/partials/_delete.php:218
    107107msgid "Delete Comments"
    108108msgstr ""
    109109
    110 #: disable-comments.php:1072
     110#: disable-comments.php:1087
    111111msgid "Default (no type)"
    112112msgstr ""
    113113
    114 #: disable-comments.php:1099 disable-comments.php:1730
     114#: disable-comments.php:1114 disable-comments.php:1745
    115115msgid "Logged out users"
    116116msgstr ""
    117117
    118 #: disable-comments.php:1295
     118#: disable-comments.php:1310
    119119msgid "Saved"
    120120msgstr ""
    121121
    122 #: disable-comments.php:1392 disable-comments.php:1447
    123 #: disable-comments.php:1474
     122#: disable-comments.php:1407 disable-comments.php:1462
     123#: disable-comments.php:1489
    124124msgid "All comments have been deleted"
    125125msgstr ""
    126126
    127 #: disable-comments.php:1511
     127#: disable-comments.php:1526
    128128msgid "All spam comments have been deleted."
    129129msgstr ""
    130130
    131 #: disable-comments.php:1797
     131#: disable-comments.php:1812
    132132msgid "Comments are disabled site-wide for all content types"
    133133msgstr ""
    134134
    135 #: disable-comments.php:1798
     135#: disable-comments.php:1813
    136136msgid "Comments are disabled only for blog posts"
    137137msgstr ""
    138138
    139 #: disable-comments.php:1799
     139#: disable-comments.php:1814
    140140msgid "Comments are disabled only for pages"
    141141msgstr ""
    142142
    143 #: disable-comments.php:1800
     143#: disable-comments.php:1815
    144144msgid "Comments are disabled for both posts and pages"
    145145msgstr ""
    146146
    147 #: disable-comments.php:1801
     147#: disable-comments.php:1816
    148148msgid "Comments are disabled for multiple specific content types"
    149149msgstr ""
    150150
    151 #: disable-comments.php:1802
     151#: disable-comments.php:1817
    152152msgid "Comments are enabled everywhere"
    153153msgstr ""
    154154
    155 #: disable-comments.php:1806
     155#: disable-comments.php:1821
    156156#. translators: %s: disabled post types.
    157157msgid "Comments are disabled for: %s"
    158158msgstr ""
    159159
    160 #: disable-comments.php:1813 disable-comments.php:1848
    161 #: disable-comments.php:1852 disable-comments.php:1868
     160#: disable-comments.php:1828 disable-comments.php:1863
     161#: disable-comments.php:1867 disable-comments.php:1883
    162162msgid "Enabled"
    163163msgstr ""
    164164
    165 #: disable-comments.php:1814 disable-comments.php:1848
    166 #: disable-comments.php:1852 disable-comments.php:1868
     165#: disable-comments.php:1829 disable-comments.php:1863
     166#: disable-comments.php:1867 disable-comments.php:1883
    167167msgid "Disabled"
    168168msgstr ""
    169169
    170 #: disable-comments.php:1815
     170#: disable-comments.php:1830
    171171msgid "Not applicable"
    172172msgstr ""
    173173
    174 #: disable-comments.php:1821
     174#: disable-comments.php:1836
    175175msgid "Comment Status"
    176176msgstr ""
    177177
    178 #: disable-comments.php:1825
     178#: disable-comments.php:1840
    179179msgid "Plugin Configured"
    180180msgstr ""
    181181
    182 #: disable-comments.php:1826 disable-comments.php:1834
    183 #: disable-comments.php:1856 disable-comments.php:1860
     182#: disable-comments.php:1841 disable-comments.php:1849
     183#: disable-comments.php:1871 disable-comments.php:1875
    184184msgid "Yes"
    185185msgstr ""
    186186
    187 #: disable-comments.php:1826 disable-comments.php:1834
    188 #: disable-comments.php:1856 disable-comments.php:1860
     187#: disable-comments.php:1841 disable-comments.php:1849
     188#: disable-comments.php:1871 disable-comments.php:1875
    189189msgid "No"
    190190msgstr ""
    191191
    192 #: disable-comments.php:1829
     192#: disable-comments.php:1844
    193193msgid "Total Comments"
    194194msgstr ""
    195195
    196 #: disable-comments.php:1833
     196#: disable-comments.php:1848
    197197msgid "Global Disable Active"
    198198msgstr ""
    199199
    200 #: disable-comments.php:1837
     200#: disable-comments.php:1852
    201201msgid "Disabled Post Types Count"
    202202msgstr ""
    203203
    204 #: disable-comments.php:1841
     204#: disable-comments.php:1856
    205205msgid "Disabled Post Types"
    206206msgstr ""
    207207
    208 #: disable-comments.php:1844 disable-comments.php:1874
     208#: disable-comments.php:1859 disable-comments.php:1889
    209209msgid "None"
    210210msgstr ""
    211211
    212 #: disable-comments.php:1847
     212#: disable-comments.php:1862
    213213msgid "XML-RPC Comments"
    214214msgstr ""
    215215
    216 #: disable-comments.php:1851
     216#: disable-comments.php:1866
    217217msgid "REST API Comments"
    218218msgstr ""
    219219
    220 #: disable-comments.php:1855 views/partials/_disable.php:190
     220#: disable-comments.php:1870 views/partials/_disable.php:190
    221221msgid "Show Existing Comments"
    222222msgstr ""
    223223
    224 #: disable-comments.php:1859
     224#: disable-comments.php:1874
    225225msgid "Network Active"
    226226msgstr ""
    227227
    228 #: disable-comments.php:1863
     228#: disable-comments.php:1878
    229229msgid "Site-wide Settings"
    230230msgstr ""
    231231
    232 #: disable-comments.php:1867
     232#: disable-comments.php:1882
    233233msgid "Role-based Exclusions"
    234234msgstr ""
    235235
    236 #: disable-comments.php:1871
     236#: disable-comments.php:1886
    237237msgid "Excluded Roles"
    238238msgstr ""
    239239
    240 #: disable-comments.php:1881
     240#: disable-comments.php:1896
    241241msgid "Complete overview of comment disable settings and configuration."
    242242msgstr ""
     
    810810msgstr ""
    811811
    812 #: disable-comments.php:997
     812#: disable-comments.php:1012
    813813msgctxt "settings menu title"
    814814msgid "Disable Comments"
  • disable-comments/trunk/readme.txt

    r3407795 r3443037  
    66Tested up to: 6.9
    77Requires PHP: 5.6
    8 Stable tag: 2.6.1
     8Stable tag: 2.6.2
    99License: GPL-3.0-or-later
    1010License URI: https://www.gnu.org/licenses/gpl-3.0.html
     
    193193This will be maintained from August 19, 2020 - @asif2bd
    194194
     195= [2.6.2] - 2026-01-20 =
     196* Fixed: An issue where deleting Notes in WordPress 6.9+ throws an error
     197
    195198= [2.6.1] - 2025-12-02 =
    196199* Compatible with WordPress 6.9
Note: See TracChangeset for help on using the changeset viewer.