Plugin Directory

Changeset 3163389


Ignore:
Timestamp:
10/06/2024 07:18:58 AM (17 months ago)
Author:
mxp
Message:

update 3.2.2

Location:
mxp-dev-tools
Files:
4 edited
8 copied

Legend:

Unmodified
Added
Removed
  • mxp-dev-tools/tags/3.2.2/mxp-login-path.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.2.2/mxp-site-manager.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939class MDTSiteManager {
    4040    public $plugin_slug = 'mdt-site-manager';
    41     public static $VERSION = '3.2.1';
     41    public static $VERSION = '3.2.2';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/tags/3.2.2/mxp-snippets.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    178178// 前端給留言機器人看的字串
    179179if (!defined("COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT")) {
    180     define('COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT', 'FUCK YOU BOTS.');
     180    define('COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT', 'FUCK OFF SPAM! If you are not a comment bot, please find a way to contact the site administrator. 如果你不是留言機器人,請想辦法聯繫網站管理員。');
    181181}
    182182
     
    400400        }
    401401    }
     402
    402403    public function comment_form_frontend_hack($post_id) {
    403         echo "
    404         <script>
     404        echo "<script>
    405405        document.addEventListener('DOMContentLoaded', function() {
    406           let commentPostIDField = document.getElementById('comment_post_ID');
    407           if (commentPostIDField) {
    408             let currentValue = commentPostIDField.value;
    409             commentPostIDField.value = currentValue + '|mxp_tw';
    410           }
     406          document.body.addEventListener('click', function(event) {
     407                        let commentPostIDFields = document.querySelectorAll('input[type=\"hidden\"][name=\"comment_post_ID\"]');
     408                        commentPostIDFields.forEach(function(field) {
     409                            if (field.value.indexOf('|mxp_tw') === -1){
     410                                field.setAttribute('value', field.value + '|mxp_tw');
     411                                console.log('Updated value:', field.value);
     412                            }
     413                        });
     414                    });
    411415        });
    412416        </script>";
  • mxp-dev-tools/tags/3.2.2/readme.txt

    r3162623 r3163389  
    66Requires PHP: 5.6
    77Tested up to: 6.6
    8 Stable tag: 3.2.1
     8Stable tag: 3.2.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7777
    7878== Changelog ==
     79
     80= 3.2.2 =
     81
     82* 修正留言防堵機器人的前端功能
    7983
    8084= 3.2.1 =
  • mxp-dev-tools/trunk/mxp-login-path.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/mxp-site-manager.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939class MDTSiteManager {
    4040    public $plugin_slug = 'mdt-site-manager';
    41     public static $VERSION = '3.2.1';
     41    public static $VERSION = '3.2.2';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/trunk/mxp-snippets.php

    r3162623 r3163389  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.6
    9  * Stable tag: 3.2.1
    10  * Version: 3.2.1
     9 * Stable tag: 3.2.2
     10 * Version: 3.2.2
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    178178// 前端給留言機器人看的字串
    179179if (!defined("COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT")) {
    180     define('COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT', 'FUCK YOU BOTS.');
     180    define('COMMENT_SPAM_FUCKOFF_DISPLAY_TEXT', 'FUCK OFF SPAM! If you are not a comment bot, please find a way to contact the site administrator. 如果你不是留言機器人,請想辦法聯繫網站管理員。');
    181181}
    182182
     
    400400        }
    401401    }
     402
    402403    public function comment_form_frontend_hack($post_id) {
    403         echo "
    404         <script>
     404        echo "<script>
    405405        document.addEventListener('DOMContentLoaded', function() {
    406           let commentPostIDField = document.getElementById('comment_post_ID');
    407           if (commentPostIDField) {
    408             let currentValue = commentPostIDField.value;
    409             commentPostIDField.value = currentValue + '|mxp_tw';
    410           }
     406          document.body.addEventListener('click', function(event) {
     407                        let commentPostIDFields = document.querySelectorAll('input[type=\"hidden\"][name=\"comment_post_ID\"]');
     408                        commentPostIDFields.forEach(function(field) {
     409                            if (field.value.indexOf('|mxp_tw') === -1){
     410                                field.setAttribute('value', field.value + '|mxp_tw');
     411                                console.log('Updated value:', field.value);
     412                            }
     413                        });
     414                    });
    411415        });
    412416        </script>";
  • mxp-dev-tools/trunk/readme.txt

    r3162623 r3163389  
    66Requires PHP: 5.6
    77Tested up to: 6.6
    8 Stable tag: 3.2.1
     8Stable tag: 3.2.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7777
    7878== Changelog ==
     79
     80= 3.2.2 =
     81
     82* 修正留言防堵機器人的前端功能
    7983
    8084= 3.2.1 =
Note: See TracChangeset for help on using the changeset viewer.