// 1. Add a column for file size in the Media Library table function custom_media_column_file_size( $columns ) { $columns[‘file_size’] = __( ‘File Size’, ‘custom-media-columns’ ); return $columns; } add_filter( ‘manage_media_columns’, ‘custom_media_column_file_size’ ); // 2. Display the file size for each…Continue reading
add_filter(‘wp_prepare_themes_for_js’, ‘customize_theme_display’, 20); function customize_theme_display($themes) { // Haal de huidige gebruiker op $current_user = wp_get_current_user(); $user_login = $current_user->user_login; // Lijst van gebruikers die ALLE thema’s mogen zien $allowed_users = array(‘Nico’, ‘Thijs’, ‘Mark’, ‘PXLSZ_NK’, ‘PXLSZ_TJW’, ‘PXLSZ_MK’); // Als de gebruiker NIET…Continue reading
add_action( ‘admin_head’, function () { // Bail if WooCommerce isn’t active. if ( ! class_exists( ‘WooCommerce’ ) ) { return; } if ( ! function_exists( ‘get_current_screen’ ) ) { return; } $screen = get_current_screen(); // Legacy order/subscription edit. $is_legacy_order_screen =…Continue reading
/** * Alleen toegang tot Code Snippets / WPCode voor specifieke e-mailadressen. * Verberg alle varianten (free/pro/legacy) en menu’s in de admin + adminbar. */ add_action(‘admin_menu’, function () { $allowed_emails = array(‘[email protected]’, ‘[email protected]’, ‘[email protected]’); $current = wp_get_current_user(); $is_allowed = ($current…Continue reading
/** * Allow-list: deze gebruikers mogen alles. Anderen: * – mogen plugins ACTIVEREN & DEACTIVEREN * – mogen GEEN plugins installeren / uploaden / updaten / verwijderen * – mogen geen thema’s installeren / wisselen / verwijderen / updaten *…Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
/** * BikeYard Settings Page Notifications Integration v1.1 * * FIXED VERSION – Directly integrates with Settings Page v8 * This version modifies the settings page output to include notifications * * Add as WPCode snippet: * – Title: BikeYard…Continue reading
add_action(‘admin_footer’, function() { global $pagenow; if ($pagenow === ‘edit.php’ && isset($_GET[‘post_type’]) && $_GET[‘post_type’] === ‘page’) { echo ‘‘; } });Continue reading
add_action(‘admin_head’, function() { echo ‘ ‘; }); // 2. Bytt ut “Edit with Elementor”-link med ny knappstruktur add_action(‘admin_footer’, function() { echo ‘‘; }); // 3. Last inn Elementor sine ikoner riktig i admin add_action(‘admin_enqueue_scripts’, function() { if (!function_exists(‘is_plugin_active’)) { require_once…Continue reading
/** * ============================================================================ * 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