ASP Syllabus
A modern, high-performance WordPress plugin for creating and managing multiple syllabus tables with PDF download and view functionality.
by Tanvir Rana Rabbi · github.com/tararauzumaki/asp-syllabus · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/tararauzumaki/asp-syllabus/archive/refs/heads/main.zipA modern, high-performance WordPress plugin for creating and managing multiple syllabus tables with PDF download and view functionality.
📋 Features
- Multiple Independent Tables: Create unlimited syllabus tables, each with a unique shortcode
- Modern Admin UI: Clean, card-based interface with drag-and-drop row sorting
- PDF Management: Easy PDF upload for download and view buttons using WordPress Media Library
- Responsive Design: Mobile-friendly tables that adapt to any screen size
- Performance Optimized: Conditional asset loading - CSS/JS only loads when shortcode is present
- Security First: All inputs sanitized, all outputs escaped, proper nonce verification
- Shortcode Ready: Simple shortcode system for embedding tables anywhere
🎯 Use Cases
- Educational institutions managing course syllabi
- Training centers organizing class materials
- Organizations distributing curriculum documents
- Any site needing structured PDF distribution tables
🚀 Installation
Method 1: Manual Installation
- Download the plugin folder
- Upload to
/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to ASP Syllabus in the admin menu
Method 2: ZIP Upload
- Compress the plugin folder into a
.zipfile - Go to WordPress Admin → Plugins → Add New → Upload Plugin
- Upload the ZIP file and click "Install Now"
- Activate the plugin
📖 Usage
Creating a Syllabus Table
- Go to ASP Syllabus → Add New Table
- Enter a Table Title (this will be the main heading on the frontend)
- Click Add New Row to add data rows
- Fill in the fields for each row:
- Category: Subject category or topic name
- Class: Class name or level
- Download PDF: Upload a PDF file for downloading
- View PDF: Upload a PDF file for viewing in browser
- Drag and drop rows to reorder them
- Click Publish to save the table
Using the Shortcode
After publishing, you'll see a shortcode in the sidebar:
[asp_syllabus id="5"]
Copy and paste this shortcode into any:
- Post
- Page
- Widget (if your theme supports shortcodes in widgets)
- Custom post type
Managing Tables
- Edit: Click on any table to modify its content
- Delete: Move to trash from the tables list
- Reorder Rows: Drag rows by the handle icon in the admin panel
- Remove Rows: Click the trash icon on any row
🎨 Frontend Display
The plugin renders a beautiful, responsive table with:
- Header: Dark gray background (#5a6268) with white text
- Download Button: Blue button that triggers PDF download
- View Button: Blue button that opens PDF in a new tab
- Mobile Responsive: Stacks into cards on mobile devices
- Hover Effects: Smooth transitions and visual feedback
🛠️ Technical Details
File Structure
asp-syllabus/
├── asp-syllabus.php # Main plugin file
├── assets/
│ ├── css/
│ │ ├── admin.css # Admin panel styles
│ │ └── frontend.css # Frontend table styles
│ └── js/
│ └── admin.js # Admin functionality
└── README.md # This file
Custom Post Type
- Post Type:
asp_syllabus_table - Supports: Title only
- Public: No (admin only)
- Menu Icon:
dashicons-list-view
Data Storage
Row data is stored as a JSON array in post meta:
- Meta Key:
_asp_syllabus_rows - Structure: Array of objects containing category, class, download_pdf, and view_pdf fields
Hooks & Filters
The plugin uses standard WordPress hooks:
init- Register custom post typeadd_meta_boxes- Add meta boxessave_post- Save meta box dataadmin_enqueue_scripts- Load admin assetswp_enqueue_scripts- Conditionally load frontend assets
🔒 Security Features
- ✅ Nonce verification on all form submissions
- ✅ Capability checks for user permissions
- ✅ Input sanitization using
sanitize_text_field()andesc_url_raw() - ✅ Output escaping using
esc_html(),esc_attr(), andesc_url() - ✅ Direct file access prevention
- ✅ SQL injection prevention through WordPress APIs
⚡ Performance Features
- Conditional Loading: Assets only load on pages with the shortcode
- Minification Ready: CSS and JS files are structured for easy minification
- Database Optimized: Single meta key stores all row data
- No External Dependencies: Uses native WordPress and jQuery UI
🎨 Customization
Styling
You can customize the appearance by adding CSS to your theme:
/* Custom button colors */
.asp-btn-download {
background: #your-color !important;
}
/* Custom table header */
.asp-syllabus-table thead {
background: #your-color !important;
}
Button Text
Modify button labels using WordPress translation filters or directly in the shortcode handler.
🌐 Browser Support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Mobile)
📱 Mobile Responsive
The table automatically adapts to mobile devices:
- Desktop: Traditional table layout
- Tablet: Scrollable table
- Mobile: Stacked card layout with labels
🤝 Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📝 Changelog
Version 1.0.3
- Added fully customizable table headers - define your own column names
- Permanent "Download" column with PDF upload functionality (download and view buttons)
- Added table preview feature to see frontend appearance before publishing
- Added shortcode column to admin listing page for easy copying
- Improved flexibility - minimum 1 custom column required (Download column auto-added)
- Enhanced admin interface with drag-and-drop column reordering
- Fixed class structure and improved code organization
Version 1.0.2
- Fixed "Add New Row" button functionality with proper template placeholder handling
- Improved table header readability with darker background color (#343a40)
- Added left text alignment for table content to match header style
- Enhanced mobile responsiveness - tables now remain in table format with horizontal scrolling instead of card layout
- Optimized button sizes and spacing for mobile devices
Version 1.0.0
- Initial release
- Custom post type for syllabus tables
- Repeater field functionality
- WordPress media uploader integration
- Drag-and-drop row sorting
- Responsive frontend table
- Conditional asset loading
- Complete sanitization and escaping
👤 Author
Tanvir Rana Rabbi
📄 License
This plugin is licensed under the GPL v2 or later.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
🐛 Support
For bug reports and feature requests, please use the GitHub Issues page.
⭐ Show Your Support
If this plugin helped you, please give it a ⭐ on GitHub!
Made with ❤️ for the WordPress community