| Conditions | 1 |
| Paths | 1 |
| Total Lines | 53 |
| Code Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 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 |
||
| 33 | public function render() { |
||
| 34 | ?> |
||
| 35 | <!-- Term Meta box start--> |
||
| 36 | <fieldset class="options"> |
||
| 37 | <h4><?php _e( 'Select the taxonomy from which you want to delete term meta fields', 'bulk-delete' ); ?></h4> |
||
| 38 | <table class="optiontable"> |
||
| 39 | <tr> |
||
| 40 | <td> |
||
| 41 | <?php $this->render_taxonomy_dropdown(); ?> |
||
| 42 | </td> |
||
| 43 | </tr> |
||
| 44 | </table> |
||
| 45 | |||
| 46 | <h4><?php _e( 'Select the taxonomy term from which you want to delete term meta fields', 'bulk-delete' ); ?></h4> |
||
| 47 | <table class="optiontable"> |
||
| 48 | <tr> |
||
| 49 | <td> |
||
| 50 | <select class="enhanced-terms-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_term"> |
||
| 51 | <option value="0"><?php _e( 'Select Term', 'bulk-delete' ); ?></option> |
||
| 52 | </select> |
||
| 53 | </td> |
||
| 54 | </tr> |
||
| 55 | </table> |
||
| 56 | |||
| 57 | <h4><?php _e( 'Select the term meta that you want to delete', 'bulk-delete' ); ?></h4> |
||
| 58 | <table class="optiontable"> |
||
| 59 | <tr> |
||
| 60 | <td> |
||
| 61 | <select class="enhanced-term-meta-dropdown" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_key"> |
||
| 62 | <option value="0"><?php _e( 'Select Term Meta Key', 'bulk-delete' ); ?></option> |
||
| 63 | </select> |
||
| 64 | |||
| 65 | <?php $this->render_string_operators_dropdown( 'string', array( '=', '!=' ) ); ?> |
||
| 66 | |||
| 67 | <input type="text" name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_value" placeholder="<?php esc_attr_e( 'Term Meta Value', 'bulk-delete' ); ?>"> |
||
| 68 | </td> |
||
| 69 | </tr> |
||
| 70 | </table> |
||
| 71 | |||
| 72 | <?php |
||
| 73 | /** |
||
| 74 | * Add more fields to the delete term meta field form. |
||
| 75 | * This hook can be used to add more fields to the delete term meta field form. |
||
| 76 | * |
||
| 77 | * @since 6.1.0 |
||
| 78 | */ |
||
| 79 | do_action( 'bd_delete_term_meta_form' ); |
||
| 80 | ?> |
||
| 81 | |||
| 82 | </fieldset> |
||
| 83 | |||
| 84 | <?php $this->render_submit_button(); ?> |
||
| 85 | |||
| 86 | <!-- Term Meta box end--> |
||
| 147 |