Plugin Directory

Changeset 3173645


Ignore:
Timestamp:
10/22/2024 12:35:34 PM (17 months ago)
Author:
mikinc860
Message:

tested upto WordPress 6.6.2

Location:
disable-comments-entire
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • disable-comments-entire/trunk/class-disable-entire-comment.php

    r3016762 r3173645  
    77        private static $instance = null;
    88
     9        /**
     10         * Initializes the plugin by setting up constants and actions/filters to disable comments.
     11         *
     12         * @since 1.0
     13         * @uses DECMC_constants
     14         * @uses DECMC_init
     15         * @return void
     16         */
    917        public function __construct() {
    1018            $this->DECMC_constants();
     
    1321
    1422       
     23        /**
     24         * Set constants
     25         *
     26         * If not defined, set 'DECMC_ADMIN_BAR_PLUGIN_URL' to the URL of the plugin directory.
     27         *
     28         * @since 1.0
     29         * @uses plugins_url
     30         * @uses __FILE__
     31         * @uses trailingslashit
     32         * @return void
     33         */
    1534        public function DECMC_constants(){
    1635            if (!defined('DECMC_ADMIN_BAR_PLUGIN_URL')) {
     
    1938        }
    2039
     40        /**
     41         * Initialize the plugin by setting up actions and filters to disable comments.
     42         *
     43         * - Redirects users attempting to access the comments page.
     44         * - Disables comments and pings on the front-end.
     45         * - Hides all existing comments.
     46         * - Removes the comments page from the dashboard menu.
     47         * - Removes comments links from the dashboard admin bar.
     48         * - Filters media comment status to be closed.
     49         * - Loads the plugin text domain for translations.
     50         *
     51         * @since 1.0
     52         */
    2153        public function DECMC_init(){
    2254            // Redirect all user trying to access comments page
     
    4779        }
    4880
     81
    4982        /**
    50          * Disabling access
     83         * Redirects users from the comments page to the admin dashboard.
     84         *
     85         * - Checks if the current page is 'edit-comments.php' and redirects to the admin dashboard if true.
     86         * - Removes the recent comments metabox from the dashboard.
     87         * - Disables support for trackbacks and comments for all post types that support comments.
     88         *
     89         * @since 1.0
    5190         */
    5291        public function DECMC_redirect_on_comment_page_access() {
     
    71110        }
    72111
     112        /**
     113         * Filters the media comment status.
     114         *
     115         * Checks if the post type is 'attachment' and returns false to disable comments.
     116         *
     117         * @param bool $open Whether the comments are open for the post.
     118         * @param int $post_id The ID of the post.
     119         * @return bool The updated comment status.
     120         */
    73121        public function DECMC_filter_media_comment_status( $open, $post_id ) {
    74122            $post = get_post( $post_id );
     
    79127        }
    80128
     129        /**
     130         * Loads the plugin text domain for translations.
     131         *
     132         * @since 1.0
     133         */
    81134        public function DECMC_load_text_domain() {
    82135            load_plugin_textdomain( $this->textdomain , false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     
    88141         */
    89142
     143        /**
     144         * Returns the instance of the class, creating it if it doesn't exist yet.
     145         *
     146         * @since 1.0
     147         * @return DECMC_disable
     148         */
    90149        public static function DECMC_instance()
    91150        {
  • disable-comments-entire/trunk/disable-entire-comment.php

    r3016766 r3173645  
    44 * Plugin URI:  https://wordpress.org/plugins/search/disable-comments-entire/
    55 * Description: This plugin enables you to deactivate all comment-related features across your entire website. No additional settings or extra code are required—simply activate the plugin.
    6  * Version:     1.0
     6 * Version:     1.1
    77 * Requires at least: 5.2
    88 * Requires PHP:      5.6
  • disable-comments-entire/trunk/readme.txt

    r3016766 r3173645  
    33Tags: disable comments, disable media comments, disable entire comments, disable full comments, no more comments
    44Requires at least: 5.2
    5 Tested up to: 6.4.2
    6 Stable tag: 1.0
     5Tested up to: 6.6.2
     6Stable tag: 1.1
    77Requires PHP: 8.0
    88License: GPLv3 or later
     
    2525== Changelog ==
    2626
     27= 1.1 =
     28Tested up to WordPress 6.6.2
     29
    2730= 1.0 =
    2831Plugin created!
Note: See TracChangeset for help on using the changeset viewer.