custom-post-type-ui icon indicating copy to clipboard operation
custom-post-type-ui copied to clipboard

Feature Request - Add delete link/option to the 'Registered Types/Taxes' list

Open garretthyder opened this issue 7 years ago • 16 comments

Hello,

Just wanted to request the delete functionality be exposed on the 'Registered Types/Taxes' list here with the 'Edit' and 'Get code' links; https://i.imgur.com/WId2AV1.png

Thanks

garretthyder avatar Feb 21 '18 19:02 garretthyder

This one I'm a bit less convinced with, as at least in my mind, those are just quick links to other areas in our supplied admin, and not so much an instant destructive action.

tw2113 avatar Feb 22 '18 04:02 tw2113

Thanks Michael, in my opinion I'd find the function being exposed there as very helpful as it would reduce the amount of clicks to accomplish the task especially if you have numerous to remove. Cheers

garretthyder avatar Feb 23 '18 01:02 garretthyder

Related https://github.com/WebDevStudios/custom-post-type-ui/issues/515

tw2113 avatar Feb 23 '18 01:02 tw2113

  1. Would need a nonce
  2. Should get a popup prompt confirmation.
  3. Possibly an inline icon related to deleting somehow to add extra warning.

Beyond that, I'm willing to roll with this one at this point.

tw2113 avatar Jan 07 '20 02:01 tw2113

Sorry, going to bump this one to a later release.

tw2113 avatar Aug 14 '20 03:08 tw2113

https://developer.wordpress.org/reference/functions/wp_nonce_url/

tw2113 avatar May 17 '22 21:05 tw2113

@iamahless Did you get started with this one at all? or did it get stalled due to other things coming up? Asking because I am curious what you have done as compared to @alokstha1 and if there's any overlap going on.

tw2113 avatar Jul 19 '22 01:07 tw2113

@tw2113 I believe @iamahless is busy with other things. So, I took over. I'll push the progress probably by the end of the day or tomorrow.

alokstha1 avatar Jul 19 '22 08:07 alokstha1

@alokstha1 has anything been done with this one yet, or is it still pending any work? Asking because I may take it on myself since I want it part of the 1.13.0 release.

tw2113 avatar Aug 01 '22 21:08 tw2113

Bumping this to 1.14.0 as i want to get what we have so far and also a new reported issue out the door

tw2113 avatar Sep 06 '22 14:09 tw2113

Everything being done in the 687-add-delete-link branch

tw2113 avatar Sep 19 '22 15:09 tw2113

Due to how I'm picturing #891 going, this may actually become a key component in that, and needed.

We'll want to make sure that deleting in this fashion will NOT do any writing to the local JSON files from #891, so that we don't require restoring backups or resetting those files back to previous commits.

tw2113 avatar Sep 23 '22 15:09 tw2113

Sorry Alok, but I moved everything to 687-add-delete-link-two branch. Keeping what I can for your contributions, but ended up changing direction a fair amount.

This branch still needs to add modal popup confirmation for deleting.

It also needs to be tested with #891 to to help make sure that we're not deleting the JSON file when deleting in this method. I think as is we would be. We may need a flag inside cptui_delete_post_type and cptui_delete_taxonomy to prevent deleting, somehow. TBD.

tw2113 avatar Sep 27 '22 23:09 tw2113

Hey @garretthyder Would love for a touch of extra testing from you if you're willing. Below is a link to a release build that should be install-ready with the current state of this release functionality in place.

custom-post-type-ui-687.zip

tw2113 avatar Sep 29 '22 22:09 tw2113

Sure thing @tw2113 give me the weekend here.

garretthyder avatar Sep 30 '22 00:09 garretthyder

Hey @garretthyder Sorry for sort of "falling off the radar" here, it was all vacation time I promise :D

Did you have a chance to test this feature out at all?

tw2113 avatar Oct 12 '22 19:10 tw2113

Going to close this task as finished, as it's been merged into the branch for Local JSON integration, which is still slated for 1.14.0 as well.

tw2113 avatar Oct 26 '22 17:10 tw2113

Sorry @tw2113 I did the same, hope you enjoyed yours. We got to the artic circle to see Polar Bears in Churchill.

Got a chance to review, code looked good. Tested well too. Only comments are minor improvements that can be future iterations.

  1. On the table 'Delete' it would be nice to mark it red to match the wp convention for a potentially dangerous action; #b32d2e See other row tables in wp that use trash/delete. Screen Shot 2022-10-26 at 3 37 36 PM

  2. Similar on the Edit screen the Delete button might do with being marked red or made into a link to match WP convention. Screen Shot 2022-10-26 at 3 26 57 PM

  3. Notices should end in periods to make them sentences. Screen Shot 2022-10-26 at 3 27 46 PM

Everything works great though, those are all just minor aesthetics.

All the best

garretthyder avatar Oct 26 '22 22:10 garretthyder

Noted and definitely good feedback. Thanks.

Sounds like that was a wonderful trip too!

tw2113 avatar Oct 26 '22 23:10 tw2113

touched up the link color and the punctuation in the 891-local-json branch

tw2113 avatar Oct 31 '22 16:10 tw2113

Thanks @tw2113

garretthyder avatar Oct 31 '22 20:10 garretthyder