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

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

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

No WPCode Links

add_action( ‘admin_menu’, function () { // Parent menu slug is “wpcode”. remove_submenu_page( ‘wpcode’, ‘wpcode-duplicator’ ); remove_submenu_page( ‘wpcode’, ‘wpcode-search-replace’ ); }, 999 ); add_filter(‘pre_option_wpcode_admin_notices’, function ($value) { $notices = is_array($value) ? $value : array(); foreach (array(‘wpconsent_pixel’, ‘suggest_plugins’) as $slug) { if…Continue reading

EP Backfill Images – Admin Only

// Backfill missing featured images for Events // Runs only in Admin when dashboard loads add_action(‘admin_init’, function() { if ( ! current_user_can(‘manage_options’) ) { return; } $args = [ ‘post_type’ => ‘tribe_events’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => 20, // small…Continue reading

PHP – Custom login

// === CUSTOM LOGIN PAGE === add_action(‘login_enqueue_scripts’, function () { echo ‘ ‘; }); // === LIEN DU LOGO DE CONNEXION === add_filter(‘login_headerurl’, fn() => ‘https://www.mdf.nc’); add_filter(‘login_headertext’, fn() => ‘MDF NC’);Continue reading