- Description
- Features
- Installation Instructions
- Custom Fields Implementation
- Documentation Considerations
This WordPress plugin is built on Bedrock and uses Composer and for version control and Sage 10 for templating. Allows users to add and display custom fields on the front end of WordPress posts. It implements custom text, date, and image fields with user-friendly customization options for a course summary card.
- Custom fields for posts (text, date, image).
- Front-end display of custom fields with custom post type.
- User customization option for round and squared style elements.
- User customization option for date format.
- Download the plugin file from the repository's /Plugins symlinked folder.
- Upload the plugin folder to
/wp-content/plugins/
in your WordPress installation. - Activate the plugin through the 'Plugins' menu in WordPress.
- Duration (Date)
- Methodology Icon (Image)
- Methodology (Select)
- Course Summary (Text)
- Border Style
- Price (Number)
- Rounded borders + Absolute date format + button configuration.
- Squared Borders + Relative Date format + Removed Button
- The plugin implements custom fields for displaying images, dates, and text.
- The border style field offers the choice of rounded or unrounded edges.
- Date fields allow users to select from different date formats and use different date formats.
- Source and Plugin Version Control: Utilized Bedrock with Sage 10 and Composer for clean and maintainable source and plugin control and strict, modern configuration access control.
- WordPress Theme Customizations: Used a Child Theme to ensure customizations remain intact after theme updates.
- Plugin Repository Independence: Employed symbolic link structure to separate concerns of plugins, themes, and their host WordPress installations. This enables compatibility testing and cleaner repository creation.
- WordPress Theme Customizations: Used a Child Theme to ensure customizations remain intact after theme updates.
- Plugin Repository Independence: Employed symbolic links to make the plugin repository independent of specific websites.
- Choice of Tools: Avoided tools like Advanced Custom Fields and Custom Post Type UI plugins in favour of a manual approach.
- Plugin Implementation: Implemented as a Must-Use plugin to separate it from the theme and load it early during WordPress initialization.
- Input Sanitization: Sanitized the text fields to prevent script-injection.
- File Access Control: Employed absolute path checks to restrict PHP file access within to WordPress.
- Security Measures: Used nonce's to prevent cross-site request forgery attacks.
- Script Injection Security: Utilized
esc_attr()
andesc_html()
functions to escape attributes and HTML text for better security, in addition to input sanitization, reducing the risk of XSS (Cross-Site Scripting) vulnerabilities. - Translation Accessibility: Used translation functions (
esc_html_e()
) instead ofecho
, enabling translation plugin support to improve accessibility. - Code Readability: I've formatted and split the codebase into multiple files according to WordPress best practices for streamlined collaboration.