Changeset 3079735
- Timestamp:
- 05/01/2024 06:29:44 AM (23 months ago)
- Location:
- mxp-dev-tools
- Files:
-
- 5 edited
- 18 copied
-
tags/3.1.8 (copied) (copied from mxp-dev-tools/trunk)
-
tags/3.1.8/includes/assets/js/dashboard/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/dashboard/app.js)
-
tags/3.1.8/includes/assets/js/db-optimize/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/db-optimize/app.js)
-
tags/3.1.8/includes/assets/js/plugins-list/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/plugins-list/app.js)
-
tags/3.1.8/includes/assets/js/search-plugins/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/search-plugins/app.js)
-
tags/3.1.8/includes/assets/js/site-manager (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager)
-
tags/3.1.8/includes/assets/js/site-manager/app.js (copied) (copied from mxp-dev-tools/trunk/includes/assets/js/site-manager/app.js)
-
tags/3.1.8/includes/class_plugins_list_table.php (copied) (copied from mxp-dev-tools/trunk/includes/class_plugins_list_table.php)
-
tags/3.1.8/includes/db-optimize.php (copied) (copied from mxp-dev-tools/trunk/includes/db-optimize.php)
-
tags/3.1.8/includes/hooks-usage.php (copied) (copied from mxp-dev-tools/trunk/includes/hooks-usage.php)
-
tags/3.1.8/includes/plugins-list.php (copied) (copied from mxp-dev-tools/trunk/includes/plugins-list.php)
-
tags/3.1.8/includes/utility.php (copied) (copied from mxp-dev-tools/trunk/includes/utility.php)
-
tags/3.1.8/index.php (copied) (copied from mxp-dev-tools/trunk/index.php) (2 diffs)
-
tags/3.1.8/mxp-login-path.php (copied) (copied from mxp-dev-tools/trunk/mxp-login-path.php) (1 diff)
-
tags/3.1.8/mxp-site-manager.php (copied) (copied from mxp-dev-tools/trunk/mxp-site-manager.php) (2 diffs)
-
tags/3.1.8/mxp-snippets.php (copied) (copied from mxp-dev-tools/trunk/mxp-snippets.php) (5 diffs)
-
tags/3.1.8/readme.txt (copied) (copied from mxp-dev-tools/trunk/readme.txt) (2 diffs)
-
tags/3.1.8/uninstall.php (copied) (copied from mxp-dev-tools/trunk/uninstall.php)
-
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.1.8/index.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 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.1. 7';41 static $VERSION = '3.1.8'; 42 42 private $themeforest_api_base_url = 'https://api.envato.com/v3'; 43 43 protected static $instance = null; -
mxp-dev-tools/tags/3.1.8/mxp-login-path.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/tags/3.1.8/mxp-site-manager.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 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.1. 7';41 public static $VERSION = '3.1.8'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/tags/3.1.8/mxp-snippets.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 117 117 define('MDT_DISALLOW_FILE_MODS_ADMINS', array(1)); 118 118 } 119 // 顯示後台 使用者編號120 if (!defined('MDT_SHOW_ USER_ID')) {121 define('MDT_SHOW_ USER_ID', true);119 // 顯示後台內容的系統編號 120 if (!defined('MDT_SHOW_IDS')) { 121 define('MDT_SHOW_IDS', true); 122 122 } 123 123 // 登入畫面的LOGO替換 … … 282 282 add_filter('ms_user_row_actions', array($this, 'filter_user_row_actions'), 11, 2); 283 283 add_filter('get_edit_user_link', array($this, 'get_edit_user_link'), 11, 2); 284 if (MDT_SHOW_USER_ID) { 285 add_filter('manage_users_columns', array($this, 'add_user_id_column')); 286 add_action('manage_users_custom_column', array($this, 'show_user_id_column_content'), 10, 3); 284 if (MDT_SHOW_IDS) { 285 // 客製化CPT等的ID 286 add_action('admin_init', array($this, 'add_custom_object_ids')); 287 // 文章的ID 288 add_filter('manage_posts_columns', array($this, 'add_ids_column')); 289 add_action('manage_posts_custom_column', array($this, 'add_ids_value'), 10, 2); 290 // 頁面的ID 291 add_filter('manage_pages_columns', array($this, 'add_ids_column')); 292 add_action('manage_pages_custom_column', array($this, 'add_ids_value'), 10, 2); 293 // 媒體庫的ID 294 add_filter('manage_media_columns', array($this, 'add_ids_column')); 295 add_action('manage_media_custom_column', array($this, 'add_ids_value'), 10, 2); 296 // For Link Management. 297 add_filter('manage_link-manager_columns', array($this, 'add_ids_column')); 298 add_action('manage_link_custom_column', array($this, 'add_ids_value'), 10, 2); 299 // 分類的ID 300 add_action('manage_edit-link-categories_columns', array($this, 'add_ids_column')); 301 add_filter('manage_link_categories_custom_column', array($this, 'add_return_ids_value'), 10, 3); 302 // 使用者的ID 303 add_action('manage_users_columns', array($this, 'add_ids_column')); 304 add_filter('manage_users_custom_column', array($this, 'add_return_ids_value'), 10, 3); 305 // 留言的ID 306 add_action('manage_edit-comments_columns', array($this, 'add_ids_column')); 307 add_action('manage_comments_custom_column', array($this, 'add_ids_value'), 308 10, 2); 287 309 } 288 310 // 預設改變登入上方帶入連結與文字標題 … … 335 357 add_filter('pre_count_users', array($this, 'filter_user_counts'), 99999, 3); 336 358 } 359 } 360 361 public function add_custom_object_ids() { 362 363 // For Custom Taxonomies. 364 $taxonomies = get_taxonomies(array('public' => true), 'names'); 365 foreach ($taxonomies as $custom_taxonomy) { 366 if (isset($custom_taxonomy)) { 367 add_action('manage_edit-' . $custom_taxonomy . '_columns', array($this, 'add_ids_column')); 368 add_filter('manage_' . $custom_taxonomy . '_custom_column', array($this, 'add_return_ids_value'), 10, 3); 369 } 370 } 371 372 // For Custom Post Types. 373 $post_types = get_post_types(array('public' => true), 'names'); 374 foreach ($post_types as $post_type) { 375 if (isset($post_type)) { 376 add_action('manage_edit-' . $post_type . '_columns', array($this, 'add_ids_column')); 377 add_filter('manage_' . $post_type . '_custom_column', array($this, 'add_return_ids_value'), 10, 3); 378 } 379 } 380 } 381 382 public function add_ids_column($cols) { 383 $cols['mdt-show-ids'] = 'ID'; 384 return $cols; 385 } 386 387 public function add_ids_value($column_name, $id) { 388 if ('mdt-show-ids' === $column_name) { 389 echo esc_html($id); 390 } 391 } 392 393 public function add_return_ids_value($value, $column_name, $id) { 394 if ('mdt-show-ids' === $column_name) { 395 $value = $id; 396 } 397 398 return $value; 337 399 } 338 400 … … 1051 1113 } 1052 1114 1053 // 顯示使用者編號1054 public function add_user_id_column($columns) {1055 $columns['mxp_user_id'] = 'ID';1056 return $columns;1057 }1058 public function show_user_id_column_content($value, $column_name, $user_id) {1059 if ('mxp_user_id' === $column_name) {1060 return $user_id;1061 }1062 return $value;1063 }1064 1065 1115 public function mxp_get_plugin_details($plugin_path, $suffix = '') { 1066 1116 if (!function_exists('get_plugin_data')) { -
mxp-dev-tools/tags/3.1.8/readme.txt
r3079400 r3079735 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1. 78 Stable tag: 3.1.8 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.1.8 = 81 82 * 新增顯示後台系統編號功能,參考:[Show IDs by DraftPress](https://tw.wordpress.org/plugins/wpsite-show-ids/) 83 80 84 = 3.1.7 = 81 85 82 * 新增清除重複 User/Post Meta 資料的最佳化資料庫的功能,參考: [Cleanup Duplicate Meta](https://tw.wordpress.org/plugins/cleanup-duplicate-meta/)86 * 新增清除重複 User/Post Meta 資料的最佳化資料庫的功能,參考:[Cleanup Duplicate Meta](https://tw.wordpress.org/plugins/cleanup-duplicate-meta/) 83 87 * 修正一些操作體驗 84 88 -
mxp-dev-tools/trunk/index.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 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.1. 7';41 static $VERSION = '3.1.8'; 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
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ -
mxp-dev-tools/trunk/mxp-site-manager.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 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.1. 7';41 public static $VERSION = '3.1.8'; 42 42 43 43 public function __construct() { -
mxp-dev-tools/trunk/mxp-snippets.php
r3079400 r3079735 7 7 * Requires PHP: 5.6 8 8 * Tested up to: 6.5 9 * Stable tag: 3.1. 710 * Version: 3.1. 79 * Stable tag: 3.1.8 10 * Version: 3.1.8 11 11 * Author: Chun 12 12 * Author URI: https://www.mxp.tw/contact/ … … 117 117 define('MDT_DISALLOW_FILE_MODS_ADMINS', array(1)); 118 118 } 119 // 顯示後台 使用者編號120 if (!defined('MDT_SHOW_ USER_ID')) {121 define('MDT_SHOW_ USER_ID', true);119 // 顯示後台內容的系統編號 120 if (!defined('MDT_SHOW_IDS')) { 121 define('MDT_SHOW_IDS', true); 122 122 } 123 123 // 登入畫面的LOGO替換 … … 282 282 add_filter('ms_user_row_actions', array($this, 'filter_user_row_actions'), 11, 2); 283 283 add_filter('get_edit_user_link', array($this, 'get_edit_user_link'), 11, 2); 284 if (MDT_SHOW_USER_ID) { 285 add_filter('manage_users_columns', array($this, 'add_user_id_column')); 286 add_action('manage_users_custom_column', array($this, 'show_user_id_column_content'), 10, 3); 284 if (MDT_SHOW_IDS) { 285 // 客製化CPT等的ID 286 add_action('admin_init', array($this, 'add_custom_object_ids')); 287 // 文章的ID 288 add_filter('manage_posts_columns', array($this, 'add_ids_column')); 289 add_action('manage_posts_custom_column', array($this, 'add_ids_value'), 10, 2); 290 // 頁面的ID 291 add_filter('manage_pages_columns', array($this, 'add_ids_column')); 292 add_action('manage_pages_custom_column', array($this, 'add_ids_value'), 10, 2); 293 // 媒體庫的ID 294 add_filter('manage_media_columns', array($this, 'add_ids_column')); 295 add_action('manage_media_custom_column', array($this, 'add_ids_value'), 10, 2); 296 // For Link Management. 297 add_filter('manage_link-manager_columns', array($this, 'add_ids_column')); 298 add_action('manage_link_custom_column', array($this, 'add_ids_value'), 10, 2); 299 // 分類的ID 300 add_action('manage_edit-link-categories_columns', array($this, 'add_ids_column')); 301 add_filter('manage_link_categories_custom_column', array($this, 'add_return_ids_value'), 10, 3); 302 // 使用者的ID 303 add_action('manage_users_columns', array($this, 'add_ids_column')); 304 add_filter('manage_users_custom_column', array($this, 'add_return_ids_value'), 10, 3); 305 // 留言的ID 306 add_action('manage_edit-comments_columns', array($this, 'add_ids_column')); 307 add_action('manage_comments_custom_column', array($this, 'add_ids_value'), 308 10, 2); 287 309 } 288 310 // 預設改變登入上方帶入連結與文字標題 … … 335 357 add_filter('pre_count_users', array($this, 'filter_user_counts'), 99999, 3); 336 358 } 359 } 360 361 public function add_custom_object_ids() { 362 363 // For Custom Taxonomies. 364 $taxonomies = get_taxonomies(array('public' => true), 'names'); 365 foreach ($taxonomies as $custom_taxonomy) { 366 if (isset($custom_taxonomy)) { 367 add_action('manage_edit-' . $custom_taxonomy . '_columns', array($this, 'add_ids_column')); 368 add_filter('manage_' . $custom_taxonomy . '_custom_column', array($this, 'add_return_ids_value'), 10, 3); 369 } 370 } 371 372 // For Custom Post Types. 373 $post_types = get_post_types(array('public' => true), 'names'); 374 foreach ($post_types as $post_type) { 375 if (isset($post_type)) { 376 add_action('manage_edit-' . $post_type . '_columns', array($this, 'add_ids_column')); 377 add_filter('manage_' . $post_type . '_custom_column', array($this, 'add_return_ids_value'), 10, 3); 378 } 379 } 380 } 381 382 public function add_ids_column($cols) { 383 $cols['mdt-show-ids'] = 'ID'; 384 return $cols; 385 } 386 387 public function add_ids_value($column_name, $id) { 388 if ('mdt-show-ids' === $column_name) { 389 echo esc_html($id); 390 } 391 } 392 393 public function add_return_ids_value($value, $column_name, $id) { 394 if ('mdt-show-ids' === $column_name) { 395 $value = $id; 396 } 397 398 return $value; 337 399 } 338 400 … … 1051 1113 } 1052 1114 1053 // 顯示使用者編號1054 public function add_user_id_column($columns) {1055 $columns['mxp_user_id'] = 'ID';1056 return $columns;1057 }1058 public function show_user_id_column_content($value, $column_name, $user_id) {1059 if ('mxp_user_id' === $column_name) {1060 return $user_id;1061 }1062 return $value;1063 }1064 1065 1115 public function mxp_get_plugin_details($plugin_path, $suffix = '') { 1066 1116 if (!function_exists('get_plugin_data')) { -
mxp-dev-tools/trunk/readme.txt
r3079400 r3079735 6 6 Requires PHP: 5.6 7 7 Tested up to: 6.5 8 Stable tag: 3.1. 78 Stable tag: 3.1.8 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.1.8 = 81 82 * 新增顯示後台系統編號功能,參考:[Show IDs by DraftPress](https://tw.wordpress.org/plugins/wpsite-show-ids/) 83 80 84 = 3.1.7 = 81 85 82 * 新增清除重複 User/Post Meta 資料的最佳化資料庫的功能,參考: [Cleanup Duplicate Meta](https://tw.wordpress.org/plugins/cleanup-duplicate-meta/)86 * 新增清除重複 User/Post Meta 資料的最佳化資料庫的功能,參考:[Cleanup Duplicate Meta](https://tw.wordpress.org/plugins/cleanup-duplicate-meta/) 83 87 * 修正一些操作體驗 84 88
Note: See TracChangeset
for help on using the changeset viewer.