Skip to content
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

Delete Taxonomy Terms - Based on postfix and prefix #178

Closed
4 of 5 tasks
sudar opened this issue Dec 31, 2017 · 17 comments
Closed
4 of 5 tasks

Delete Taxonomy Terms - Based on postfix and prefix #178

sudar opened this issue Dec 31, 2017 · 17 comments
Labels
Milestone

Comments

@sudar
Copy link
Owner

sudar commented Dec 31, 2017

  • Create a new Delete Terms page.
  • Ability to choose a taxonomy
  • Ability to choose terms. Use the following format Delete terms that |select| with |textbox| (equal to, not equal to, starts with, ends with, contains, non contains)
  • Filter: Only if it doesn't contain any post
  • Change name to 'Delete Taxonomy Terms by Name'
@sudar sudar added this to the 5.8 milestone Dec 31, 2017
@sudar sudar added Next Sprint Workflow Label: Should be done by next Sprint feature labels Dec 31, 2017
@sudar sudar added Current Sprint Workflow Label: Should be done this sprint and removed Next Sprint Workflow Label: Should be done by next Sprint labels May 18, 2018
rajanvijayan added a commit that referenced this issue May 30, 2018
@ghost ghost added In Progress Workflow Label: Current in progress and removed Current Sprint Workflow Label: Should be done this sprint labels May 30, 2018
rajanvijayan added a commit that referenced this issue May 30, 2018
rajanvijayan added a commit that referenced this issue Jun 4, 2018
Add Module for delete term by count
Fix #178
@rajanvijayan
Copy link
Contributor

  1. Could not filter terms by not equal to, starts with, ends with and non-contains options
  2. Could not filter by Only if it doesn't contain any post

@mariadanieldeepak
Copy link
Collaborator

@rajanit2000,

The following WPSE answer should help you progress this issue.
https://wordpress.stackexchange.com/a/178518/83739

Let us know if you're able to make some progress.

@mariadanieldeepak
Copy link
Collaborator

@rajanit2000,

I'm afraid that the code isn't doing the expected.

image

The following should delete only two tags from the above setup. But looking at the result above, it deleted all three.

image

rajanvijayan added a commit that referenced this issue Jul 28, 2018
@rajanvijayan
Copy link
Contributor

image

@mariadanieldeepak Its working fine for me, Can you please explain what is the issue, Please refer the screenshot

rajanvijayan added a commit that referenced this issue Jul 28, 2018
@mariadanieldeepak
Copy link
Collaborator

@rajanit2000 What's your deletion criteria? I couldn't see any information on that.

rajanvijayan added a commit that referenced this issue Jul 30, 2018
rajanvijayan added a commit that referenced this issue Jul 31, 2018
rajanvijayan added a commit that referenced this issue Jul 31, 2018
@rajanvijayan
Copy link
Contributor

image

image

@mariadanieldeepak this issue fixed

@rajanvijayan
Copy link
Contributor

In previous i have check only include term ids in TermQuery, Now i check include and exclude term ids

$term_id = $this->get_term_id_by_name( $options['term_text'], $options['term_opt'], $term->term_id, count( $posts ) );
if ( ! empty( $term_id ) ) {
	$term_ids['include'][] = $term->term_id;
} else {
	$term_ids['exclude'][] = $term->term_id;
}

rajanvijayan added a commit that referenced this issue Jul 31, 2018
@mariadanieldeepak
Copy link
Collaborator

@rajanit2000,

Looking at your deletion criteria above, no tags should be deleted. Could you please retest and let us know?

@rajanvijayan
Copy link
Contributor

@mariadanieldeepak Sorry above screenshot is taken by mistake

Here new one, Its working fine

image

image

rajanvijayan added a commit that referenced this issue Aug 1, 2018
The method delete_terms_by_id uses an else expression. Else is never necessary and you can simplify the code to work without else.
Fix #178
rajanvijayan added a commit that referenced this issue Aug 1, 2018
rajanvijayan added a commit that referenced this issue Aug 2, 2018
rajanvijayan added a commit that referenced this issue Aug 3, 2018
rajanvijayan added a commit that referenced this issue Aug 3, 2018
rajanvijayan added a commit that referenced this issue Aug 3, 2018
rajanvijayan added a commit that referenced this issue Aug 3, 2018
Add explicit query for Delete term by name test case
Fix #178
sudar pushed a commit that referenced this issue Aug 12, 2018
The following modules are added along with their tests

- DeleteTermsByName
- DeleteTermsByPostCount

Fix #19 
Fix #176 
Fix #177 
Fix #178
Fix #348
Fix #349
@ghost ghost removed the In Progress Workflow Label: Current in progress label Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants