-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add a notice to the edit screen if ads.txt already exists on the server #19
Conversation
Hi! Thanks for the PR. A couple of notes from a first look:
|
f017f53
to
5ce8416
Compare
In the case of VIP, you would be better checking for a VIP environment and if found, bypassing the check, as it wouldn't make a lot of sense to do in a VIP context As for |
My only thought now that the check is in JS is whether we should attempt to cache the result in a cookie for some amount of time so it's not performing the JS check on every load of the ads.txt admin page. |
It would only be doing the check on that page, so it's up to you |
Alright then I think this is ready for another review. Not sure if that's @helen or who should be looking at that. Happy to make any further changes. |
I've no further opinions on the matter |
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.
requested some changes
Hey @kkoppenhaver - thank you for your contribution, this seems like a great user experience improvement for admins who may not realize the already have the ads.txt file. I left some feedback on the PR (sorry for the long delay in getting back to you). Do you think you will have time to work on addressing my feedback sometime soon, or would like some assistance getting this over the finish line? |
@adamsilverstein Thanks for the feedback. I should be able to take a look early next week. |
@adamsilverstein I think that should take care of everything you've raised. I've run it through testing of various scenarios locally and the check is performing as expected. |
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.
@kkoppenhaver This works great, thanks for keeping at it! I left a few small code suggestions and I would like to have @helen review the copy here, otherwise this is ready to go!
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.
Fantastic.
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.
Marking as needs changes but from me, just tweaking the notice language.
inc/admin.php
Outdated
|
||
<div class="notice notice-error adstxt-notice existing-adstxt" style="display: none;"> | ||
<p><strong><?php echo esc_html_e( 'Existing Ads.txt file found', 'ads-txt' ); ?></strong></p> | ||
<p><?php echo esc_html_e( 'You will need to rename or remove the existing ads.txt file before you will be able to see any changes you make to ads.txt inside the WordPress admin.', 'ads-txt' ); ?></p> |
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.
I would like for this to say something about why there's a difference between an actual file and what this plugin is doing, because I don't think that's very clear to most people. I'll think on exact language.
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.
How about something like:
We detected a hard coded
ads.txt
file on your site. This file takes precedence over the plugin, preventing it from working correctly. Please remove this file to useAds-txt
.
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.
I added a spinner for visual feedback and massaged the messaging and I think we're good to go for this release. We will probably want to rethink the actual detection approach here (again) at some point given #26 or maybe use a specific query arg name that we detect but I don't want to let this languish forever :)
Because I didn't notice the branch on #19 :(
Addresses #16
When the presence of an existing
ads.txt
is detected, display a notification on the edit screen.