-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class-tkt-maintenance-public #17
Comments
leaving open for eventual feedback on 1a |
To make it a class is useless. It could be a function much easier. And if your plugin did anything with its options besides display, it would be a bad thing to manipulate them for output when retrieving. Since this is such a simple plugin, it probably works fine.
Yes, but. Using separate entries, it's best to provide the default to
OK, I couldn't tell by the name if it was a message the user would see or a standard. |
#16 will handle the remains of options concerns, and class architecture for this aspect |
There are some code formatting inconsistencies in here that make it more difficult to follow the code.
https://github.com/TukuToi/tkt-maintenance/blob/18c552f0089296be71e39d1c9521a61df0f6d6e1/public/class-tkt-maintenance-public.php#L92-L94
The way the options are handled is quite awkward. The options class doesn't help at all, and just makes it more difficult to read and use.
https://github.com/TukuToi/tkt-maintenance/blob/18c552f0089296be71e39d1c9521a61df0f6d6e1/public/class-tkt-maintenance-public.php#L92
This is not translated.
https://github.com/TukuToi/tkt-maintenance/blob/18c552f0089296be71e39d1c9521a61df0f6d6e1/public/class-tkt-maintenance-public.php#L134
Couldn't you spoof this with the login URL as a query on a real URL?
https://github.com/TukuToi/tkt-maintenance/blob/18c552f0089296be71e39d1c9521a61df0f6d6e1/public/class-tkt-maintenance-public.php#L171
Using
current_user_can()
with a role is highly discouraged. Would it even work right for multisite?Should this logic have some parentheses, or are you trying to use short-circuiting? If they aren't logged in, they can't be administrator.
Same with
maybe_run_maintenance_mode
The text was updated successfully, but these errors were encountered: