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

Add parent slug to add_submenu_page function #126

Closed YanisDeplazes closed 1 year ago

YanisDeplazes commented 1 year ago

This commit fixes an issue where the 'add_submenu_page' function was missing the required '$parent_slug' parameter. Previously, the function was called with 'null' for the '$parent_slug', which was causing issues in WordPress 6.2 and PHP 8.2.

The solution implemented is to use 'options-general.php' as the parent slug. This places the "ACF Image Aspect Ratio

YanisDeplazes commented 1 year ago

Hello,

I've noticed a problem with the 'add_submenu_page' function, where it was missing the required $parent_slug parameter. This issue was causing compatibility problems with WordPress 6.2 and PHP 8.2.

The problem lies in the fact that the function was being called with null for the $parent_slug, which is not the expected behavior.

To fix this, I've updated the $parent_slug parameter from null to 'options-general.php'. This change places the "ACF Image Aspect Ratio Crop" submenu under the "Settings" menu in the WordPress admin dashboard. Now, when users click on this submenu, it loads the plugin's settings page as expected.

This pull request includes the changes needed to address this issue. Please let me know if there are any questions or additional changes needed.

Best regards, Yanis

joppuyo commented 1 year ago

Thanks for the PR, I will release a new version that contains this fix hopefully later today