by Garth | May 7, 2021 | Javascript, Jquery
$(document).on(“click”,”tr”,function(){ var projectId = $(this).attr(“data-projectId”); $(this).nextAll(“tr:eq(0)”).toggle(500); $(this).nextAll(“tr:eq(1)”).toggle(500);...
by Garth | Apr 29, 2021 | Javascript, Jquery
$(“#debtor-customer-filter”).on(‘submit’, function(e) { e.preventDefault(); var data = new FormData(this); $(“#debtors-table”).DataTable().destroy(); $(“#debtors-list”).load(“debtor/filterCustomerDebtorById”,...
by Garth | Mar 16, 2021 | PHP, Tools
Setting up xDebug is a bit of a pain as the links are not clearly linked. So below is some info to help you 😉 In order to use the Install Wizard. Open your PHPinfo() page from the xampp default dashboard pagehttp://localhost/dashboard/phpinfo.php Copy all...
by Garth | Mar 14, 2021 | Wordpress
// Limit media library access add_filter( ‘ajax_query_attachments_args’, ‘wpb_show_current_user_attachments’ ); function wpb_show_current_user_attachments( $query ) { $user_id = get_current_user_id(); if ( $user_id &&...
by Garth | Mar 14, 2021 | PHP, Wordpress
function TRIM_ADMIN_MENU() { global $current_user; if(!current_user_can(‘administrator’)) { remove_menu_page( ‘tools.php’ ); // No tools for <= editors remove_menu_page( ‘activity_log_page’ ); // Activity log } }...