Skip to content

Refactor plugin to BizzDocMaker 2.0 with modern architecture, templates, and admin interface#45

Draft
Copilot wants to merge 5 commits into2.0.0.0from
copilot/refactor-wordpress-plugin-setup
Draft

Refactor plugin to BizzDocMaker 2.0 with modern architecture, templates, and admin interface#45
Copilot wants to merge 5 commits into2.0.0.0from
copilot/refactor-wordpress-plugin-setup

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 11, 2025

Complete modernization from "Post Classified for Docs" to production-ready documentation builder with PSR-4 architecture, multiple display templates, admin interface, and comprehensive security hardening.

Architecture

  • PSR-4 Autoloading: BizzDocMaker namespace with organized class structure (src/Admin, src/Frontend, src/Core)
  • Singleton pattern for plugin initialization
  • Template override system supporting theme-level customization
  • Backward compatible: Legacy [WPPCD_Post] shortcode and all attributes preserved

Features

Display Templates

Four responsive templates with consistent API:

  • List - Enhanced default vertical layout
  • Grid - Card-based responsive grid (1-4 columns)
  • Accordion - Collapsible sections with smooth animations
  • Table - Structured tabular format with dates

Admin Interface

  • Settings page with tabbed UI (general, display, advanced)
  • Dashboard widget showing post/category statistics
  • Welcome screen for onboarding
  • Enhanced meta box for post ordering

Shortcode API

New [bizzdocmaker] shortcode with extended attributes:

// Multiple templates
[bizzdocmaker template="grid" columns="3"]

// Enhanced display options
[bizzdocmaker show_count="on" show_description="on"]

// WooCommerce integration
[bizzdocmaker post_type="product" term_name="product_cat" template="grid"]

Security

  • Nonce verification on all form submissions
  • Capability checks (manage_options)
  • Input sanitization via sanitize_text_field(), absint()
  • Output escaping via esc_html(), esc_url(), esc_attr()
  • CodeQL scan: 0 vulnerabilities

Technical Changes

Requirements

  • PHP 7.0+ (was 5.6+)
  • WordPress 5.0+ (was 4.0+)

File Organization

src/
├── Admin/{Settings,MetaBox,Dashboard,Welcome}.php
├── Frontend/{Shortcode,Assets}.php
├── Core/PostTypes.php
└── {Autoloader,Plugin}.php

templates/{list,grid,accordion,table}/template.php
assets/{css,js}/{frontend,admin}.{css,js}

Hooks & Filters

// Query customization
apply_filters('bizzdocmaker_query_args', $args, $taxonomy_id, $atts);

// Post type support
apply_filters('bizzdocmaker_meta_box_post_types', $post_types);

// Lifecycle hooks
do_action('bizzdocmaker_loaded');

Documentation

  • English: User guide, README.md, readme.txt (WordPress.org)
  • Bengali: Developer guide, upgrade guide
  • CONTRIBUTING.md, CHANGELOG.md, LICENSE (GPL v2)

Migration

No database changes required. Text domain unchanged for translation compatibility. Legacy meta key wppcd_post_order_number migrated to bizzdocmaker_post_order via query args.

Original prompt

পুরো প্লাগিন ভালো করে পড়ে দেখবে। কারন এই প্লাগিনের সবকিছুই আমি পরিবর্তন করতে চাচ্ছি। আগের কোন কিছু রাখতে হবে এমন কোন কথা নেই। এটা একটা WordPress এর প্লাগিন। ইউজার নেই বললেই চলে। বাড়াতে হবে। ইউজারদের কে আকৃষ্ট করার মত কিছু করতে হবে।

প্লাগিনে একটা বড়সড় পরিবর্তন আনতে চাচ্ছি। তুমি সকল কিছু পরিবর্তন আনতে পারবে, এমন কি namespace ও পরিবর্ত্তন করতে পারবে। কোনো আটোলোডার ব্যবহার করলে ভালো হয়।

নিচে আমি যা চাচ্ছি তা একে একে দিচ্ছিঃ

  • প্রথমত প্লাগিনের নাম এবং উদ্দেশ্য চেঞ্জ করতে চাচ্ছি।
    প্লাগিনে নাম দেবোঃ BizzDocMaker - Documentation & Post List Builder
    পুরো প্লাগিনের সুন্দর বর্ননা সহ readme.txt file ঠিক করবে, অবশ্যই ইংলিশে। WordPress supported হতে হবে। তবে টেক্সট ডোমেইন হিসেবেঃ 'post-classified-for-docs' - এটা থাকবে। কারন প্লাগিনটি ওয়ার্ডপ্রেস রেপোসিটরিতে আছে।

  • প্লাগিনের সকল ফাইল গুলো সুন্দর করে রি-অর্গানাইজ করবে।

  • সকল ফাইল গুলোতে কোডিং স্ট্যান্ডার্ড মেনে কোড লিখবে।

  • সকল ফাইল গুলোতে প্রয়োজনীয় কমেন্টস যোগ করবে, যাতে করে ডেভেলোপাররা সহজে বুঝতে পারে। কোডের ভিতরের কমেন্টস গুলো ইংলিশে হবে।

  • অপ্রয়োজনিও সকল ফাইল মুছে ফেলতে হবে। যেটা অকাজের সেট্টা মুছে দেবে।

  • ডেভেলোপারের জন্য নির্দেশনামুলক সকল ডক বাংলায় লিখবে। সকল ডক help-doc ফোল্ডারের ভিতরে একটা ফাইল থাকবে।

  • প্লাগিনের জন্য সম্ভাব্য ভালো ভালো ফিচার যোগ করবে, যেগুলো দিয়ে ইউজার বাড়বে। তুমি তোমার মত করে ফিচার যোগ করবে, এবন সেগুল যেনো কাজ করে। তবে আমি কিছু সাজেশন দিচ্ছি, যেটা তোমার ভালো মনে হয় সেটা করবে। সাজেশনঃ
    User Interface:
    Admin settings page
    Dashboard widget
    Welcome screen
    Improved meta box
    Help system

Display Options:
Multiple templates (List, Grid, Accordion, Table)
Styling options
Content options
Template override system

এবং
Advanced Features:
Search এবং filter
Pagination systems
Sorting options
Custom fields support
Query builder

  • মনে রাখবে, Design যেনো সুন্দর হয় ডাসবোর্ডের। এবং ফ্রন্টএন্ডে।
  • প্লাগিনের পারফরমেন্স অপটিমাইজ করবে। যেনো দ্রুত লোড হয়।
  • প্লাগিনের সিকিউরিটি নিশ্চিত করবে। যেনো কোনো ঝুঁকি না থাকে।
  • প্লাগিনের কম্প্যাটিবিলিটি নিশ্চিত করবে সর্বশেষ WordPress ভার্সনের সাথে।
  • প্লাগিনের জন্য ইউনিট টেস্ট যোগ করবে। যাতে করে কোডের গুণমান বজায় থাকে।
  • প্লাগিনের জন্য একটা ভালো সাপোর্ট সিস্টেম যোগ করবে। যাতে করে ইউজাররা সহজে সাহায্য পেতে পারে।
  • প্লাগিনের জন্য একটা ভালো ডকুমেন্টেশন তৈরি করবে। যাতে করে ডেভেলোপাররা সহজে বুঝতে পারে প্লাগিনটি কিভাবে কাজ করে।
  • প্লাগিনের জন্য একটা ভালো মার্কেটিং স্ট্রাটেজি তৈরি করবে। যাতে করে ইউজাররা আকৃষ্ট হয়।
  • প্লাগিনের জন্য একটা ভালো ইউজার গাইড তৈরি করবে। যাতে করে ইউজাররা সহজে বুঝতে পারে কিভাবে প্লাগিনটি ব্যবহার করতে হয়।

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 4 commits November 11, 2025 13:17
…tation

Co-authored-by: codersaiful <6463919+codersaiful@users.noreply.github.com>
Co-authored-by: codersaiful <6463919+codersaiful@users.noreply.github.com>
…pgrade guide

Co-authored-by: codersaiful <6463919+codersaiful@users.noreply.github.com>
Co-authored-by: codersaiful <6463919+codersaiful@users.noreply.github.com>
Copilot AI changed the title [WIP] Refactor WordPress plugin and update namespaces Refactor plugin to BizzDocMaker 2.0 with modern architecture, templates, and admin interface Nov 11, 2025
Copilot AI requested a review from codersaiful November 11, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants