
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
@wpmvc/admin-sidebar
Advanced tools
Professional React hooks for WordPress admin interfaces with complete sidebar management and responsive layout control.
Professional React hooks for WordPress admin interfaces with complete sidebar management and responsive layout control.
✨ Dual Hook System
useActiveAdminMenu - Intelligent menu highlightinguseAdminSidebarLayout - Real-time sidebar state tracking🚀 Seamless Integration
⚡ Performance Optimized
npm install @wpmvc/admin-sidebar react-router-dom
# or
yarn add @wpmvc/admin-sidebar react-router-dom
import { HashRouter, useLocation, useNavigate, Outlet } from 'react-router-dom';
import { useActiveAdminMenu, useAdminSidebarLayout } from '@wpmvc/admin-sidebar';
const Layout = () => {
// Required hooks
const navigate = useNavigate();
const location = useLocation();
const { left, top } = useAdminSidebarLayout();
// Initialize menu management
useActiveAdminMenu( {
pageTopLevelID: '#toplevel_page_my-plugin',
rootPaths: [ '#/', '#/dashboard' ],
navigate,
location,
} );
return (
<div
style={ {
marginLeft: left,
marginTop: top,
transition: 'margin-left 0.3s ease',
} }
>
<Outlet />
</div>
);
};
// Entry point
export default () => (
<HashRouter>
<Route element={ <Layout /> }>
{ /* Add your route items */ }
</Route>
</HashRouter>
);
useActiveAdminMenu(config: ActiveMenuConfig)Required Configuration:
| Prop | Type | Description |
|---|---|---|
pageTopLevelID | string | Exact jQuery selector for menu wrapper |
rootPaths | string[] | Base paths (must include # prefix) |
navigate | From useNavigate() | |
location | From useLocation() |
useAdminSidebarLayout(): SidebarLayoutReturn Object:
| Property | Type | Example Value |
|---|---|---|
left | number | 190px (expanded) |
top | number | 32px (admin bar) |
Contributions are welcome! Please open an issue or submit a pull request if you'd like to contribute to the project.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.