Changes between Initial Version and Version 1 of Ticket #5647, comment 3
- Timestamp:
- 05/18/2014 02:09:00 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5647, comment 3
initial v1 9 9 }}} 10 10 11 So i thought, maybe wrongly, that -1 means it's a new field and we shouldn't delete an option that doesnot exist, like it was the case in 1.9.2 for instance. 11 So i thought, maybe wrongly, that -1 means it's a new field and we shouldn't delete an option that doesnot exist, like it was the case in 1.9.2 for instance. We could alternatively check if the $options[$i]->name is not empty. 12 12 13 13 > * For `id="delete-<?php echo esc_attr( $options[$i]->id ); ?>"`, it's neater to concatenate `delete-` with the variable inside the `esc_attr()` call (similar how to you built the `href` value), e.g. `id="<?php echo esc_attr( 'delete-' . $options[$i]->id ); ?>"` 14 14 15 Yeah, i've just copied the 1.9.2 line, sorry for the shortcut. I'll work on a new patch if you think the "-1" check is the right move, we could alternatively check if the $options[$i]->name is not empty15 Yeah, i've just copied the 1.9.2 line, sorry for the shortcut. I'll work on a new patch depending on your preference about point 1 16 16 17 17 > While `[x]` is a lousy, untranslatable way of indicating a delete button (which is the fault of an old version of BP), I don't think we need to adjust that for this ticket, but we should make another ticket to go through and replace ticks/crosses with genericons or dashicons or something similar.