-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Introduce settings page and more options #111
Conversation
The backview of the dashboard widget has been reduced to widget settings and the complete list of settings aloing with short descriptions have been moved into a new settinge page.
Added three options to not skip tracking. preview, trackback, 404 and robots are still hardcoded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite good. I've just added a commit fixing the text domain and changing some of the descriptions. I'm wondering whether the settings title can be put into <label>
for the corresponding input
s - add_settings_field
doesn't seem to have an option for that. WP seems to do that on the WP settings pages (except for checkboxes).
Maybe the "skip tracking" options could be displayed as the options on the WP "Discussion" settings page.
With an additional argument on the add_settings_field() call the given titles are wrapped in <label> tags. Removed the duplicated title attributes in favor of this feature.
Sure it does: https://developer.wordpress.org/reference/functions/add_settings_field/
Didn't know that until 5 minutes ago, but it obviously works, see latest commit 😃 |
For consistency do not rely on core translation for these words and add the custom textdomain "statify".
Not every user who can see stats should be able to configure every setting and probably not even edit the widget itself. Separated the permissions required to limit access to new options and potentially allow more flexible granting filters.
The admin menu is yet limited to the statify/inc/class-statify-settings.php Lines 289 to 295 in a2b5330
I separated the 3 possible permissions:
|
This PR covers multiple issues and improvements. Feel free to edit or add.
Most significant change is the introduction of a new settings page. The widget backview is reduced to the two widget-related options (about top lists). I added a link to jump directly to the new page to not annoy existing users that are used to the old config panel.
Second I introduced three new checkboxes to control the
skip_tracking
behavior. I added the existing blacklist option to this group alongside with "logged in users", "feed" and "search". This partially covers #103, however the remaining options are not controllable yet. Might be combined with @2ndkauboy's solution to allow total control for pro users.Especially the user agent filter with the RegEx might be suitable to configure here, but this is more of and advanced feature and not that easy to understand.
With the new page, the role filter (#106) can be integrated smoothly.
PR #72 is somewhat obsoleted or has to be adapted to the new method.
Finally two screenshots of the results:

