Changeset 3437331
- Timestamp:
- 01/12/2026 02:58:06 AM (6 weeks ago)
- Location:
- admin-toolbox/trunk
- Files:
-
- 3 edited
-
atb_admin.php (modified) (16 diffs)
-
atb_functions.php (modified) (5 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-toolbox/trunk/atb_admin.php
r3290715 r3437331 96 96 if($row->option_name=='atb_hide_item_id') $hide_item_id=$row->option_value; 97 97 if($row->option_name=='atb_hide_item_all') $hide_item_all=$row->option_value; 98 99 if($row->option_name=='atb_admin_email') $admin_email=$row->option_value; 100 if($row->option_name=='atb_admin_email_type') $admin_email_type=$row->option_value; 98 101 99 102 if($row->option_name=='atb_redirect_hp') $redirect_hp=$row->option_value; … … 201 204 if(!isset($hide_item_id)) $hide_item_id=''; 202 205 if(!isset($hide_item_all)) $hide_item_all=''; 206 207 if(!isset($admin_email)) $admin_email=0; 208 if(!isset($admin_email_type)) $admin_email_type=''; 203 209 204 210 if(!isset($redirect_hp)) $redirect_hp=0; … … 293 299 Error Reports: <?php echo $err_rpt;?>, path <?php echo $err_rpt_path;?>, exclude <?php echo $err_rpt_exclude;?><br> 294 300 Hide Items: <?php echo $hide_item;?>, role <?php echo $hide_item_role;?>, role_exclude <?php echo $hide_item_role_exclude;?>, items <?php echo $hide_item_id;?>, all roles <?php echo $hide_item_all;?><br> 301 Disable Emails: <?php echo $admin_email;?>, types <?php echo $admin_email_type;?><br> 295 302 Redirect to HP: <?php echo $redirect_hp;?>, role <?php echo $redirect_hp_role;?>, role_exclude <?php echo $redirect_hp_role_exclude;?>, pages <?php echo $redirect_hp_page;?><br> 296 303 Redirect to WP Admin: <?php echo $redirect_db;?>, role <?php echo $redirect_db_role;?>, role_exclude <?php echo $redirect_db_role_exclude;?>, pages <?php echo $redirect_db_page;?><br> … … 633 640 <b style='color:#000'>Based on Role</b><br> 634 641 <textarea name='option_value[]' style='width:100%;min-height:70px' title='IDs or Classes' placeholder='IDs or Classes'><?php echo str_replace(' ',' ',$hide_item_id); ?></textarea> 635 <select style='display:block' onchange=" previousElementSibling.innerHTML=previousElementSibling.innerHTML+','+this.value;this.value='';">642 <select style='display:block' onchange="atb_add_to_list(this)"> 636 643 <option selected value=''>Select ID/Class 637 644 <option value='#wpadminbar'>Admin Bar … … 655 662 <b style='color:#000'>For Everyone</b><br> 656 663 <textarea name='option_value[]' style='width:100%;min-height:70px' title='IDs or Classes' placeholder='IDs or Classes'><?php echo str_replace(' ',' ',$hide_item_all); ?></textarea> 657 <select style='display:block' onchange=" previousElementSibling.innerHTML=previousElementSibling.innerHTML+','+this.value;this.value='';">664 <select style='display:block' onchange="atb_add_to_list(this)"> 658 665 <option selected value=''>Select ID/Class 659 666 <option value='#wpadminbar'>Admin Bar … … 674 681 </td> 675 682 </tr> 683 676 684 677 685 <tr style='background:#F5F5F5'> 686 <td><span class='atb_title'><span class="dashicons dashicons-list-view"></span>Admin Emails</span> <br>Disable Admin Emails by Type.<br> 687 <td nowrap> 688 <input type='hidden' name='option_name[]' value='admin_email'> 689 <select name='option_value[]' id='admin_email' onchange="atb_change('atb_config',this.id,this.selectedIndex);"> 690 <option value='' disabled <?php if($atb_setup_mode>0) echo 'selected';?>>Enable Emails 691 <option value='1' <?php if($admin_email==1) echo 'selected';?>>Disable Emails 692 <option value='0' <?php if($admin_email==0 && $atb_setup_mode==0) echo 'selected';?>>Enable Emails (WP Default) 693 </select> 694 <span id='admin_email-sel' class='sel_status'><?php echo $not_set;?></span> 695 </td> 696 697 <td></td> 698 699 <td nowrap id='admin_email_type_td'> 700 <input type='hidden' name='option_name[]' value='admin_email_type'> 701 Disable these Emails<br><br> 702 <textarea name='option_value[]' style='width:100%;min-height:70px' title='Email Types' placeholder='Email Types'><?php echo str_replace(' ',' ',$admin_email_type); ?></textarea> 703 <select style='display:block' onchange="atb_add_to_list(this)"> 704 <option selected value=''>Select Email Type 705 <option value='auto_plugin_update_send_email'>auto_plugin_update_send_email</option> 706 <option value='auto_theme_update_send_email'>auto_theme_update_send_email</option> 707 <option value='auto_core_update_send_email'>auto_core_update_send_email</option> 708 <option value='send_password_change_email'>send_password_change_email</option> 709 <option value='send_email_change_email'>send_email_change_email</option> 710 <option value='wp_password_change_notification_email'>wp_password_change_notification_email</option> 711 <option value='wp_new_user_notification_email_admin'>wp_new_user_notification_email_admin</option> 712 <option value='woocommerce_low_stock_notification'>woocommerce_low_stock_notification</option> 713 <option value='woocommerce_no_stock_notification'>woocommerce_no_stock_notification</option> 714 <option value='woocommerce_product_on_backorder_notification'>woocommerce_product_on_backorder_notification</option> 715 <option value='woocommerce_email_recipient_new_order'>woocommerce_email_recipient_new_order</option> 716 <option value='woocommerce_email_recipient_cancelled_order'>woocommerce_email_recipient_cancelled_order</option> 717 <option value='woocommerce_email_recipient_failed_order'>woocommerce_email_recipient_failed_order</option> 718 <option value='woocommerce_email_enabled'>woocommerce_email_enabled</option> 719 </select> 720 </td> 721 </tr> 722 723 <tr style='background:#FFF'> 678 724 <td><span class='atb_title'><span class="dashicons dashicons-redo"></span>Redirect to Homepage</span> <br>Redirect home based on URL.<br> 679 725 <td nowrap> … … 714 760 </tr> 715 761 716 <tr style='background:#F FF'>762 <tr style='background:#F5F5F5'> 717 763 <td><span class='atb_title'><span class="dashicons dashicons-redo"></span>Redirect to Dashboard</span> <br>Redirect to /wp-admin based on role.<br> 718 764 <td nowrap> … … 748 794 Redirect to /wp-admin from these pages<br> 749 795 <textarea name='option_value[]' style='width:100%;min-height:70px' title='Separate Pages by new line' placeholder='Separate Pages by new line'><?php echo str_replace(' ',' ',$redirect_db_page); ?></textarea> 750 <select style='display:block' onchange=" previousElementSibling.innerHTML=previousElementSibling.innerHTML+','+this.value;this.value='';">796 <select style='display:block' onchange="atb_add_to_list(this)"> 751 797 <option selected value=''>Select Page 752 798 <option value='edit.php'>Edit Post/Page … … 769 815 </tr> 770 816 771 <tr style='background:#F 5F5F5'>817 <tr style='background:#FFF'> 772 818 <td><span class='atb_title'><span class="dashicons dashicons-format-chat"></span> Disable Notices</span><br>Disable all update-related notifications in WordPress.</td> 773 819 <td nowrap> … … 801 847 </tr> 802 848 803 <tr style='background:#F FF'>849 <tr style='background:#F5F5F5'> 804 850 <td><span class='atb_title'><span class="dashicons dashicons-list-view"></span> Search Post Meta</span><br>Search posts by post meta in wp-admin.</td> 805 851 <td nowrap> … … 853 899 </tr> 854 900 855 <tr style='background:#F 5F5F5'>901 <tr style='background:#FFF'> 856 902 <td><span class='atb_title'><span class="dashicons dashicons-list-view"></span> Hide Bulk Actions</span><br>Hide list bulk actions, quick edit, and delete options. This features hides these actions only in lists, it does not remove functionality.</td> 857 903 <td nowrap> … … 905 951 </tr> 906 952 907 <tr style='background:#F FF'>953 <tr style='background:#F5F5F5'> 908 954 <td><span class='atb_title'><span class="dashicons dashicons-plus-alt"></span>Hide New Post Button</span><br>Hide new post buttons. This visually hides the button, it does not remove functionality.</td> 909 955 <td nowrap> … … 957 1003 </tr> 958 1004 959 <tr style='background:#F 5F5F5'>1005 <tr style='background:#FFF'> 960 1006 <td><span class='atb_title'><span class="dashicons dashicons-admin-users"></span> Hide Roles</span><br>Select roles to hide in the user editor. Limit roles that have access to other roles.</td> 961 1007 <td nowrap> … … 1002 1048 </tr> 1003 1049 1004 <tr style='background:#F FF'>1050 <tr style='background:#F5F5F5'> 1005 1051 <td><span class='atb_title'><span class="dashicons dashicons-images-alt2"></span> Limit Media Size</span><br>Set the maximum size for new images uploaded via the media library.</td> 1006 1052 <td nowrap> … … 1046 1092 </tr> 1047 1093 1048 <tr style='background:#F 5F5F5'>1094 <tr style='background:#FFF'> 1049 1095 <td><span class='atb_title'><span class="dashicons dashicons-media-code"></span>Disable XML-RPC</span> <br>XML-RPC can be used to enable a brute force attack on your site.</a>.</td> 1050 1096 <td nowrap colspan='3'> … … 1104 1150 } 1105 1151 function atb_getE(e) {return document.getElementById(e);} 1152 1153 function atb_add_to_list(el){ 1154 var ta=el.previousElementSibling; 1155 if(!ta||!el.value)return; 1156 var v=el.value; 1157 var list=ta.value?ta.value.split(/[\r\n,]+/):[]; 1158 var out=[]; 1159 var found=false; 1160 for(var i=0;i<list.length;i++){ 1161 var x=list[i].trim(); 1162 if(!x)continue; 1163 if(x===v){found=true;continue;} 1164 out.push(x); 1165 } 1166 if(!found)out.push(v); 1167 ta.value=out.join("\n"); 1168 el.value=''; 1169 } 1106 1170 1107 1171 var rolemultiselect_Interval=setInterval(function() { -
admin-toolbox/trunk/atb_functions.php
r3429279 r3437331 6 6 Author: RLDD 7 7 Author URI: https://richardlerma.com/contact/ 8 Version: 6. 0.368 Version: 6.1.0 9 9 Text Domain: admin-toolbox 10 10 Copyright: (c) 2017-2026 rldd.net - All Rights Reserved … … 13 13 */ 14 14 15 global $atb_version; $atb_version='6. 0.36';15 global $atb_version; $atb_version='6.1.0'; 16 16 if(!defined('ABSPATH')) exit; 17 17 … … 529 529 // PageHit Summary 530 530 function atb_view_summary($atb_version_type) { 531 $k='atb_view_summary_init'; 532 if(get_transient($k))return; 533 set_transient($k,1,5*MINUTE_IN_SECONDS); 531 534 if(get_transient('limit_img_size_kb_'.atb_cui())!==false) delete_transient('limit_img_size_kb_'.atb_cui()); 532 535 … … 688 691 } 689 692 </script><?php 693 delete_transient('atb_view_summary_init'); 690 694 } 691 695 … … 747 751 } 748 752 add_filter('admin_email_check_interval','atb_admin_email_check'); 753 754 755 function atb_admin_email_rules(){ 756 $on=get_option('atb_admin_email'); 757 if($on!=1&&$on!='1')return; 758 $types=get_option('atb_admin_email_type'); 759 if(!$types)return; 760 $list=preg_split("/[\r\n,]+/",$types); 761 if(!$list||!is_array($list))return; 762 $wc_map=['woocommerce_product_on_backorder_notification'=>'backorder','woocommerce_low_stock_notification'=>'low_stock','woocommerce_no_stock_notification'=>'no_stock']; 763 foreach($list as $t){ 764 $t=trim($t); 765 if($t==='')continue; 766 if(stripos($t,'woocommerce')===0){ 767 if(isset($wc_map[$t])){ 768 add_action('woocommerce_email',function($email)use($t,$wc_map){remove_action($t,[$email,$wc_map[$t]]);}); 769 }else{ 770 add_filter($t,'__return_false'); 771 } 772 }else add_filter($t,'__return_false'); 773 } 774 } 775 add_action('init','atb_admin_email_rules'); -
admin-toolbox/trunk/readme.txt
r3429279 r3437331 2 2 Contributors: rermis 3 3 Tags: admin, 2FA, roles, track, hide role 4 License: GPLv3 or later 5 License URI: http://www.gnu.org/licenses/gpl-3.0.html 4 6 Requires at least: 6.0 5 7 Tested up to: 6.9 6 Stable tag: 6. 0.368 Stable tag: 6.1.0 7 9 8 10 Manage an array of administrative options improving user control and resource management. … … 46 48 47 49 == Changelog == 48 = 6.0.36 = * Minor aesthetic improvements 50 = 6.1.0 = * Add option to disable admin email types. Workaround for running page_hit process on small servers. 51 = 6.0.37 = * Minor aesthetic improvements 49 52 = 6.0.35 = * Bug fix for hide class feature 50 53 = 6.0.34 = * Minor aesthetic improvements
Note: See TracChangeset
for help on using the changeset viewer.