Changeset 3343687
- Timestamp:
- 08/12/2025 04:14:55 PM (6 months ago)
- Location:
- mxp-dev-tools
- Files:
-
- 1 deleted
- 5 edited
- 6 copied
-
tags/3.3.6 (deleted)
-
tags/3.3.7 (copied) (copied from mxp-dev-tools/trunk)
-
tags/3.3.7/index.php (copied) (copied from mxp-dev-tools/trunk/index.php) (2 diffs)
-
tags/3.3.7/mxp-login-path.php (copied) (copied from mxp-dev-tools/trunk/mxp-login-path.php) (1 diff)
-
tags/3.3.7/mxp-site-manager.php (copied) (copied from mxp-dev-tools/trunk/mxp-site-manager.php) (2 diffs)
-
tags/3.3.7/mxp-snippets.php (copied) (copied from mxp-dev-tools/trunk/mxp-snippets.php) (5 diffs)
-
tags/3.3.7/readme.txt (copied) (copied from mxp-dev-tools/trunk/readme.txt) (2 diffs)
-
trunk/index.php (modified) (2 diffs)
-
trunk/mxp-login-path.php (modified) (1 diff)
-
trunk/mxp-site-manager.php (modified) (2 diffs)
-
trunk/mxp-snippets.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
mxp-dev-tools/tags/3.3.7/index.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 use SearchReplace; 40 40 use Utility; 41 static $VERSION = '3.3. 6';41 static $VERSION = '3.3.7'; 42 42 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 43 43 protected static $instance = null; -
mxp-dev-tools/tags/3.3.7/mxp-login-path.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.3.7/mxp-site-manager.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 class MDTSiteManager { 40 40 public $plugin_slug = 'mdt-site-manager'; 41 public static $VERSION = '3.3. 6';41 public static $VERSION = '3.3.7'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/tags/3.3.7/mxp-snippets.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 253 253 if (!defined("MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED")) { 254 254 define('MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED', true); 255 } 256 // 預設上傳檔案大小限制,預設 1MB 257 if (!defined('MDT_UPLOAD_FILE_SIZE_LIMIT')) { 258 define('MDT_UPLOAD_FILE_SIZE_LIMIT', 1024000); 255 259 } 256 260 class MDTSnippets { … … 449 453 add_filter('upload_mimes', array($this, 'mxp_upload_mimes'), 99999, 2); 450 454 /** 451 * 移除檔案大小限制452 */453 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);454 /**455 455 * 覆寫 WordPress 的檔案類型檢查,保留真實 MIME 456 456 */ … … 458 458 } 459 459 } 460 /** 461 * 檔案大小限制設定 462 */ 463 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3); 460 464 if (MDT_ENABLE_OVERWRITE_I18N_MO_FILE) { 461 465 add_filter('load_textdomain_mofile', array($this, 'load_custom_translation_mo_file'), 12, 2); … … 1373 1377 1374 1378 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 1380 1388 public function mxp_wp_check_filetype_and_ext($data, $file, $filename, $mimes) { 1381 1389 if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) { -
mxp-dev-tools/tags/3.3.7/readme.txt
r3343244 r3343687 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.8 8 Stable tag: 3.3. 68 Stable tag: 3.3.7 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 == Changelog == 79 79 80 = 3.3. 6=81 82 * 調整授權管理員的上傳為無限制 80 = 3.3.7 = 81 82 * 調整授權管理員的上傳為無限制(伺服器最高上限),其他用戶預設 1 MB 83 83 * 預設未指定授權管理員時指定為網站當前的管理員群 84 84 -
mxp-dev-tools/trunk/index.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 use SearchReplace; 40 40 use Utility; 41 static $VERSION = '3.3. 6';41 static $VERSION = '3.3.7'; 42 42 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 43 43 protected static $instance = null; -
mxp-dev-tools/trunk/mxp-login-path.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/mxp-site-manager.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 39 39 class MDTSiteManager { 40 40 public $plugin_slug = 'mdt-site-manager'; 41 public static $VERSION = '3.3. 6';41 public static $VERSION = '3.3.7'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/trunk/mxp-snippets.php
r3343244 r3343687 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.8 9 * Stable tag: 3.3. 610 * Version: 3.3. 69 * Stable tag: 3.3.7 10 * Version: 3.3.7 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 253 253 if (!defined("MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED")) { 254 254 define('MDT_ENABLE_ADMIN_FILE_UPLOAD_UNLIMITED', true); 255 } 256 // 預設上傳檔案大小限制,預設 1MB 257 if (!defined('MDT_UPLOAD_FILE_SIZE_LIMIT')) { 258 define('MDT_UPLOAD_FILE_SIZE_LIMIT', 1024000); 255 259 } 256 260 class MDTSnippets { … … 449 453 add_filter('upload_mimes', array($this, 'mxp_upload_mimes'), 99999, 2); 450 454 /** 451 * 移除檔案大小限制452 */453 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3);454 /**455 455 * 覆寫 WordPress 的檔案類型檢查,保留真實 MIME 456 456 */ … … 458 458 } 459 459 } 460 /** 461 * 檔案大小限制設定 462 */ 463 add_filter('upload_size_limit', array($this, 'mxp_upload_size_limit'), 99999, 3); 460 464 if (MDT_ENABLE_OVERWRITE_I18N_MO_FILE) { 461 465 add_filter('load_textdomain_mofile', array($this, 'load_custom_translation_mo_file'), 12, 2); … … 1373 1377 1374 1378 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 1380 1388 public function mxp_wp_check_filetype_and_ext($data, $file, $filename, $mimes) { 1381 1389 if (in_array(get_current_user_id(), MDT_DISALLOW_FILE_MODS_ADMINS)) { -
mxp-dev-tools/trunk/readme.txt
r3343244 r3343687 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.8 8 Stable tag: 3.3. 68 Stable tag: 3.3.7 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 78 78 == Changelog == 79 79 80 = 3.3. 6=81 82 * 調整授權管理員的上傳為無限制 80 = 3.3.7 = 81 82 * 調整授權管理員的上傳為無限制(伺服器最高上限),其他用戶預設 1 MB 83 83 * 預設未指定授權管理員時指定為網站當前的管理員群 84 84
Note: See TracChangeset
for help on using the changeset viewer.