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

178 feature/delete terms by postfix prefix #332

Merged
merged 89 commits into from
Aug 12, 2018

Conversation

rajanvijayan
Copy link
Contributor

@rajanvijayan rajanvijayan commented May 31, 2018

Has code for the following issues.

Fix #177
Fix #348
Fix #178
Fix #349

Delete Terms based on Post Count

  • Fix all test case issues for Delete Terms based on Post count. Add additional terms that should not be deleted.
  • Add tests to check deletion of terms from custom taxonomy

Delete Terms based on Name

  • Add test cases to verify deletion of terms based on prefix or postfix.
  • Add tests to check deletion of terms from custom taxonomy

@ghost ghost assigned rajanvijayan May 31, 2018
@ghost ghost added the In Progress Workflow Label: Current in progress label May 31, 2018
@rajanvijayan rajanvijayan requested a review from sudar May 31, 2018 02:52
@rajanvijayan
Copy link
Contributor Author

@sudar this PR have two issues #177 and #178
Its ready to review

@ghost ghost assigned sudar Jun 27, 2018
$this->meta_box_slug = 'bd_by_post_count';
$this->action = 'delete_terms_by_post_count';
$this->cron_hook = 'do-bulk-delete-term-post-count';
$this->scheduler_url = 'http://bulkwp.com/addons/scheduler-for-deleting-posts-by-category/?utm_source=wpadmin&utm_campaign=BulkDelete&utm_medium=buynow&utm_content=bd-sc';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This url is wrong. Change it to an empty string.

$overview_tab = array(
'title' => __( 'Overview', 'bulk-delete' ),
'id' => 'overview_tab',
'content' => '<p>' . __( 'This screen contains different modules that allows you to delete posts or schedule them for deletion.', 'bulk-delete' ) . '</p>',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description is wrong.

Change it to

This screen contains different modules that allows you to delete terms from taxonomies

$this->field_slug = 'by_post_count';
$this->meta_box_slug = 'bd_by_post_count';
$this->action = 'delete_terms_by_post_count';
$this->cron_hook = 'do-bulk-delete-term-post-count';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to do-bulk-delete-term-by-post-count

protected function initialize() {
$this->item_type = 'terms';
$this->field_slug = 'by_post_count';
$this->meta_box_slug = 'bd_by_post_count';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to bd_delete_terms_by_post_count

class DeleteTermsByPostCountModule extends TermsModule {
protected function initialize() {
$this->item_type = 'terms';
$this->field_slug = 'by_post_count';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to terms_by_post_count

class DeleteTermsByPostfixAndPrefixModule extends TermsModule {
protected function initialize() {
$this->item_type = 'terms';
$this->field_slug = 'by_name';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do all the changes that I have specified in the DeleteTermsByPostCountModule


<table class="optiontable">
<?php
// $this->render_have_post_settings(); // TODO
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove commented code.

break;

case 'starts':
$term_ids = $this->bd_term_starts( $term_text , $options );
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove bd_ prefix from all the methods.

return $count;
}

protected function bd_starts_with($haystack, $needle){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write phpdoc for all the helper functions.

*
* @return array Result array
*/
function bd_term_query( $options, $taxonomy ) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this function to TermsModule class.

@sudar
Copy link
Owner

sudar commented Jun 27, 2018

@rajanit2000

I have left a couple of review comments for this branch.

I have also merged latest dev/6.0.0 into this branch, so you may have to pull in the latest code first.

@sudar sudar removed their assignment Jun 27, 2018
Update functions names

Fix #178
Repository owner deleted a comment Aug 3, 2018
Repository owner deleted a comment Aug 3, 2018
@rajanvijayan
Copy link
Contributor Author

@sudar Its ready to review.

@rajanvijayan rajanvijayan assigned sudar and unassigned rajanvijayan Aug 6, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
sudar
sudar previously approved these changes Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
Repository owner deleted a comment Aug 12, 2018
@sudar sudar merged commit 382cbc6 into dev/6.0.0 Aug 12, 2018
@ghost ghost removed the In Progress Workflow Label: Current in progress label Aug 12, 2018
@sudar sudar deleted the 178-feature/delete-terms--by-postfix-prefix branch August 12, 2018 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants