Conditions | 1 |
Paths | 1 |
Total Lines | 56 |
Code Lines | 30 |
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 | <h4><?php _e( 'Select the taxonomy whose term meta fields you want to delete', 'bulk-delete' ); ?></h4> |
||
37 | <table class="optiontable"> |
||
38 | <tr> |
||
39 | <td> |
||
40 | <?php $this->render_taxonomy_dropdown(); ?> |
||
41 | </td> |
||
42 | </tr> |
||
43 | </table> |
||
44 | |||
45 | <h4><?php _e( 'Choose your term want to delete', 'bulk-delete' ); ?></h4> |
||
46 | <table class="optiontable"> |
||
47 | <tr> |
||
48 | <td> |
||
49 | <select class="enhanced-terms-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term"> |
||
50 | <option><?php _e( 'Choose Terms', 'bulk-delete' ); ?></option> |
||
51 | </select> |
||
52 | </td> |
||
53 | </tr> |
||
54 | </table> |
||
55 | |||
56 | <h4><?php _e( 'Select the term meta that you want to delete', 'bulk-delete' ); ?></h4> |
||
57 | <table class="optiontable"> |
||
58 | <tr> |
||
59 | <td> |
||
60 | <select class="enhanced-term-meta-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta"> |
||
61 | <option><?php _e( 'Choose Term Meta', 'bulk-delete' ); ?></option> |
||
62 | </select> |
||
63 | |||
64 | <select name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_option"> |
||
65 | <option value="equal"><?php _e( 'Equal to', 'bulk-delete' ); ?></option> |
||
66 | <option value="not_equal"><?php _e( 'Not equal to', 'bulk-delete' ); ?></option> |
||
67 | </select> |
||
68 | |||
69 | <input type="text" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_value" /> |
||
70 | </td> |
||
71 | </tr> |
||
72 | </table> |
||
73 | |||
74 | <?php |
||
75 | /** |
||
76 | * Add more fields to the delete term meta field form. |
||
77 | * This hook can be used to add more fields to the delete term meta field form. |
||
78 | * |
||
79 | * @since 6.0.0 |
||
80 | */ |
||
81 | do_action( 'bd_delete_term_meta_form' ); |
||
82 | ?> |
||
83 | |||
84 | </fieldset> |
||
85 | |||
86 | <?php $this->render_submit_button(); ?> |
||
87 | |||
88 | <!-- Term Meta box end--> |
||
168 |