Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/elpuas/my-advanced-media/archive/refs/heads/main.zipAn advanced media library management plugin for WordPress that provides enhanced functionality for browsing, searching, filtering, and organizing media attachments using modern WordPress components.
Features
- Advanced Media Library Interface: Modern, intuitive interface built with WordPress components
- Enhanced Search & Filtering: Powerful search and filtering capabilities using
@wordpress/dataviews - Multiple View Types: Table, grid, and list views for different browsing preferences
- Bulk Operations: Efficiently manage multiple media items at once
- Responsive Design: Works seamlessly on desktop and mobile devices
- WordPress Standards: Built following WordPress coding standards and best practices
Requirements
- WordPress 6.0 or higher
- PHP 8.0 or higher
- Modern browser with JavaScript enabled
Installation
From Source
-
Clone or download this repository to your WordPress plugins directory:
cd wp-content/plugins/ git clone [repository-url] my-advanced-media-plugin -
Navigate to the plugin directory:
cd my-advanced-media-plugin -
Install PHP dependencies:
composer install --no-dev -
Install Node.js dependencies:
npm install -
Build the plugin assets:
npm run build -
Activate the plugin through the WordPress admin dashboard.
Development
Prerequisites
- Node.js 18.0 or higher
- npm 8.0 or higher
- Composer
- PHP 8.0 or higher
Setup
-
Clone the repository:
git clone [repository-url] my-advanced-media-plugin cd my-advanced-media-plugin -
Install dependencies:
composer install npm install -
Start the development server:
npm start
Available Scripts
npm start- Start development server with hot reloadnpm run build- Build production assetsnpm run lint:js- Lint JavaScript filesnpm run lint:css- Lint CSS/SCSS filesnpm run format- Format code using Prettiercomposer lint- Lint PHP files using PHPCScomposer lint:fix- Fix PHP code style issuescomposer test- Run PHP unit tests
Code Standards
This project follows WordPress coding standards:
- PHP: WordPress Coding Standards (WPCS)
- JavaScript: WordPress ESLint configuration
- CSS: WordPress Stylelint configuration
File Structure
my-advanced-media-plugin/
├── src/ # Source code
│ ├── components/ # React components
│ │ ├── AdvancedMediaLibrary.js
│ │ └── MediaDataViews.js
│ ├── Admin/ # Admin-related PHP classes
│ │ └── Admin.php
│ ├── Assets/ # Asset management classes
│ │ └── Assets.php
│ ├── Plugin.php # Main plugin class
│ ├── Activator.php # Plugin activation logic
│ ├── Deactivator.php # Plugin deactivation logic
│ ├── Uninstaller.php # Plugin uninstall logic
│ ├── index.js # JavaScript entry point
│ └── style.scss # Main styles
├── build/ # Built assets (generated)
├── languages/ # Translation files
├── assets/ # Static assets
├── tests/ # Unit tests
├── vendor/ # Composer dependencies (generated)
├── node_modules/ # Node dependencies (generated)
├── my-advanced-media-plugin.php # Main plugin file
├── composer.json # PHP dependencies
├── package.json # Node.js dependencies
├── phpcs.xml.dist # PHP CodeSniffer configuration
├── .eslintrc.js # ESLint configuration
├── .stylelintrc.json # Stylelint configuration
├── .gitignore # Git ignore rules
└── README.md # This file
Architecture
PHP Classes
- Plugin: Main plugin initialization and coordination
- Admin: Handles WordPress admin interface integration
- Assets: Manages JavaScript and CSS asset loading
- Activator/Deactivator/Uninstaller: Handle plugin lifecycle events
JavaScript Components
- AdvancedMediaLibrary: Main container component
- MediaDataViews: Implements the DataViews interface for media browsing
Key Technologies
- Frontend: React, WordPress Components, DataViews
- Backend: WordPress APIs, PHP 8.0+
- Build Tools: WordPress Scripts (Webpack, Babel, ESLint)
- Styling: SCSS with WordPress design system
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes following the coding standards
- Run tests and linting:
npm run lint:js && composer lint - Commit your changes:
git commit -am 'Add new feature' - Push to the branch:
git push origin feature/new-feature - Submit a pull request
Testing
JavaScript Tests
npm run test:unit
PHP Tests
composer test
E2E Tests
npm run test:e2e
License
GPL v2 or later - see the WordPress.org license page for details.
Support
For support, please create an issue in the GitHub repository.
Changelog
1.0.0
- Initial release
- Advanced media library interface
- DataViews integration
- Multiple view types (table, grid, list)
- Responsive design
- WordPress coding standards compliance