Conditions | 2 |
Paths | 2 |
Total Lines | 66 |
Code Lines | 40 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
1 | <?php |
||
32 | public function render() { |
||
33 | ?> |
||
34 | <!-- Term Meta box start--> |
||
35 | <fieldset class="options"> |
||
36 | <?php |
||
37 | $taxonomies = $this->get_taxonomies(); |
||
38 | ?> |
||
39 | <h4><?php _e( 'Select the taxonomy whose term meta fields you want to delete', 'bulk-delete' ); ?></h4> |
||
40 | <table class="optiontable"> |
||
41 | <?php |
||
42 | foreach ( $taxonomies as $taxonomy ) { |
||
43 | ?> |
||
44 | <tr> |
||
45 | <td> |
||
46 | <input name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy" value = "<?php echo esc_html( $taxonomy ); ?>" type = "radio" class = "smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy"> |
||
47 | <label for="smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy"><?php echo esc_html( $taxonomy ); ?> </label> |
||
48 | </td> |
||
49 | </tr> |
||
50 | <?php |
||
51 | } |
||
52 | ?> |
||
53 | </table> |
||
54 | |||
55 | <h4><?php _e( 'Choose your term want to delete', 'bulk-delete' ); ?></h4> |
||
56 | <table class="optiontable"> |
||
57 | <tr> |
||
58 | <td> |
||
59 | <select class="enhanced-terms-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term"> |
||
60 | <option><?php _e( 'Choose Terms', 'bulk-delete' ); ?></option> |
||
61 | </select> |
||
62 | </td> |
||
63 | </tr> |
||
64 | </table> |
||
65 | |||
66 | <h4><?php _e( 'Select the term meta that you want to delete', 'bulk-delete' ); ?></h4> |
||
67 | <table class="optiontable"> |
||
68 | <tr> |
||
69 | <td> |
||
70 | <select class="enhanced-term-meta-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta"> |
||
71 | <option><?php _e( 'Choose Term Meta', 'bulk-delete' ); ?></option> |
||
72 | </select> |
||
73 | |||
74 | <select name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_option"> |
||
75 | <option value="equal"><?php _e( 'Equal to', 'bulk-delete' ); ?></option> |
||
76 | <option value="not_equal"><?php _e( 'Not equal to', 'bulk-delete' ); ?></option> |
||
77 | </select> |
||
78 | |||
79 | <input type="text" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_value" /> |
||
80 | </td> |
||
81 | </tr> |
||
82 | </table> |
||
83 | |||
84 | <?php |
||
85 | /** |
||
86 | * Add more fields to the delete term meta field form. |
||
87 | * This hook can be used to add more fields to the delete term meta field form. |
||
88 | * |
||
89 | * @since 6.0.0 |
||
90 | */ |
||
91 | do_action( 'bd_delete_term_meta_form' ); |
||
92 | ?> |
||
93 | |||
94 | </fieldset> |
||
95 | |||
96 | <p> |
||
97 | <button type="submit" name="bd_action" value="delete_meta_term" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ); ?>»</button> |
||
98 | </p> |
||
175 |