WordPress Database FINAL MULTI-PURPOSE “UPSERT” FUNCTION – PHP

/** * ============================================================================ * FINAL WORDPRESS MULTI-PURPOSE “UPSERT” FUNCTION * ============================================================================ * @author Sumaiya Akter, Anytype Doc: anytype://object?objectId=bafyreib7wbeew4uvzm63ust7r74hthzduantjvxkwfuv5ahdxltgr4mdae&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * @description This function provides a dynamic “upsert” (update or insert) * capability for any WordPress database table. It is designed to…Continue reading

Get Tables and Columns from WordPress Database – PHP

/** * ============================================================================ * FINAL WORDPRESS “GET TABLE COLUMNS” FUNCTION * ============================================================================ * @author Sumaiya Akter , Anytype Doc: anytype://object?objectId=bafyreifgnp2yabaq4bplkou3hxpipm4tffljxcgcckglea36rlkk22daae&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * @description This function dynamically retrieves all column names from any * specified WordPress database table. It is designed to…Continue reading

WORDPRESS DYNAMIC DATA FETCHING FUNCTION

/** * ============================================================================ * WORDPRESS DYNAMIC DATA FETCHING FUNCTION * ============================================================================ * @author Sumaiya Akter, Anytype Doc: anytype://object?objectId=bafyreidvxgrkcebamky2hxzxazxbe3phrie6ev44zyhjzco7cmhkgovhle&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * @description This function dynamically fetches data from any specified * WordPress database table based on a set of search criteria. It…Continue reading

Filter by Taxonomy for unifi menu CPT

function rudr_taxonomy_filter( $post_type ){ // let’s decide about post type first if( ‘unifi-custom-menu’ !== $post_type ){ return; } // pass multiple taxonomies as an array of their slugs $taxonomies = array( ‘un-menu-cat’ ); // for every taxonomy we are going…Continue reading

Expose WP User Meta as Shortcodes

function rd__current_user() { static $u = null; if ($u !== null) { return $u; } $u = wp_get_current_user(); // Core: sets current user if not already set. return $u; } /** [user_first_name] */ function rd_sc_user_first_name() { static $first = null;…Continue reading

External database – FINAL MULTI-PURPOSE “UPSERT” FUNCTION – PHP

/** * ============================================================================ * FINAL MULTI-PURPOSE “UPSERT” FUNCTION (V4 – Renamed Key) * ============================================================================ * This version includes ‘data_status’, always returns the record’s ID, and * includes the submitted data under the key ‘upsert’ in the response. * * FUNCTION…Continue reading

WordPress database table -Bestandskundenprocess Form – Dynamic Fetch, Table & Dropdown Logic – PHP

/** * ============================================================================ * SECURE & FINAL SCRIPT FOR FLUENT FORM AUTOFILL (GROUNDHOGG WP DB VERSION) * ============================================================================ * @author Sumaiya Akter, Anytype Doc: anytype://object?objectId=bafyreigxqhjk7ppkjagyonytgieix5qxkkbhpmned743amh23csyrab6s4&spaceId=bafyreih4bocrmskuomcrks3sjwpnzxpbxvxwgto23vof3umg2fywdqzjmy.31bq39w6q8ru7&cid=bafybeifc55atash7zlqcjd3fv425bkwl7z5zstcxdilct5hstlng73xwci&key=6kKA3QiwnksqLbpcJ4T6UhmQ5BHzgJUfbpn1QLnkv5Lv * @description This PHP script works in conjunction with a JavaScript file to * securely…Continue reading

Empty Admin Dashboard (copy)

add_action( ‘wp_dashboard_setup’, function () { global $wp_meta_boxes; $wp_meta_boxes[‘dashboard’] = array(); remove_action( ‘welcome_panel’, ‘wp_welcome_panel’ ); }, 1000 );Continue reading