Plugin Directory

Changeset 3343687


Ignore:
Timestamp:
08/12/2025 04:14:55 PM (6 months ago)
Author:
mxp
Message:

update version

Location:
mxp-dev-tools
Files:
1 deleted
5 edited
6 copied

Legend:

Unmodified
Added
Removed
  • mxp-dev-tools/tags/3.3.7/index.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939    use SearchReplace;
    4040    use Utility;
    41     static $VERSION = '3.3.6';
     41    static $VERSION = '3.3.7';
    4242    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    4343    protected static $instance = null;
  • mxp-dev-tools/tags/3.3.7/mxp-login-path.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/tags/3.3.7/mxp-site-manager.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    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.3.6';
     41    public static $VERSION = '3.3.7';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/tags/3.3.7/mxp-snippets.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    253253if (!defined("MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED")) {
    254254    define('MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED', true);
     255}
     256// 預設上傳檔案大小限制,預設 1MB
     257if (!defined('MDT_UPLOAD_FILE_SIZE_LIMIT')) {
     258    define('MDT_UPLOAD_FILE_SIZE_LIMIT', 1024000);
    255259}
    256260class MDTSnippets {
     
    449453                add_filter('upload_mimes', array($this, 'mxp_upload_mimes'), 99999, 2);
    450454                /**
    451                  * 移除檔案大小限制
    452                  */
    453                 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);
    454                 /**
    455455                 * 覆寫 WordPress 的檔案類型檢查,保留真實 MIME
    456456                 */
     
    458458            }
    459459        }
     460        /**
     461         * 檔案大小限制設定
     462         */
     463        add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);
    460464        if (MDT_ENABLE_OVERWRITE_I18N_MO_FILE) {
    461465            add_filter('load_textdomain_mofile', array($this, 'load_custom_translation_mo_file'), 12, 2);
     
    13731377
    13741378    public function mxp_upload_size_limit($size, $u_bytes, $p_bytes) {
    1375         if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
    1376             return PHP_INT_MAX; // 幾乎無限制
    1377         }
    1378         return $size;
    1379     }
     1379        $u_bytes = wp_convert_hr_to_bytes(ini_get('upload_max_filesize'));
     1380        $p_bytes = wp_convert_hr_to_bytes(ini_get('post_max_size'));
     1381        if (defined('MDT_DISALLOW_FILE_MODS_ADMINS') && is_array(MDT_DISALLOW_FILE_MODS_ADMINS) && in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
     1382            return min($u_bytes, $p_bytes); // 跟進伺服器最大限制
     1383        }
     1384        // 其餘限制固定上傳大小
     1385        return MDT_UPLOAD_FILE_SIZE_LIMIT;
     1386    }
     1387
    13801388    public function mxp_wp_check_filetype_and_ext($data, $file, $filename, $mimes) {
    13811389        if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
  • mxp-dev-tools/tags/3.3.7/readme.txt

    r3343244 r3343687  
    66Requires PHP: 5.6
    77Tested up to: 6.8
    8 Stable tag: 3.3.6
     8Stable tag: 3.3.7
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878== Changelog ==
    7979
    80 = 3.3.6 =
    81 
    82 * 調整授權管理員的上傳為無限制
     80= 3.3.7 =
     81
     82* 調整授權管理員的上傳為無限制(伺服器最高上限),其他用戶預設 1 MB
    8383* 預設未指定授權管理員時指定為網站當前的管理員群
    8484
  • mxp-dev-tools/trunk/index.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    3939    use SearchReplace;
    4040    use Utility;
    41     static $VERSION = '3.3.6';
     41    static $VERSION = '3.3.7';
    4242    private $themeforest_api_base_url = 'https://api.envato.com/v3';
    4343    protected static $instance = null;
  • mxp-dev-tools/trunk/mxp-login-path.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
  • mxp-dev-tools/trunk/mxp-site-manager.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    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.3.6';
     41    public static $VERSION = '3.3.7';
    4242
    4343    public function __construct() {
  • mxp-dev-tools/trunk/mxp-snippets.php

    r3343244 r3343687  
    77 * Requires PHP: 5.6
    88 * Tested up to: 6.8
    9  * Stable tag: 3.3.6
    10  * Version: 3.3.6
     9 * Stable tag: 3.3.7
     10 * Version: 3.3.7
    1111 * Author: Chun
    1212 * Author URI: https://www.mxp.tw/contact/
     
    253253if (!defined("MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED")) {
    254254    define('MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED', true);
     255}
     256// 預設上傳檔案大小限制,預設 1MB
     257if (!defined('MDT_UPLOAD_FILE_SIZE_LIMIT')) {
     258    define('MDT_UPLOAD_FILE_SIZE_LIMIT', 1024000);
    255259}
    256260class MDTSnippets {
     
    449453                add_filter('upload_mimes', array($this, 'mxp_upload_mimes'), 99999, 2);
    450454                /**
    451                  * 移除檔案大小限制
    452                  */
    453                 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);
    454                 /**
    455455                 * 覆寫 WordPress 的檔案類型檢查,保留真實 MIME
    456456                 */
     
    458458            }
    459459        }
     460        /**
     461         * 檔案大小限制設定
     462         */
     463        add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);
    460464        if (MDT_ENABLE_OVERWRITE_I18N_MO_FILE) {
    461465            add_filter('load_textdomain_mofile', array($this, 'load_custom_translation_mo_file'), 12, 2);
     
    13731377
    13741378    public function mxp_upload_size_limit($size, $u_bytes, $p_bytes) {
    1375         if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
    1376             return PHP_INT_MAX; // 幾乎無限制
    1377         }
    1378         return $size;
    1379     }
     1379        $u_bytes = wp_convert_hr_to_bytes(ini_get('upload_max_filesize'));
     1380        $p_bytes = wp_convert_hr_to_bytes(ini_get('post_max_size'));
     1381        if (defined('MDT_DISALLOW_FILE_MODS_ADMINS') && is_array(MDT_DISALLOW_FILE_MODS_ADMINS) && in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
     1382            return min($u_bytes, $p_bytes); // 跟進伺服器最大限制
     1383        }
     1384        // 其餘限制固定上傳大小
     1385        return MDT_UPLOAD_FILE_SIZE_LIMIT;
     1386    }
     1387
    13801388    public function mxp_wp_check_filetype_and_ext($data, $file, $filename, $mimes) {
    13811389        if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) {
  • mxp-dev-tools/trunk/readme.txt

    r3343244 r3343687  
    66Requires PHP: 5.6
    77Tested up to: 6.8
    8 Stable tag: 3.3.6
     8Stable tag: 3.3.7
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    7878== Changelog ==
    7979
    80 = 3.3.6 =
    81 
    82 * 調整授權管理員的上傳為無限制
     80= 3.3.7 =
     81
     82* 調整授權管理員的上傳為無限制(伺服器最高上限),其他用戶預設 1 MB
    8383* 預設未指定授權管理員時指定為網站當前的管理員群
    8484
Note: See TracChangeset for help on using the changeset viewer.