-
Notifications
You must be signed in to change notification settings - Fork 7
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
178 feature/delete terms by postfix prefix #332
Conversation
Apply fixes from StyleCI
Apply fixes from StyleCI
Change if to switch
Add Module for delete term by count Fix #178
Apply fixes from StyleCI
…tfix-prefix' into 178-feature/delete-terms--by-postfix-prefix
Apply fixes from StyleCI
Apply fixes from StyleCI
$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'; |
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.
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>', |
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.
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'; |
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.
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'; |
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.
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'; |
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.
Change this to terms_by_post_count
class DeleteTermsByPostfixAndPrefixModule extends TermsModule { | ||
protected function initialize() { | ||
$this->item_type = 'terms'; | ||
$this->field_slug = 'by_name'; |
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.
Do all the changes that I have specified in the DeleteTermsByPostCountModule
|
||
<table class="optiontable"> | ||
<?php | ||
// $this->render_have_post_settings(); // TODO |
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.
Remove commented code.
break; | ||
|
||
case 'starts': | ||
$term_ids = $this->bd_term_starts( $term_text , $options ); |
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.
Remove bd_
prefix from all the methods.
include/Core/Terms/TermsModule.php
Outdated
return $count; | ||
} | ||
|
||
protected function bd_starts_with($haystack, $needle){ |
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.
Write phpdoc for all the helper functions.
include/util/query.php
Outdated
* | ||
* @return array Result array | ||
*/ | ||
function bd_term_query( $options, $taxonomy ) { |
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.
Move this function to TermsModule
class.
@rajanit2000 I have left a couple of review comments for this branch. I have also merged latest |
Update functions names Fix #178
@sudar Its ready to review. |
Has code for the following issues.
Fix #177
Fix #348
Fix #178
Fix #349
Delete Terms based on Post Count
Delete Terms based on Name