Skip to content

Releases: jazir555/Add-Settings-Links

v9

Choose a tag to compare

@jazir555 jazir555 released this 31 Dec 02:57
ac2b3ce

Major bugs squashed. Updates to the JS, CSS and PHP.

Add Settings Links V8

Choose a tag to compare

@jazir555 jazir555 released this 31 Dec 02:03
fb23fda

Another massive refactor with too many additions and changes to list right now, will go back and update this description later with a changelog

Add Settings Links V7

Choose a tag to compare

@jazir555 jazir555 released this 31 Dec 01:06
caf56cc

Moved function definitions into a better order, and SQL query corrections

Add Settings Links V6

Choose a tag to compare

@jazir555 jazir555 released this 30 Dec 04:57
15e631f

Massive refactor with many new features and additions

Core Improvements

Dynamic Settings Detection

Introduced multiple strategies for detecting settings links for plugins:

Scanning admin menus for known patterns (add_menu_page, add_options_page, etc.).

Analyzing the options table for settings-related entries.

Inspecting registered hooks (admin_menu, admin_init, etc.) for settings callbacks.

Support for Multisite

Ensured the plugin works seamlessly across multisite installations:

Scoped transient keys to individual sites.

Provided settings link detection in both single-site and network admin contexts.

Caching Mechanism

Implemented transient caching for:

Admin menu slugs (ASL_MENU_SLUGS_TRANSIENT) with a 12-hour expiration.

Plugin data (ASL_CACHED_PLUGINS_TRANSIENT) with a 24-hour expiration.

Reduced redundant database queries and file scans to improve performance.

Manual Overrides

Added functionality for users to manually specify settings links for plugins with unconventional or multiple settings pages.

Provided an admin interface to input and manage manual overrides.

Admin Interface Enhancements

Dropdown for Multiple Settings Links:

Introduced an accessible dropdown menu in the plugins list for plugins with multiple detected settings links.

Admin Page for Plugin Settings:

Created a dedicated settings page under "Settings" for managing overrides and plugin-specific configurations.

Used forms with proper nonce verification for secure input handling.

User Feedback Mechanisms

Displayed admin notices for plugins missing recognized settings links.

Included descriptions and placeholders in admin fields to guide users.

Searchable Plugin List

Added a search input for filtering the plugins table in the manual overrides settings page.

Security Enhancements

Data Validation and Sanitization

Validated URLs using filter_var and regex to ensure valid admin URLs.

Sanitized and escaped all user inputs (sanitize_text_field, esc_attr, esc_url_raw) to prevent XSS vulnerabilities.

Nonce Verification

Enforced nonce checks for all form submissions to prevent CSRF attacks.

Settings Link Validation

Restricted settings links to known admin pages (admin.php, options-general.php) using filters and regex.

Debugging and Error Handling

Improved Debugging

Reflection-based method analysis.

Admin menu slug caching processes.

Plugin file analysis and transient caching.

Added context to logs (e.g., site ID for multisite environments).

Error Fallbacks

Safeguarded against missing files, reflection exceptions, and invalid plugin data with robust error handling.

Optimization

Performance

Optimized file and directory scanning to exclude unnecessary files (e.g., vendor directories).

Cached results of expensive operations like file analysis and plugin list retrieval.

Reduced Overhead

Limited database queries by efficiently caching plugin data and detected settings links.

i18n and Multilingual Support

Initial translation support

Added text domain support for all user-facing strings.

Localized settings-related terms in 4 languages. Other languages will be added in the future.

Bug Fixes

Fixed Reflection Handling

Addressed potential errors when analyzing plugin methods using reflection, ensuring compatibility with different plugin structures.

Resolved Duplicate Links

Checked for and avoided adding duplicate settings links in the plugin action menu.

Corrected Admin Menu Handling

Adjusted menu and submenu scanning logic to account for edge cases with unconventional admin menu structures.

Features Added

Comprehensive Settings Detection

Combined multiple strategies to detect settings pages with greater accuracy.

Aggregated Notices

Displayed an aggregated warning for plugins missing recognized settings links, guiding users to manually add overrides.

Customizable Synonyms

Allowed customization of recognized "settings-like" terms via filters for better detection in diverse languages.

Add Settings Links V4

Choose a tag to compare

@jazir555 jazir555 released this 30 Dec 01:42
c792608

Tons of bug fixes, made the regex slug detection much more robust, added multi-site support, significantly expanded the flexibility for detecting plugin links, improved the settings links management page

V3

V3

Choose a tag to compare

@jazir555 jazir555 released this 06 Nov 09:03
4453871

Lots of bug fixes implemented.

V2

V2

Choose a tag to compare

@jazir555 jazir555 released this 06 Nov 01:53
e6d9803

Much improved v2

V1

V1

Choose a tag to compare

@jazir555 jazir555 released this 06 Aug 06:53
7eedcaf

V1 of the script, known bugs are that it does not currently detect plugin links under tools or the users menu, the added links on the plugins page do not redirect to the respective plugin's settings panel.