{"id":146818,"date":"2021-09-06T08:08:06","date_gmt":"2021-09-06T08:08:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/remove-capslock\/"},"modified":"2021-09-10T12:08:21","modified_gmt":"2021-09-10T12:08:21","slug":"remove-capslock","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/remove-capslock\/","author":15006385,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.1.0","stable_tag":"0.1.0","tested":"5.8.13","requires":"3.0","requires_php":"5.6","requires_plugins":"","header_name":"Remove CapsLock","header_author":"Erik","header_description":"REMOVE UPPERCASE TEXT FROM TITLE CONTENT AND COMMENTS (without any change to database).","assets_banners_color":"","last_updated":"2021-09-10 12:08:21","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/codekraft.it\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":887,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":{"0.1.0":{"tag":"0.1.0","author":"codekraft","date":"2021-09-10 12:08:21"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1.0"],"block_files":[],"assets_screenshots":[],"screenshots":{"1":"the plugin options (1\/3)","2":"the plugin options (2\/3)","3":"the plugin options (3\/3)"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[17211,31110,749,31109],"plugin_category":[],"plugin_contributors":[133085],"plugin_business_model":[],"class_list":["post-146818","plugin","type-plugin","status-publish","hentry","plugin_tags-capslock","plugin_tags-lowercase","plugin_tags-text","plugin_tags-uppercase","plugin_contributors-codekraft","plugin_committers-codekraft"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/remove-capslock.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This plugin automatically filters titles, content and comments, searching and normalizing uppercase text.\nYou can customize the minimum amount of consecutive characters for each type of content (title, content, comments) before trigger the normalization function on that string.\nThis plugin is intended to change on-the-fly what is displayed without affecting what is stored in the wordpress database! If you want to change permanently the website content\/titles you need to modify posts.\nPlease before install, be sure there isn't any CSS rule that force uppercase otherwise the font case will be css driven and this plugin consequently useless. Check the troubleshooting section for guidance on this if the plugin seems not to work.<\/p>\n\n<h3>Setup<\/h3>\n\n<p>After installation, the plugin automatically displays normalised texts. So the title, post content, widget titles and comments will be filtered and normalised by default.\nYou can customize\/add\/remove filters adding to functions.php the name of the hook and the number of allowed consecutive uppercase characters.<\/p>\n\n<p>1) To <strong>create your own set<\/strong> of hook+rule<\/p>\n\n<pre><code>add_action( 'init', function() {\n    add_filter( 'rcl_hook_filters', function () { return array(\n        array( 'hook' =&gt; 'the_title', 'allowed_chars' =&gt; 6 ), \/\/ title\n        array( 'hook' =&gt; 'comment_text', 'allowed_chars' =&gt; 5 ), \/\/ comments\n        array( 'hook' =&gt; 'widget_title', 'allowed_chars' =&gt; 6 ), \/\/ widget\n        );\n    } );\n} );\n<\/code><\/pre>\n\n<p>2) To <strong>edit a single filter<\/strong> value (it doesn't create any new filter, only change an already created one). In order to disable a filter, while continue to use the rest of the standard set, you need to set \"-1\" as value (example below).<\/p>\n\n<pre><code>add_filter( 'rcl_the_title', function () { return 60; } );\nadd_filter( 'rcl_comment_text', function () { return 3; } );\nadd_filter( 'rcl_widget_title', function () { return -1; } ); \/\/ disabled\n<\/code><\/pre>\n\n<p>One last note, since the main post\/page content has a different content type (isn't a string) <strong>you need to set the filter for the post content as below<\/strong>.<\/p>\n\n<pre><code>add_filter( 'rcl_the_content', function () { return 10; } );\n\/\/ OR to disable the content filter\n\/\/ add_filter( 'rcl_the_content', function () { return -1; } );\n<\/code><\/pre>\n\n<p>If you need to change the default setup and enable uppercase text correction ONLY for comments, you need to add to functions.php the filter as below:<\/p>\n\n<pre><code>\/\/ functions.php\nadd_filter( 'rcl_the_content', function () { return -1; } ); \/\/ disabled\nadd_action( 'init', function() {\n    add_filter( 'rcl_hook_filters', function () { return array(\n        array( 'hook' =&gt; 'comment_text', 'allowed_chars' =&gt; 5 ), \/\/ 2 or more uppercase digits triggers the text normalization\n        );\n    } );\n} );\n<\/code><\/pre>\n\n<h3>Troubleshooting<\/h3>\n\n<p>This plugin is not intended to change the css style of your website, because you can do this easily with customizer and without any plugin.\nSo before installing this plugin I suggest you try to reset the style of the title\/content\/widget, using the property <code>text-transform: inherit !important;<\/code><\/p>\n\n<h3>copyright<\/h3>\n\n<p>Remove CapsLock, Copyright 2021 Codekraft Studio\nRemove CapsLock is distributed under the terms of the GNU GPL<\/p>\n\n<p>This program is free software: you can redistribute it and\/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.<\/p>\n\n<p>This program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\nSee the LICENSE file for more details.<\/p>\n\n<!--section=changelog-->\n<h4>0.1.0<\/h4>\n\n<ul>\n<li>add filters to provide some plugin customizations<\/li>\n<\/ul>\n\n<h4>0.0.1<\/h4>\n\n<ul>\n<li>just for a joke I made this plugin but it might be useful to you too<\/li>\n<\/ul>","raw_excerpt":"NORMALIZE ICKY UPPERCASE TEXT IN TITLES, CONTENT AND COMMENTS (without any change to your database).","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/146818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=146818"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/codekraft"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=146818"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=146818"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=146818"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=146818"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=146818"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=146818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}