Custom Screen Option

// Custom Screen Option / Kiri Vadivelu / 2026 function custom_screen_option() { if ( get_current_user_id() !== 1 ) { // Replace your ID return false; } return true; } add_filter( ‘screen_options_show_screen’, ‘custom_screen_option’ );Continue reading

Remove Dashboard Widget

// Remove Dashboard Widget / Kiri Vadivelu / 2026 add_action( ‘wp_dashboard_setup’, ‘remove_dashboard_widget’ ); function remove_dashboard_widget() { // Remove specific widgets by their ID and section remove_meta_box( ‘dashboard_right_now’, ‘dashboard’, ‘normal’ ); // At a Glance remove_meta_box( ‘dashboard_activity’, ‘dashboard’, ‘normal’ ); //…Continue reading

Contributor Default Role

// Contributor Default Role / Kiri Vadivelu / 2026 function contributor_default_role( $default_role ) { return ‘contributor’; // Replace your choice } add_filter( ‘pre_option_default_role’, ‘contributor_default_role’ );Continue reading

lokalstolz | Bildmaße ergänzen

/* * WPCode-Snippet “lokalstolz | Bildmasse ergaenzen” (Typ php, Location everywhere, Auto-Insert an, Prioritaet 10) * Oxygen 6 gibt an Bildern kein width und height aus. Lighthouse meldet dann “Image elements do not have explicit * width and height”, der…Continue reading

test

add_action( ‘admin_notices’, function () { $state = ( defined( ‘WP_DEBUG’ ) && WP_DEBUG ) ? ‘enabled’ : ‘disabled’; echo ‘ WP_DEBUG is ‘ . esc_html( $state ) . ‘. ‘; } );Continue reading

FC – [*] – URL de acceso propia

/** * FC – [*] – URL de acceso propia (snippet de WPCode, tipo PHP, «Run Everywhere»). * * Cambia la dirección de acceso a WordPress, como WPS Hide Login: * * – El acceso pasa a https://la-web/{slug}/. El slug…Continue reading

FC – [*] – Endurecimiento básico

/** * FC – [*] – Endurecimiento básico (snippet de WPCode, tipo PHP, «Run Everywhere»). * * Quita de la web lo que da pistas a quien busca atacarla, sin cambiar nada * de lo que ven los visitantes: *…Continue reading