Call require_once form admin page with checkbox

I achieved my goal by doing an option check like so, which conditionally loads the various functions in module_2.php, in my main plugin file: // If the checkbox is checked, load module_2.php. if ( get_option( ‘my_checkbox_option’ ) ) { require_once MY_MODULES_PATH . ‘module_2.php’; }

Give admin_menu permission to specific users

To grant access to the menu for users with Editor role, in place of manage_options use publish_pages as the capability. To be able to guide you in the future, use the breakdown of capabilities listed in this page below. Pick a capability that is present only in the roles you’re targeting. https://wordpress.org/support/article/roles-and-capabilities/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)