Plugin Directory

Changeset 2295896


Ignore:
Timestamp:
05/01/2020 07:02:39 AM (6 years ago)
Author:
solarissmoke
Message:

Version 1.10.2

Location:
disable-comments/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • disable-comments/trunk/disable-comments.php

    r2126229 r2295896  
    11<?php
    2 /*
    3 Plugin Name: Disable Comments
    4 Plugin URI: https://wordpress.org/plugins/disable-comments/
    5 Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type.
    6 Version: 1.10.2
    7 Author: Samir Shah
    8 Author URI: http://www.rayofsolaris.net/
    9 License: GPL2
    10 Text Domain: disable-comments
    11 Domain Path: /languages/
    12 */
     2/**
     3 * Plugin Name: Disable Comments
     4 * Plugin URI: https://wordpress.org/plugins/disable-comments/
     5 * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type.
     6 * Version: 1.10.2
     7 * Author: Samir Shah
     8 * Author URI: http://www.rayofsolaris.net/
     9 * License: GPL2
     10 * Text Domain: disable-comments
     11 * Domain Path: /languages/
     12 *
     13 * @package Disable_Comments
     14 */
    1315
    1416if ( ! defined( 'ABSPATH' ) ) {
     
    3436        $this->networkactive = ( is_multisite() && array_key_exists( plugin_basename( __FILE__ ), (array) get_site_option( 'active_sitewide_plugins' ) ) );
    3537
    36         // Load options
     38        // Load options.
    3739        if ( $this->networkactive ) {
    3840            $this->options = get_site_option( 'disable_comments_options', array() );
     
    4143        }
    4244
    43         // If it looks like first run, check compat
     45        // If it looks like first run, check compat.
    4446        if ( empty( $this->options ) ) {
    4547            $this->check_compatibility();
    4648        }
    4749
    48         // Upgrade DB if necessary
     50        // Upgrade DB if necessary.
    4951        $this->check_db_upgrades();
    5052
     
    6668        if ( $old_ver < self::DB_VERSION ) {
    6769            if ( $old_ver < 2 ) {
    68                 // upgrade options from version 0.2.1 or earlier to 0.3
     70                // upgrade options from version 0.2.1 or earlier to 0.3.
    6971                $this->options['disabled_post_types'] = get_option( 'disable_comments_post_types', array() );
    7072                delete_option( 'disable_comments_post_types' );
    7173            }
    7274            if ( $old_ver < 5 ) {
    73                 // simple is beautiful - remove multiple settings in favour of one
     75                // simple is beautiful - remove multiple settings in favour of one.
    7476                $this->options['remove_everywhere'] = isset( $this->options['remove_admin_menu_comments'] ) ? $this->options['remove_admin_menu_comments'] : false;
    7577                foreach ( array( 'remove_admin_menu_comments', 'remove_admin_bar_comments', 'remove_recent_comments', 'remove_discussion', 'remove_rc_widget' ) as $v ) {
     
    9799    }
    98100
    99     /*
     101    /**
    100102     * Get an array of disabled post type.
    101103     */
    102104    private function get_disabled_post_types() {
    103105        $types = $this->options['disabled_post_types'];
    104         // Not all extra_post_types might be registered on this particular site
     106        // Not all extra_post_types might be registered on this particular site.
    105107        if ( $this->networkactive ) {
    106108            foreach ( (array) $this->options['extra_post_types'] as $extra ) {
     
    113115    }
    114116
    115     /*
     117    /**
    116118     * Check whether comments have been disabled on a given post type.
    117119     */
     
    121123
    122124    private function init_filters() {
    123         // These need to happen now
     125        // These need to happen now.
    124126        if ( $this->options['remove_everywhere'] ) {
    125127            add_action( 'widgets_init', array( $this, 'disable_rc_widget' ) );
    126128            add_filter( 'wp_headers', array( $this, 'filter_wp_headers' ) );
    127             add_action( 'template_redirect', array( $this, 'filter_query' ), 9 );   // before redirect_canonical
    128 
    129             // Admin bar filtering has to happen here since WP 3.6
     129            add_action( 'template_redirect', array( $this, 'filter_query' ), 9 );   // before redirect_canonical.
     130
     131            // Admin bar filtering has to happen here since WP 3.6.
    130132            add_action( 'template_redirect', array( $this, 'filter_admin_bar' ) );
    131133            add_action( 'admin_init', array( $this, 'filter_admin_bar' ) );
    132         }
    133 
    134         // These can happen later
     134
     135            // Disable Comments REST API Endpoint
     136            add_filter( 'rest_endpoints', array( $this, 'filter_rest_endpoints' ) );
     137        }
     138
     139        // These can happen later.
    135140        add_action( 'plugins_loaded', array( $this, 'register_text_domain' ) );
    136141        add_action( 'wp_loaded', array( $this, 'init_wploaded_filters' ) );
    137 
    138         // Disable "Latest comments" block in Gutenberg
     142        // Disable "Latest comments" block in Gutenberg.
    139143        add_action( 'enqueue_block_editor_assets', array( $this, 'filter_gutenberg_blocks') );
    140144    }
     
    148152        if ( ! empty( $disabled_post_types ) ) {
    149153            foreach ( $disabled_post_types as $type ) {
    150                 // we need to know what native support was for later
     154                // we need to know what native support was for later.
    151155                if ( post_type_supports( $type, 'comments' ) ) {
    152156                    $this->modified_types[] = $type;
     
    160164            add_filter( 'get_comments_number', array( $this, 'filter_comments_number' ), 20, 2 );
    161165        } elseif ( is_admin() && ! $this->options['remove_everywhere'] ) {
    162             // It is possible that $disabled_post_types is empty if other
    163             // plugins have disabled comments. Hence we also check for
    164             // remove_everywhere. If you still get a warning you probably
    165             // shouldn't be using this plugin.
     166            /**
     167             * It is possible that $disabled_post_types is empty if other
     168             * plugins have disabled comments. Hence we also check for
     169             * remove_everywhere. If you still get a warning you probably
     170             * shouldn't be using this plugin.
     171             */
    166172            add_action( 'all_admin_notices', array( $this, 'setup_notice' ) );
    167173        }
    168174
    169         // Filters for the admin only
     175        // Filters for the admin only.
    170176        if ( is_admin() ) {
    171177            if ( $this->networkactive ) {
     
    186192
    187193            if ( $this->options['remove_everywhere'] ) {
    188                 add_action( 'admin_menu', array( $this, 'filter_admin_menu' ), 9999 );  // do this as late as possible
     194                add_action( 'admin_menu', array( $this, 'filter_admin_menu' ), 9999 );  // do this as late as possible.
    189195                add_action( 'admin_print_styles-index.php', array( $this, 'admin_css' ) );
    190196                add_action( 'admin_print_styles-profile.php', array( $this, 'admin_css' ) );
     
    193199            }
    194200        }
    195         // Filters for front end only
     201        // Filters for front end only.
    196202        else {
    197203            add_action( 'template_redirect', array( $this, 'check_comment_template' ) );
     
    203209    }
    204210
    205     /*
     211    /**
    206212     * Replace the theme's comment template with a blank one.
    207213     * To prevent this, define DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE
     
    214220                add_filter( 'comments_template', array( $this, 'dummy_comments_template' ), 20 );
    215221            }
    216             // Remove comment-reply script for themes that include it indiscriminately
     222            // Remove comment-reply script for themes that include it indiscriminately.
    217223            wp_deregister_script( 'comment-reply' );
    218             // feed_links_extra inserts a comments RSS link
     224            // feed_links_extra inserts a comments RSS link.
    219225            remove_action( 'wp_head', 'feed_links_extra', 3 );
    220226        }
     
    226232
    227233
    228     /*
     234    /**
    229235     * Remove the X-Pingback HTTP header
    230236     */
     
    234240    }
    235241
    236     /*
     242    /**
    237243     * Issue a 403 for all comment feed requests.
    238244     */
    239245    public function filter_query() {
    240246        if ( is_comment_feed() ) {
    241             wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );
    242         }
    243     }
    244 
    245     /*
     247            wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) );
     248        }
     249    }
     250
     251    /**
    246252     * Remove comment links from the admin bar.
    247253     */
    248254    public function filter_admin_bar() {
    249255        if ( is_admin_bar_showing() ) {
    250             // Remove comments links from admin bar
     256            // Remove comments links from admin bar.
    251257            remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
    252258            if ( is_multisite() ) {
     
    257263
    258264    /**
     265     * Remove the comments endpoint for the REST API
     266     */
     267    public function filter_rest_endpoints( $endpoints ) {
     268        unset( $endpoints['comments'] );
     269        return $endpoints;
     270    }
     271
     272    /**
    259273     * Determines if scripts should be enqueued
    260274     */
     
    272286    public function disable_comments_script() {
    273287        wp_enqueue_script( 'disable-comments-gutenberg', plugin_dir_url( __FILE__ ) . 'assets/disable-comments.js', array(), false, true );
    274         wp_localize_script(
    275             'disable-comments-gutenberg',
    276             'disable_comments',
    277             array(
    278                 'disabled_blocks' => array( 'core/latest-comments' ),
    279             )
    280         );
    281     }
    282 
    283     /*
     288    }
     289
     290    /**
    284291     * Remove comment links from the admin bar in a multisite network.
    285292     */
     
    290297            }
    291298        } else {
    292             // We have no way to know whether the plugin is active on other sites, so only remove this one
     299            // We have no way to know whether the plugin is active on other sites, so only remove this one.
    293300            $wp_admin_bar->remove_menu( 'blog-' . get_current_blog_id() . '-c' );
    294301        }
     
    303310            }
    304311
    305             echo '<div class="notice notice-warning"><p>' . sprintf( __( 'Note: The <em>Disable Comments</em> plugin is currently active, and comments are completely disabled on: %s. Many of the settings below will not be applicable for those post types.', 'disable-comments' ), implode( __( ', ' ), $names ) ) . '</p></div>';
     312            echo '<div class="notice notice-warning"><p>' . sprintf( __( 'Note: The <em>Disable Comments</em> plugin is currently active, and comments are completely disabled on: %s. Many of the settings below will not be applicable for those post types.', 'disable-comments' ), implode( __( ', ', 'disable-comments' ), $names ) ) . '</p></div>';
    306313        }
    307314    }
     
    337344
    338345        if ( $pagenow == 'comment.php' || $pagenow == 'edit-comments.php' ) {
    339             wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );
     346            wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) );
    340347        }
    341348
     
    344351        if ( ! $this->discussion_settings_allowed() ) {
    345352            if ( $pagenow == 'options-discussion.php' ) {
    346                 wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );
     353                wp_die( __( 'Comments are closed.', 'disable-comments' ), '', array( 'response' => 403 ) );
    347354            }
    348355
     
    384391    public function disable_rc_widget() {
    385392        unregister_widget( 'WP_Widget_Recent_Comments' );
    386         // The widget has added a style action when it was constructed - which will
    387         // still fire even if we now unregister the widget... so filter that out
     393        /**
     394         * The widget has added a style action when it was constructed - which will
     395         * still fire even if we now unregister the widget... so filter that out
     396         */
    388397        add_filter( 'show_recent_comments_widget_style', '__return_false' );
    389398    }
     
    407416            array_unshift(
    408417                $links,
    409                 sprintf( '<a href="%s">%s</a>', esc_attr( $this->settings_page_url() ), __( 'Settings' ) ),
    410                 sprintf( '<a href="%s">%s</a>', esc_attr( $this->tools_page_url() ), __( 'Tools' ) )
     418                sprintf( '<a href="%s">%s</a>', esc_attr( $this->settings_page_url() ), __( 'Settings', 'disable-comments' ) ),
     419                sprintf( '<a href="%s">%s</a>', esc_attr( $this->tools_page_url() ), __( 'Tools', 'disable-comments' ) )
    411420            );
    412421        }
     
    448457
    449458    public function single_site_deactivate() {
    450         // for single sites, delete the options upon deactivation, not uninstall
     459        // for single sites, delete the options upon deactivation, not uninstall.
    451460        delete_option( 'disable_comments_options' );
    452461    }
  • disable-comments/trunk/includes/comments-template.php

    r2125992 r2295896  
    11<?php
    2 /*
    3  Dummy comments template file.
     2/**
     3 * Dummy comments template file.
    44 * This replaces the theme's comment template when comments are disabled everywhere
     5 *
     6 * @package Disable_Comments
    57 */
  • disable-comments/trunk/includes/settings-page.php

    r2125992 r2295896  
    11<?php
     2/**
     3 * Setting page.
     4 *
     5 * @package Disable_Comments
     6 */
     7
    28if ( ! defined( 'ABSPATH' ) ) {
    39    exit;
     
    612$typeargs = array( 'public' => true );
    713if ( $this->networkactive ) {
    8     $typeargs['_builtin'] = true;   // stick to known types for network
     14    $typeargs['_builtin'] = true;   // stick to known types for network.
    915}
    1016$types = get_post_types( $typeargs, 'objects' );
    1117foreach ( array_keys( $types ) as $type ) {
    12     if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) {   // the type doesn't support comments anyway
     18    if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) {   // the type doesn't support comments anyway.
    1319        unset( $types[ $type ] );
    1420    }
     
    2935    $this->options['disabled_post_types'] = $disabled_post_types;
    3036
    31     // Extra custom post types
     37    // Extra custom post types.
    3238    if ( $this->networkactive && ! empty( $_POST['extra_post_types'] ) ) {
    3339        $extra_post_types                  = array_filter( array_map( 'sanitize_key', explode( ',', $_POST['extra_post_types'] ) ) );
    34         $this->options['extra_post_types'] = array_diff( $extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins
     40        $this->options['extra_post_types'] = array_diff( $extra_post_types, array_keys( $types ) ); // Make sure we don't double up builtins.
    3541    }
    3642
    3743    $this->update_options();
    38     $cache_message = WP_CACHE ? ' <strong>' . __( 'If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately.' ) . '</strong>' : '';
     44    $cache_message = WP_CACHE ? ' <strong>' . __( 'If a caching/performance plugin is active, please invalidate its cache to ensure that changes are reflected immediately.', 'disable-comments' ) . '</strong>' : '';
    3945    echo '<div id="message" class="updated"><p>' . __( 'Options updated. Changes to the Admin Menu and Admin Bar will not appear until you leave or reload this page.', 'disable-comments' ) . $cache_message . '</p></div>';
    4046}
  • disable-comments/trunk/includes/tools-page.php

    r2125992 r2295896  
    11<?php
     2/**
     3 * Tools page.
     4 *
     5 * @package Disable_Comments
     6 */
     7
    28if ( ! defined( 'ABSPATH' ) ) {
    39    exit;
     
    2026$typeargs = array( 'public' => true );
    2127if ( $this->networkactive ) {
    22     $typeargs['_builtin'] = true;   // stick to known types for network
     28    $typeargs['_builtin'] = true;   // stick to known types for network.
    2329}
    2430$types = get_post_types( $typeargs, 'objects' );
    2531foreach ( array_keys( $types ) as $type ) {
    26     if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) {   // the type doesn't support comments anyway
     32    if ( ! in_array( $type, $this->modified_types ) && ! post_type_supports( $type, 'comments' ) ) {   // the type doesn't support comments anyway.
    2733        unset( $types[ $type ] );
    2834    }
     
    4955        $delete_post_types = array_intersect( $delete_post_types, array_keys( $types ) );
    5056
    51         // Extra custom post types
     57        // Extra custom post types.
    5258        if ( $this->networkactive && ! empty( $_POST['delete_extra_post_types'] ) ) {
    5359            $delete_extra_post_types = array_filter( array_map( 'sanitize_key', explode( ',', $_POST['delete_extra_post_types'] ) ) );
    54             $delete_extra_post_types = array_diff( $delete_extra_post_types, array_keys( $types ) );    // Make sure we don't double up builtins
     60            $delete_extra_post_types = array_diff( $delete_extra_post_types, array_keys( $types ) );    // Make sure we don't double up builtins.
    5561            $delete_post_types       = array_merge( $delete_post_types, $delete_extra_post_types );
    5662        }
    5763
    5864        if ( ! empty( $delete_post_types ) ) {
    59             // Loop through post_types and remove comments/meta and set posts comment_count to 0
     65            // Loop through post_types and remove comments/meta and set posts comment_count to 0.
    6066            foreach ( $delete_post_types as $delete_post_type ) {
    6167                $wpdb->query( "DELETE cmeta FROM $wpdb->commentmeta cmeta INNER JOIN $wpdb->comments comments ON cmeta.comment_id=comments.comment_ID INNER JOIN $wpdb->posts posts ON comments.comment_post_ID=posts.ID WHERE posts.post_type = '$delete_post_type'" );
  • disable-comments/trunk/languages/disable-comments.pot

    r1693104 r2295896  
    1 # Copyright (C) 2017 Disable Comments
    2 # This file is distributed under the same license as the Disable Comments package.
    3 msgid ""
    4 msgstr ""
    5 "Project-Id-Version: Disable Comments 1.6\n"
     1# Copyright (C) 2020 Samir Shah
     2# This file is distributed under the GPL2.
     3msgid ""
     4msgstr ""
     5"Project-Id-Version: Disable Comments 1.10.2\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
    7 "POT-Creation-Date: 2017-07-08 03:05:14+00:00\n"
     7"POT-Creation-Date: 2020-05-01 06:45:42+00:00\n"
    88"MIME-Version: 1.0\n"
    9 "Content-Type: text/plain; charset=UTF-8\n"
     9"Content-Type: text/plain; charset=utf-8\n"
    1010"Content-Transfer-Encoding: 8bit\n"
    11 "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
     11"PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n"
    1212"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    1313"Language-Team: LANGUAGE <[email protected]>\n"
    14 
    15 #: disable-comments.php:59
     14"Language: en\n"
     15"Plural-Forms: nplurals=2; plural=(n != 1);\n"
     16"X-Poedit-Country: United States\n"
     17"X-Poedit-SourceCharset: UTF-8\n"
     18"X-Poedit-KeywordsList: "
     19"__;_e;_x:1,2c;_ex:1,2c;_n:1,2;_nx:1,2,4c;_n_noop:1,2;_nx_noop:1,2,3c;esc_"
     20"attr__;esc_html__;esc_attr_e;esc_html_e;esc_attr_x:1,2c;esc_html_x:1,2c;\n"
     21"X-Poedit-Basepath: ../\n"
     22"X-Poedit-SearchPath-0: .\n"
     23"X-Poedit-Bookmarks: \n"
     24"X-Textdomain-Support: yes\n"
     25"X-Generator: grunt-wp-i18n 1.0.3\n"
     26
     27#: disable-comments.php:61
    1628msgid "Disable Comments requires WordPress version %s or greater."
    1729msgstr ""
    1830
    19 #: disable-comments.php:240 disable-comments.php:325
     31#: disable-comments.php:247 disable-comments.php:346 disable-comments.php:353
    2032msgid "Comments are closed."
    2133msgstr ""
    2234
    23 #: disable-comments.php:289
    24 msgid ""
    25 "Note: The <em>Disable Comments</em> plugin is currently active, and comments "
    26 "are completely disabled on: %s. Many of the settings below will not be "
    27 "applicable for those post types."
    28 msgstr ""
    29 
    30 #: disable-comments.php:289
     35#: disable-comments.php:312
     36msgid ""
     37"Note: The <em>Disable Comments</em> plugin is currently active, and "
     38"comments are completely disabled on: %s. Many of the settings below will "
     39"not be applicable for those post types."
     40msgstr ""
     41
     42#: disable-comments.php:312
    3143msgid ", "
    3244msgstr ""
    3345
    34 #: disable-comments.php:317
     46#: disable-comments.php:338
    3547msgid ""
    3648"The <em>Disable Comments</em> plugin is active, but isn't configured to do "
     
    3951msgstr ""
    4052
    41 #: disable-comments.php:382
     53#: disable-comments.php:418
    4254msgid "Settings"
    4355msgstr ""
    4456
    45 #: disable-comments.php:383
     57#: disable-comments.php:419
    4658msgid "Tools"
    4759msgstr ""
    4860
    49 #: disable-comments.php:391
    50 msgctxt "settings menu title"
    51 msgid "Disable Comments"
    52 msgstr ""
    53 
    54 #: disable-comments.php:403 includes/tools-page.php:7
    55 #: includes/tools-page.php:103
     61#: disable-comments.php:440 includes/tools-page.php:13
     62#: includes/tools-page.php:116
    5663msgid "Delete Comments"
    5764msgstr ""
    5865
    59 #: includes/settings-page.php:43
     66#: includes/settings-page.php:44
    6067msgid ""
    6168"If a caching/performance plugin is active, please invalidate its cache to "
     
    6370msgstr ""
    6471
    65 #: includes/settings-page.php:44
     72#: includes/settings-page.php:45
    6673msgid ""
    6774"Options updated. Changes to the Admin Menu and Admin Bar will not appear "
     
    6976msgstr ""
    7077
    71 #. #-#-#-#-#  disable-comments.pot (Disable Comments 1.6)  #-#-#-#-#
    72 #. Plugin Name of the plugin/theme
    73 #: includes/settings-page.php:49
    74 msgid "Disable Comments"
    75 msgstr ""
    76 
    77 #: includes/settings-page.php:52
     78#: includes/settings-page.php:53
    7879msgid ""
    7980"<em>Disable Comments</em> is Network Activated. The settings below will "
     
    8182msgstr ""
    8283
    83 #: includes/settings-page.php:54
     84#: includes/settings-page.php:56
    8485msgid ""
    8586"It seems that a caching/performance plugin is active on this site. Please "
     
    8889msgstr ""
    8990
    90 #: includes/settings-page.php:58 includes/tools-page.php:85
     91#: includes/settings-page.php:61 includes/tools-page.php:95
    9192msgid "Everywhere"
    9293msgstr ""
    9394
    94 #: includes/settings-page.php:58
     95#: includes/settings-page.php:61
    9596msgid "Disable all comment-related controls and settings in WordPress."
    9697msgstr ""
    9798
    98 #: includes/settings-page.php:59
    99 msgid ""
    100 "%s: This option is global and will affect your entire site. Use it only if "
    101 "you want to disable comments <em>everywhere</em>. A complete description of "
    102 "what this option does is <a href=\"%s\" target=\"_blank\">available here</a>."
    103 msgstr ""
    104 
    105 #: includes/settings-page.php:59 includes/settings-page.php:80
    106 #: includes/settings-page.php:82 includes/settings-page.php:110
    107 #: includes/tools-page.php:86 includes/tools-page.php:97
     99#: includes/settings-page.php:62
     100msgid ""
     101"%1$s: This option is global and will affect your entire site. Use it only "
     102"if you want to disable comments <em>everywhere</em>. A complete description "
     103"of what this option does is <a href=\"%2$s\" target=\"_blank\">available "
     104"here</a>."
     105msgstr ""
     106
     107#: includes/settings-page.php:62 includes/tools-page.php:96
     108#: includes/tools-page.php:110
    108109msgid "Warning"
    109110msgstr ""
    110111
    111 #: includes/settings-page.php:61
     112#: includes/settings-page.php:64
    112113msgid "On certain post types"
    113114msgstr ""
    114115
    115 #: includes/settings-page.php:67 includes/tools-page.php:94
     116#: includes/settings-page.php:73 includes/tools-page.php:107
    116117msgid ""
    117118"Only the built-in post types appear above. If you want to disable comments "
    118 "on other custom post types on the entire network, you can supply a comma-"
    119 "separated list of post types below (use the slug that identifies the post "
    120 "type)."
    121 msgstr ""
    122 
    123 #: includes/settings-page.php:68 includes/tools-page.php:95
     119"on other custom post types on the entire network, you can supply a "
     120"comma-separated list of post types below (use the slug that identifies the "
     121"post type)."
     122msgstr ""
     123
     124#: includes/settings-page.php:74 includes/tools-page.php:108
    124125msgid "Custom post types:"
    125126msgstr ""
    126127
    127 #: includes/settings-page.php:70
    128 msgid ""
    129 "Disabling comments will also disable trackbacks and pingbacks. All comment-"
    130 "related fields will also be hidden from the edit/quick-edit screens of the "
    131 "affected posts. These settings cannot be overridden for individual posts."
    132 msgstr ""
    133 
    134 #: includes/settings-page.php:75
    135 msgid "Other options"
    136 msgstr ""
    137 
    138 #: includes/settings-page.php:79
    139 msgid "Use persistent mode"
    140 msgstr ""
    141 
    142 #: includes/settings-page.php:80
    143 msgid ""
    144 "%s: <strong>This will make persistent changes to your database &mdash; "
    145 "comments will remain closed even if you later disable the plugin!</strong> "
    146 "You should not use it if you only want to disable comments temporarily. "
    147 "Please <a href=\"%s\" target=\"_blank\">read the FAQ</a> before selecting "
    148 "this option."
    149 msgstr ""
    150 
    151 #: includes/settings-page.php:82
    152 msgid ""
    153 "%s: Entering persistent mode on large multi-site networks requires a large "
    154 "number of database queries and can take a while. Use with caution!"
    155 msgstr ""
    156 
    157 #: includes/settings-page.php:89
     128#: includes/settings-page.php:76
     129msgid ""
     130"Disabling comments will also disable trackbacks and pingbacks. All "
     131"comment-related fields will also be hidden from the edit/quick-edit screens "
     132"of the affected posts. These settings cannot be overridden for individual "
     133"posts."
     134msgstr ""
     135
     136#: includes/settings-page.php:81
    158137msgid "Save Changes"
    159138msgstr ""
    160139
    161 #: includes/settings-page.php:110
    162 msgid ""
    163 "%s: Selecting this option will make persistent changes to your database. Are "
    164 "you sure you want to enable it?"
    165 msgstr ""
    166 
    167 #: includes/tools-page.php:13 includes/tools-page.php:75
     140#: includes/tools-page.php:20 includes/tools-page.php:86
    168141msgid "No comments available for deletion."
    169142msgstr ""
    170143
    171 #: includes/tools-page.php:38
     144#: includes/tools-page.php:46
    172145msgid "All comments have been deleted."
    173146msgstr ""
    174147
    175 #: includes/tools-page.php:40 includes/tools-page.php:43
     148#: includes/tools-page.php:48 includes/tools-page.php:51
    176149msgid "Internal error occured. Please try again later."
    177150msgstr ""
    178151
    179 #: includes/tools-page.php:62
    180 msgid "All comments have been deleted for %ss."
    181 msgstr ""
    182 
    183 #: includes/tools-page.php:68
     152#: includes/tools-page.php:73
     153msgid "All comments have been deleted for %s."
     154msgstr ""
     155
     156#: includes/tools-page.php:79
    184157msgid "Comment Deletion Complete"
    185158msgstr ""
    186159
    187 #: includes/tools-page.php:85
     160#: includes/tools-page.php:95
    188161msgid "Delete all comments in WordPress."
    189162msgstr ""
    190163
    191 #: includes/tools-page.php:86
     164#: includes/tools-page.php:96
    192165msgid ""
    193166"%s: This function and will affect your entire site. Use it only if you want "
     
    195168msgstr ""
    196169
    197 #: includes/tools-page.php:88
     170#: includes/tools-page.php:98
    198171msgid "For certain post types"
    199172msgstr ""
    200173
    201 #: includes/tools-page.php:97
     174#: includes/tools-page.php:110
    202175msgid ""
    203176"%s: Deleting comments will remove existing comment entries in the database "
     
    205178msgstr ""
    206179
    207 #: includes/tools-page.php:102
     180#: includes/tools-page.php:115
    208181msgid "Total Comments:"
     182msgstr ""
     183
     184#. Plugin Name of the plugin/theme
     185msgid "Disable Comments"
    209186msgstr ""
    210187
     
    226203msgid "http://www.rayofsolaris.net/"
    227204msgstr ""
     205
     206#: disable-comments.php:427
     207msgctxt "settings menu title"
     208msgid "Disable Comments"
     209msgstr ""
     210
     211#: includes/settings-page.php:50
     212msgctxt "settings page title"
     213msgid "Disable Comments"
     214msgstr ""
  • disable-comments/trunk/readme.txt

    r2125992 r2295896  
    44Tags: comments, disable, global
    55Requires at least: 5.0
    6 Tested up to: 5.3
     6Tested up to: 5.4
    77Stable tag: trunk
    88
  • disable-comments/trunk/uninstall.php

    r2125992 r2295896  
    11<?php
     2/**
     3 * Uninstall script
     4 *
     5 * @package Disable_Comments
     6 */
     7
    28if ( ! defined( 'ABSPATH' ) && ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
    39    exit;
Note: See TracChangeset for help on using the changeset viewer.