Plugin Directory

Changeset 2831413


Ignore:
Timestamp:
12/10/2022 12:55:51 AM (3 years ago)
Author:
happyprime
Message:

Update to version 1.2.0 from GitHub

Location:
turn-comments-off
Files:
44 added
26 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • turn-comments-off/tags/1.2.0/.git/FETCH_HEAD

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672        '41387465da40b079f85565778bd37fb005d91672' of https://github.com/happyprime/turn-comments-off
     17aff1a44750d71241ba634f07f53ae3c229e6f82        '7aff1a44750d71241ba634f07f53ae3c229e6f82' of https://github.com/happyprime/turn-comments-off
  • turn-comments-off/tags/1.2.0/.git/HEAD

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672
     17aff1a44750d71241ba634f07f53ae3c229e6f82
  • turn-comments-off/tags/1.2.0/.git/config

    r2747176 r2831413  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2hDZXpQOFdHajdvWUZrd3RtenY3NmgyeHVCQkJXQTRKR3BNVA==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX1ZobGVzOFloMjM2MGlxSmJMOWl2RmpZaFU3T1ByajRKRkx1MQ==
  • turn-comments-off/tags/1.2.0/.git/hooks/fsmonitor-watchman.sample

    r2706000 r2831413  
    8787    # output to file names only. Then we're using the "expression" term to
    8888    # further constrain the results.
     89    my $last_update_line = "";
    8990    if (substr($last_update_token, 0, 1) eq "c") {
    9091        $last_update_token = "\"$last_update_token\"";
     92        $last_update_line = qq[\n"since": $last_update_token,];
    9193    }
    9294    my $query = <<" END";
    93         ["query", "$git_work_tree", {
    94             "since": $last_update_token,
     95        ["query", "$git_work_tree", {$last_update_line
    9596            "fields": ["name"],
    9697            "expression": ["not", ["dirname", ".git"]]
  • turn-comments-off/tags/1.2.0/.git/logs/HEAD

    r2747176 r2831413  
    1 0000000000000000000000000000000000000000 41387465da40b079f85565778bd37fb005d91672 runner <runner@fv-az39-923.k1oyn45vu3de5gjdjdp3nrnp3b.cx.internal.cloudapp.net> 1656000008 +0000  checkout: moving from master to refs/tags/1.1.1
     10000000000000000000000000000000000000000 7aff1a44750d71241ba634f07f53ae3c229e6f82 runner <runner@fv-az203-956.ruvxqjmswdaexpdv5kjf3tcyhb.jx.internal.cloudapp.net> 1670633716 +0000 checkout: moving from master to refs/tags/1.2.0
  • turn-comments-off/tags/1.2.0/.git/shallow

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672
     17aff1a44750d71241ba634f07f53ae3c229e6f82
  • turn-comments-off/tags/1.2.0/build/index.asset.php

    r2747164 r2831413  
    1 <?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready'), 'version' => '2856a872f0fe58be7167');
     1<?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready'), 'version' => '105d3c0577a1f1b9d0cf');
  • turn-comments-off/tags/1.2.0/build/index.js

    r2747164 r2831413  
    1 (()=>{"use strict";var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,r=window.wp.domReady;e.n(r)()((()=>{(0,o.unregisterBlockType)("core/latest-comments"),(0,o.unregisterBlockType)("core/comments-query-loop"),(0,o.unregisterBlockType)("core/post-comments-form"),(0,o.unregisterBlockType)("core/comment-author-name"),(0,o.unregisterBlockType)("core/comment-content"),(0,o.unregisterBlockType)("core/comment-date"),(0,o.unregisterBlockType)("core/comment-edit-link"),(0,o.unregisterBlockType)("core/comment-reply-link"),(0,o.unregisterBlockType)("core/comment-template"),(0,o.unregisterBlockType)("core/comments-pagination"),(0,o.unregisterBlockType)("core/comments-pagination-next"),(0,o.unregisterBlockType)("core/comments-pagination-numbers"),(0,o.unregisterBlockType)("core/comments-pagination-previous"),(0,o.unregisterBlockType)("core/comments-title"),(0,o.unregisterBlockType)("core/post-comments-count"),(0,o.unregisterBlockType)("core/post-comments-link")}))})();
     1(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var c in t)e.o(t,c)&&!e.o(o,c)&&Object.defineProperty(o,c,{enumerable:!0,get:t[c]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.domReady;e.n(t)()((()=>{["core/comments","core/comments-query-loop","core/comment-author-avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/comments-pagination","core/comments-pagination-next","core/comments-pagination-numbers","core/comments-pagination-previous","core/comments-title","core/latest-comments","core/post-comment","core/post-comments-count","core/post-comments-form","core/post-comments-link"].forEach((e=>{void 0!==(0,o.getBlockType)(e)&&(0,o.unregisterBlockType)(e)}))}))})();
  • turn-comments-off/tags/1.2.0/plugin.php

    r2747176 r2831413  
    33 * Plugin Name:  Turn Comments Off
    44 * Description:  Turn comments off everywhere in WordPress.
    5  * Version:      1.1.1
     5 * Version:      1.2.0
    66 * Plugin URI:   https://github.com/happyprime/turn-comments-off/
    77 * Author:       Happy Prime
     
    111111 */
    112112function unregister_comment_blocks() {
    113     unregister_block_type( 'core/comment-author-name' );
    114     unregister_block_type( 'core/comment-content' );
    115     unregister_block_type( 'core/comment-date' );
    116     unregister_block_type( 'core/comment-edit-link' );
    117     unregister_block_type( 'core/comment-reply-link' );
    118     unregister_block_type( 'core/comment-template' );
    119     unregister_block_type( 'core/comments-pagination' );
    120     unregister_block_type( 'core/comments-pagination-next' );
    121     unregister_block_type( 'core/comments-pagination-numbers' );
    122     unregister_block_type( 'core/comments-pagination-previous' );
    123     unregister_block_type( 'core/comments-query-loop' );
    124     unregister_block_type( 'core/comments-title' );
    125     unregister_block_type( 'core/latest-comments' );
    126     unregister_block_type( 'core/post-comments-form' );
    127     unregister_block_type( 'core/post-comments-count' ); // Gutenberg only.
    128     unregister_block_type( 'core/post-comments-link' ); // Gutenberg only.
     113
     114    // Retrieve all registered blocks.
     115    $registered_blocks = \WP_Block_Type_Registry::get_instance()->get_all_registered();
     116
     117    $blocks = [
     118        'core/comments',
     119        'core/comments-query-loop', // Replaced by core/comments in Gutenberg 13.7.
     120
     121        'core/comment-author-avatar',
     122        'core/comment-author-name',
     123        'core/comment-content',
     124        'core/comment-date',
     125        'core/comment-edit-link',
     126        'core/comment-reply-link',
     127        'core/comment-template',
     128
     129        'core/comments-pagination',
     130        'core/comments-pagination-next',
     131        'core/comments-pagination-numbers',
     132        'core/comments-pagination-previous',
     133        'core/comments-title',
     134
     135        'core/latest-comments',
     136
     137        'core/post-comment',
     138        'core/post-comments-count',
     139        'core/post-comments-form',
     140        'core/post-comments-link',
     141    ];
     142
     143    foreach ( $blocks as $block ) {
     144        if ( isset( $registered_blocks[ $block ] ) ) {
     145            unregister_block_type( $block );
     146        }
     147    }
    129148}
    130149
     
    134153 */
    135154function remove_comments_menu_page() {
    136     remove_menu_page('edit-comments.php');
     155    remove_menu_page( 'edit-comments.php' );
    137156    remove_submenu_page( 'options-general.php', 'options-discussion.php' );
    138157}
  • turn-comments-off/tags/1.2.0/readme.txt

    r2747176 r2831413  
    33Tags: comments
    44Requires at least: 5.9
    5 Tested up to: 6.0
    6 Stable tag: 1.1.1
     5Tested up to: 6.1
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88Requires PHP: 5.6
     
    2828## Changelog
    2929
     30### 1.2.0
     31
     32* Update the list of blocks unregistered to include latest from Gutenberg and WordPress.
     33* Update `wordpress/scripts` to 24.6.0.
     34* Refactor how the list of blocks is managed to make future maintenance easier. Props [@huubl](https://profiles.wordpress.org/huubl/).
     35* Only unregister blocks that are registered. Props [@huubl](https://profiles.wordpress.org/huubl/).
     36
    3037### 1.1.1
    3138
  • turn-comments-off/tags/1.2.0/src/index.js

    r2747164 r2831413  
    1 import { unregisterBlockType } from '@wordpress/blocks';
     1import { getBlockType, unregisterBlockType } from '@wordpress/blocks';
    22import domReady from '@wordpress/dom-ready';
    33
    44// Unregister comment-related blocks provided by WordPress core.
    5 domReady(() => {
    6     // Blocks that will usually show as available on posts and pages.
    7     unregisterBlockType('core/latest-comments');
    8     unregisterBlockType('core/comments-query-loop');
    9     unregisterBlockType('core/post-comments-form');
     5domReady( () => {
     6    const blocks = [
     7        'core/comments',
     8        'core/comments-query-loop', // Replaced by core/comments in Gutenberg 13.7.
    109
    11     // Blocks used inside the comments query loop block.
    12     unregisterBlockType('core/comment-author-name');
    13     unregisterBlockType('core/comment-content');
    14     unregisterBlockType('core/comment-date');
    15     unregisterBlockType('core/comment-edit-link');
    16     unregisterBlockType('core/comment-reply-link');
    17     unregisterBlockType('core/comment-template');
    18     unregisterBlockType('core/comments-pagination');
    19     unregisterBlockType('core/comments-pagination-next');
    20     unregisterBlockType('core/comments-pagination-numbers');
    21     unregisterBlockType('core/comments-pagination-previous');
    22     unregisterBlockType('core/comments-title');
    23     unregisterBlockType('core/post-comments-count');
    24     unregisterBlockType('core/post-comments-link');
    25 });
     10        'core/comment-author-avatar',
     11        'core/comment-author-name',
     12        'core/comment-content',
     13        'core/comment-date',
     14        'core/comment-edit-link',
     15        'core/comment-reply-link',
     16        'core/comment-template',
     17
     18        'core/comments-pagination',
     19        'core/comments-pagination-next',
     20        'core/comments-pagination-numbers',
     21        'core/comments-pagination-previous',
     22        'core/comments-title',
     23
     24        'core/latest-comments',
     25
     26        'core/post-comment',
     27        'core/post-comments-count',
     28        'core/post-comments-form',
     29        'core/post-comments-link',
     30    ];
     31
     32    blocks.forEach( ( block ) => {
     33        if ( undefined !== getBlockType( block ) ) {
     34            unregisterBlockType( block );
     35        }
     36    } );
     37} );
  • turn-comments-off/trunk/.git/FETCH_HEAD

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672        '41387465da40b079f85565778bd37fb005d91672' of https://github.com/happyprime/turn-comments-off
     17aff1a44750d71241ba634f07f53ae3c229e6f82        '7aff1a44750d71241ba634f07f53ae3c229e6f82' of https://github.com/happyprime/turn-comments-off
  • turn-comments-off/trunk/.git/HEAD

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672
     17aff1a44750d71241ba634f07f53ae3c229e6f82
  • turn-comments-off/trunk/.git/config

    r2747176 r2831413  
    1010    auto = 0
    1111[http "https://github.com/"]
    12     extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX2hDZXpQOFdHajdvWUZrd3RtenY3NmgyeHVCQkJXQTRKR3BNVA==
     12    extraheader = AUTHORIZATION: basic eC1hY2Nlc3MtdG9rZW46Z2hzX1ZobGVzOFloMjM2MGlxSmJMOWl2RmpZaFU3T1ByajRKRkx1MQ==
  • turn-comments-off/trunk/.git/hooks/fsmonitor-watchman.sample

    r2706000 r2831413  
    8787    # output to file names only. Then we're using the "expression" term to
    8888    # further constrain the results.
     89    my $last_update_line = "";
    8990    if (substr($last_update_token, 0, 1) eq "c") {
    9091        $last_update_token = "\"$last_update_token\"";
     92        $last_update_line = qq[\n"since": $last_update_token,];
    9193    }
    9294    my $query = <<" END";
    93         ["query", "$git_work_tree", {
    94             "since": $last_update_token,
     95        ["query", "$git_work_tree", {$last_update_line
    9596            "fields": ["name"],
    9697            "expression": ["not", ["dirname", ".git"]]
  • turn-comments-off/trunk/.git/logs/HEAD

    r2747176 r2831413  
    1 0000000000000000000000000000000000000000 41387465da40b079f85565778bd37fb005d91672 runner <runner@fv-az39-923.k1oyn45vu3de5gjdjdp3nrnp3b.cx.internal.cloudapp.net> 1656000008 +0000  checkout: moving from master to refs/tags/1.1.1
     10000000000000000000000000000000000000000 7aff1a44750d71241ba634f07f53ae3c229e6f82 runner <runner@fv-az203-956.ruvxqjmswdaexpdv5kjf3tcyhb.jx.internal.cloudapp.net> 1670633716 +0000 checkout: moving from master to refs/tags/1.2.0
  • turn-comments-off/trunk/.git/shallow

    r2747176 r2831413  
    1 41387465da40b079f85565778bd37fb005d91672
     17aff1a44750d71241ba634f07f53ae3c229e6f82
  • turn-comments-off/trunk/build/index.asset.php

    r2747164 r2831413  
    1 <?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready'), 'version' => '2856a872f0fe58be7167');
     1<?php return array('dependencies' => array('wp-blocks', 'wp-dom-ready'), 'version' => '105d3c0577a1f1b9d0cf');
  • turn-comments-off/trunk/build/index.js

    r2747164 r2831413  
    1 (()=>{"use strict";var e={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return e.d(r,{a:r}),r},d:(o,r)=>{for(var t in r)e.o(r,t)&&!e.o(o,t)&&Object.defineProperty(o,t,{enumerable:!0,get:r[t]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,r=window.wp.domReady;e.n(r)()((()=>{(0,o.unregisterBlockType)("core/latest-comments"),(0,o.unregisterBlockType)("core/comments-query-loop"),(0,o.unregisterBlockType)("core/post-comments-form"),(0,o.unregisterBlockType)("core/comment-author-name"),(0,o.unregisterBlockType)("core/comment-content"),(0,o.unregisterBlockType)("core/comment-date"),(0,o.unregisterBlockType)("core/comment-edit-link"),(0,o.unregisterBlockType)("core/comment-reply-link"),(0,o.unregisterBlockType)("core/comment-template"),(0,o.unregisterBlockType)("core/comments-pagination"),(0,o.unregisterBlockType)("core/comments-pagination-next"),(0,o.unregisterBlockType)("core/comments-pagination-numbers"),(0,o.unregisterBlockType)("core/comments-pagination-previous"),(0,o.unregisterBlockType)("core/comments-title"),(0,o.unregisterBlockType)("core/post-comments-count"),(0,o.unregisterBlockType)("core/post-comments-link")}))})();
     1(()=>{"use strict";var e={n:o=>{var t=o&&o.__esModule?()=>o.default:()=>o;return e.d(t,{a:t}),t},d:(o,t)=>{for(var c in t)e.o(t,c)&&!e.o(o,c)&&Object.defineProperty(o,c,{enumerable:!0,get:t[c]})},o:(e,o)=>Object.prototype.hasOwnProperty.call(e,o)};const o=window.wp.blocks,t=window.wp.domReady;e.n(t)()((()=>{["core/comments","core/comments-query-loop","core/comment-author-avatar","core/comment-author-name","core/comment-content","core/comment-date","core/comment-edit-link","core/comment-reply-link","core/comment-template","core/comments-pagination","core/comments-pagination-next","core/comments-pagination-numbers","core/comments-pagination-previous","core/comments-title","core/latest-comments","core/post-comment","core/post-comments-count","core/post-comments-form","core/post-comments-link"].forEach((e=>{void 0!==(0,o.getBlockType)(e)&&(0,o.unregisterBlockType)(e)}))}))})();
  • turn-comments-off/trunk/plugin.php

    r2747176 r2831413  
    33 * Plugin Name:  Turn Comments Off
    44 * Description:  Turn comments off everywhere in WordPress.
    5  * Version:      1.1.1
     5 * Version:      1.2.0
    66 * Plugin URI:   https://github.com/happyprime/turn-comments-off/
    77 * Author:       Happy Prime
     
    111111 */
    112112function unregister_comment_blocks() {
    113     unregister_block_type( 'core/comment-author-name' );
    114     unregister_block_type( 'core/comment-content' );
    115     unregister_block_type( 'core/comment-date' );
    116     unregister_block_type( 'core/comment-edit-link' );
    117     unregister_block_type( 'core/comment-reply-link' );
    118     unregister_block_type( 'core/comment-template' );
    119     unregister_block_type( 'core/comments-pagination' );
    120     unregister_block_type( 'core/comments-pagination-next' );
    121     unregister_block_type( 'core/comments-pagination-numbers' );
    122     unregister_block_type( 'core/comments-pagination-previous' );
    123     unregister_block_type( 'core/comments-query-loop' );
    124     unregister_block_type( 'core/comments-title' );
    125     unregister_block_type( 'core/latest-comments' );
    126     unregister_block_type( 'core/post-comments-form' );
    127     unregister_block_type( 'core/post-comments-count' ); // Gutenberg only.
    128     unregister_block_type( 'core/post-comments-link' ); // Gutenberg only.
     113
     114    // Retrieve all registered blocks.
     115    $registered_blocks = \WP_Block_Type_Registry::get_instance()->get_all_registered();
     116
     117    $blocks = [
     118        'core/comments',
     119        'core/comments-query-loop', // Replaced by core/comments in Gutenberg 13.7.
     120
     121        'core/comment-author-avatar',
     122        'core/comment-author-name',
     123        'core/comment-content',
     124        'core/comment-date',
     125        'core/comment-edit-link',
     126        'core/comment-reply-link',
     127        'core/comment-template',
     128
     129        'core/comments-pagination',
     130        'core/comments-pagination-next',
     131        'core/comments-pagination-numbers',
     132        'core/comments-pagination-previous',
     133        'core/comments-title',
     134
     135        'core/latest-comments',
     136
     137        'core/post-comment',
     138        'core/post-comments-count',
     139        'core/post-comments-form',
     140        'core/post-comments-link',
     141    ];
     142
     143    foreach ( $blocks as $block ) {
     144        if ( isset( $registered_blocks[ $block ] ) ) {
     145            unregister_block_type( $block );
     146        }
     147    }
    129148}
    130149
     
    134153 */
    135154function remove_comments_menu_page() {
    136     remove_menu_page('edit-comments.php');
     155    remove_menu_page( 'edit-comments.php' );
    137156    remove_submenu_page( 'options-general.php', 'options-discussion.php' );
    138157}
  • turn-comments-off/trunk/readme.txt

    r2747176 r2831413  
    33Tags: comments
    44Requires at least: 5.9
    5 Tested up to: 6.0
    6 Stable tag: 1.1.1
     5Tested up to: 6.1
     6Stable tag: 1.2.0
    77License: GPLv2 or later
    88Requires PHP: 5.6
     
    2828## Changelog
    2929
     30### 1.2.0
     31
     32* Update the list of blocks unregistered to include latest from Gutenberg and WordPress.
     33* Update `wordpress/scripts` to 24.6.0.
     34* Refactor how the list of blocks is managed to make future maintenance easier. Props [@huubl](https://profiles.wordpress.org/huubl/).
     35* Only unregister blocks that are registered. Props [@huubl](https://profiles.wordpress.org/huubl/).
     36
    3037### 1.1.1
    3138
  • turn-comments-off/trunk/src/index.js

    r2747164 r2831413  
    1 import { unregisterBlockType } from '@wordpress/blocks';
     1import { getBlockType, unregisterBlockType } from '@wordpress/blocks';
    22import domReady from '@wordpress/dom-ready';
    33
    44// Unregister comment-related blocks provided by WordPress core.
    5 domReady(() => {
    6     // Blocks that will usually show as available on posts and pages.
    7     unregisterBlockType('core/latest-comments');
    8     unregisterBlockType('core/comments-query-loop');
    9     unregisterBlockType('core/post-comments-form');
     5domReady( () => {
     6    const blocks = [
     7        'core/comments',
     8        'core/comments-query-loop', // Replaced by core/comments in Gutenberg 13.7.
    109
    11     // Blocks used inside the comments query loop block.
    12     unregisterBlockType('core/comment-author-name');
    13     unregisterBlockType('core/comment-content');
    14     unregisterBlockType('core/comment-date');
    15     unregisterBlockType('core/comment-edit-link');
    16     unregisterBlockType('core/comment-reply-link');
    17     unregisterBlockType('core/comment-template');
    18     unregisterBlockType('core/comments-pagination');
    19     unregisterBlockType('core/comments-pagination-next');
    20     unregisterBlockType('core/comments-pagination-numbers');
    21     unregisterBlockType('core/comments-pagination-previous');
    22     unregisterBlockType('core/comments-title');
    23     unregisterBlockType('core/post-comments-count');
    24     unregisterBlockType('core/post-comments-link');
    25 });
     10        'core/comment-author-avatar',
     11        'core/comment-author-name',
     12        'core/comment-content',
     13        'core/comment-date',
     14        'core/comment-edit-link',
     15        'core/comment-reply-link',
     16        'core/comment-template',
     17
     18        'core/comments-pagination',
     19        'core/comments-pagination-next',
     20        'core/comments-pagination-numbers',
     21        'core/comments-pagination-previous',
     22        'core/comments-title',
     23
     24        'core/latest-comments',
     25
     26        'core/post-comment',
     27        'core/post-comments-count',
     28        'core/post-comments-form',
     29        'core/post-comments-link',
     30    ];
     31
     32    blocks.forEach( ( block ) => {
     33        if ( undefined !== getBlockType( block ) ) {
     34            unregisterBlockType( block );
     35        }
     36    } );
     37} );
Note: See TracChangeset for help on using the changeset viewer.