I’m experimenting with creating a function to write code into htaccess (I understand the security issues associated). I’m currently using the function insert_with_markers() as a starting point however its throwing a ‘call to undefined function’ error.
I am using it within a function that is only running whilst logged into the Admin Dashboard.
I understand that the function if found in the file: wp-admin/includes/misc.php but I made the assumption that this file is loaded whilst within the Admin Dashboard anyway, so I don’t need to include it?
If I manually include the file, the function runs correctly.
My question is: does the wp-admin/includes/misc.php file not get loaded by default when logged in to the Dashboard? Or is it only loaded in certain cirumstances?