| Conditions | 1 |
| Paths | 1 |
| Total Lines | 61 |
| Code Lines | 38 |
| 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 |
||
| 30 | public function render() { |
||
| 31 | ?> |
||
| 32 | <!-- User Meta box start--> |
||
| 33 | <fieldset class="options"> |
||
| 34 | <h4><?php _e( 'Select the user role whose user meta fields you want to delete', 'bulk-delete' ); ?></h4> |
||
| 35 | |||
| 36 | <table class="optiontable"> |
||
| 37 | <?php $this->render_user_role_dropdown(); ?> |
||
| 38 | </table> |
||
| 39 | |||
| 40 | <h4><?php _e( 'Choose your user meta field settings', 'bulk-delete' ); ?></h4> |
||
| 41 | <table class="optiontable"> |
||
| 42 | <tr> |
||
| 43 | <td> |
||
| 44 | <input name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_use_value" value="false" type="radio" checked> |
||
| 45 | <label for="smbd_<?php echo esc_attr( $this->field_slug ); ?>_use_value"><?php echo __( 'Delete based on user meta key name only', 'bulk-delete' ); ?></label> |
||
| 46 | </td> |
||
| 47 | </tr> |
||
| 48 | |||
| 49 | <tr> |
||
| 50 | <td> |
||
| 51 | <input name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_use_value" id="smbd_<?php echo esc_attr( $this->field_slug ); ?>_use_value" |
||
| 52 | value="true" type="radio" disabled> |
||
| 53 | <label for="smbd_<?php echo esc_attr( $this->field_slug ); ?>_use_value"><?php echo __( 'Delete based on user meta key name and value', 'bulk-delete' ); ?></label> |
||
| 54 | <span class="bd-um-pro" style="color:red; vertical-align: middle;"> |
||
| 55 | <?php _e( 'Only available in Pro Addon', 'bulk-delete' ); ?> |
||
| 56 | <a href="http://bulkwp.com/addons/bulk-delete-user-meta/?utm_source=wpadmin&utm_campaign=BulkDelete&utm_medium=buynow&utm_content=bd-m-u" target="_blank">Buy now</a> |
||
| 57 | </span> |
||
| 58 | </td> |
||
| 59 | </tr> |
||
| 60 | |||
| 61 | <tr> |
||
| 62 | <td> |
||
| 63 | <label for="smbd_<?php echo esc_attr( $this->field_slug ); ?>_key"><?php _e( 'User Meta Key ', 'bulk-delete' ); ?></label> |
||
| 64 | <input name="smbd_<?php echo esc_attr( $this->field_slug ); ?>_key" id="smbd_<?php echo esc_attr( $this->field_slug ); ?>_key" placeholder="<?php _e( 'Meta Key', 'bulk-delete' ); ?>"> |
||
| 65 | </td> |
||
| 66 | </tr> |
||
| 67 | </table> |
||
| 68 | <?php |
||
| 69 | /** |
||
| 70 | * Add more fields to the delete user meta field form. |
||
| 71 | * This hook can be used to add more fields to the delete user meta field form. |
||
| 72 | * |
||
| 73 | * @since 5.4 |
||
| 74 | */ |
||
| 75 | do_action( 'bd_delete_user_meta_form' ); |
||
| 76 | ?> |
||
| 77 | <table class="optiontable"> |
||
| 78 | <tr> |
||
| 79 | <td colspan="2"> |
||
| 80 | <h4><?php _e( 'Choose your deletion options', 'bulk-delete' ); ?></h4> |
||
| 81 | </td> |
||
| 82 | </tr> |
||
| 83 | |||
| 84 | <?php $this->render_limit_settings(); ?> |
||
| 85 | <?php $this->render_cron_settings(); ?> |
||
| 86 | </table> |
||
| 87 | </fieldset> |
||
| 88 | |||
| 89 | <?php $this->render_submit_button(); ?> |
||
| 90 | <!-- User Meta box end--> |
||
| 91 | <?php |
||
| 162 |