textdomain, __DIR__ . '/languages/plugin-' . get_locale() . '.mo'); if ( is_admin() && 'users.php' === $pagenow && strpos( $_SERVER["REQUEST_URI"], 'action=delete' ) ) { add_action( 'after_setup_theme', array( $this, 'action_after_setup_theme' ), 10000 ); add_action( 'shutdown', array( $this, 'action_shutdown' ), 10000 ); add_action( 'admin_notices', array( $this, 'action_admin_notices' ), 10000 ); } } public function action_after_setup_theme() { ob_start( function ( $buffer_html ) { $target_tag = '/(.*?)/'; $replace_tag = '$1 style="color: #c0c0c0;"$2value="delete_disabled" disabled$3'; $buffer_html = preg_replace( $target_tag, $replace_tag, $buffer_html, 1 ); return $buffer_html; }); } public function action_shutdown() { if ( ob_get_length() ) { ob_end_flush(); } } public function action_admin_notices() { $message = __( 'Plugin', $this->textdomain ) . ' : Admin User Delete With Contents Disabled
' . __( "'Delete all content.' is changed to a setting that cannot be selected.", $this->textdomain ); echo '

' . $message . '

'; } } } new WPAdmin_User_Delete_Disabled();