joppuyo / acf-image-aspect-ratio-crop

Image Aspect Ratio Crop field for Advanced Custom Fields
https://wordpress.org/plugins/acf-image-aspect-ratio-crop/
GNU General Public License v2.0
106 stars 16 forks source link

Missing Parent Slug in 'add_submenu_page' Function #127

Closed YanisDeplazes closed 1 year ago

YanisDeplazes commented 1 year ago

Hello,

I've recently encountered a problem with the 'add_submenu_page' function in the plugin. It seems to be missing the required $parent_slug parameter. This issue has been causing compatibility problems with WordPress 6.2 and PHP 8.2.

Specifically, the function is currently being called with null for the $parent_slug. This results in the plugin not appearing correctly in the admin dashboard menu.

To address this issue, I've submitted a pull request with a proposed fix. The pull request updates the $parent_slug parameter from null to 'options-general.php'. This places the "ACF Image Aspect Ratio Crop" submenu under the "Settings" menu in the WordPress admin dashboard, and it loads the plugin's settings page when clicked.

I've linked the pull request here for your reference.

Please let me know your thoughts and if any further changes are needed.

Best regards, Yanis

joppuyo commented 1 year ago

Hey! Thanks for PR. I will try to look over it during this week.

joppuyo commented 1 year ago

Fixed in v6.0.3, released in the WordPress plugin directory.