Conditions | 2 |
Paths | 2 |
Total Lines | 66 |
Code Lines | 36 |
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 |
||
34 | public function render() { |
||
35 | ?> |
||
36 | <!-- Term Meta box start--> |
||
37 | <fieldset class="options"> |
||
38 | <?php |
||
39 | $taxonomies = $this->get_taxonomies(); |
||
40 | ?> |
||
41 | <h4><?php _e( 'Select the taxonomy whose term meta fields you want to delete', 'bulk-delete' ); ?></h4> |
||
42 | <table class="optiontable"> |
||
43 | <?php |
||
44 | foreach ( $taxonomies as $taxonomy ) { |
||
45 | ?> |
||
46 | <tr> |
||
47 | <td> |
||
48 | <input name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy" value = "<?php echo $taxonomy; ?>" type = "radio" class = "smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy"> |
||
49 | <label for="smbd_<?php echo esc_attr( $this->field_slug ); ?>_taxonomy"><?php echo $taxonomy; ?> </label> |
||
50 | </td> |
||
51 | </tr> |
||
52 | <?php |
||
53 | } |
||
54 | ?> |
||
55 | </table> |
||
56 | |||
57 | <h4><?php _e( 'Choose your term want to delete', 'bulk-delete' ); ?></h4> |
||
58 | <table class="optiontable"> |
||
59 | <tr> |
||
60 | <td> |
||
61 | <select class="select2 select2-terms" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term"> |
||
62 | <option>Choose Terms</option> |
||
63 | </select> |
||
64 | </td> |
||
65 | </tr> |
||
66 | </table> |
||
67 | |||
68 | <h4><?php _e( 'Choose your term meta want to delete', 'bulk-delete' ); ?></h4> |
||
69 | <table class="optiontable"> |
||
70 | <tr> |
||
71 | <td> |
||
72 | <select class="select2 select2-term-meta" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta"> |
||
73 | <option>Choose Term Meta</option> |
||
74 | </select> |
||
75 | |||
76 | <select name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_option"> |
||
77 | <option value="equal">Equal to</option> |
||
78 | <option value="not_equal">Not equal to</option> |
||
79 | </select> |
||
80 | |||
81 | <input type="text" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term_meta_value" /> |
||
82 | </td> |
||
83 | </tr> |
||
84 | </table> |
||
85 | |||
86 | <?php |
||
87 | /** |
||
88 | * Add more fields to the delete post meta field form. |
||
89 | * This hook can be used to add more fields to the delete post meta field form. |
||
90 | * |
||
91 | * @since 5.4 |
||
92 | */ |
||
93 | do_action( 'bd_delete_post_meta_form' ); |
||
94 | ?> |
||
95 | |||
96 | </fieldset> |
||
97 | |||
98 | <p> |
||
99 | <button type="submit" name="bd_action" value="delete_meta_term" class="button-primary"><?php _e( 'Bulk Delete ', 'bulk-delete' ); ?>»</button> |
||
100 | </p> |
||
177 |