This repository was archived by the owner on Aug 27, 2018. It is now read-only.
Description
<input type="hidden" id="webpush_icon_custom" name="webpush_icon_custom" value="<?php echo $ icon_url ; ?> " />
Notice: Undefined variable: icon_url in ...plugins/web-push/wp-web-push-admin.php on line 567
If I'm not going wrong it can be fixed like so:
<input type="hidden" id="webpush_icon_custom" name="webpush_icon_custom" value="<?php echo $icon_option !== 'blog_icon' && $icon_option !== '' && $icon_option !== 'post_icon' ? $icon_option : ''; ?>" />
Or if it's better to be consistent with the options method at lines 311-314:
$ icon_url = '' ;
if ($ icon_option !== 'blog_icon ' && $ icon_option !== '' && $ icon_option !== 'post_icon ' ) {
$ icon_url = $ icon_option ;
}
...adding the same $icon_url definition to the tools method, maybe at line 533:
$ title_option = get_option ('webpush_title ' );
$ icon_option = get_option ('webpush_icon ' );
Note also that the options method - at line 360 - , and eventually the tools method implementing the same treatment of $icon_url - at line 566 - could be changed from:
<label><input type="radio" name="webpush_icon" value="custom" <?php echo $ icon_option !== 'blog_icon ' && $ icon_option !== '' && $ icon_option !== 'post_icon ' ? 'checked ' : '' ; ?> /> <?php _e ('Custom: ' ); ?> </label>
and:
<label><input type="radio" name="webpush_icon" value="custom" <?php echo $ icon_option !== 'blog_icon ' && $ icon_option !== '' && $ icon_option !== 'post_icon ' ? 'checked ' : '' ; ?> /> <?php _e ('Custom: ' ); ?> </label>
to:
<label><input type="radio" name="webpush_icon" value="custom" <?php echo $icon_url ? 'checked' : ''; ?> /> <?php _e('Custom:'); ?></label>
Reactions are currently unavailable
wp-web-push/wp-web-push/wp-web-push-admin.php
Line 567 in fcfde51
Notice: Undefined variable: icon_url in ...plugins/web-push/wp-web-push-admin.php on line 567If I'm not going wrong it can be fixed like so:
<input type="hidden" id="webpush_icon_custom" name="webpush_icon_custom" value="<?php echo $icon_option !== 'blog_icon' && $icon_option !== '' && $icon_option !== 'post_icon' ? $icon_option : ''; ?>" />Or if it's better to be consistent with the
optionsmethod at lines 311-314:wp-web-push/wp-web-push/wp-web-push-admin.php
Lines 311 to 314 in fcfde51
...adding the same
$icon_urldefinition to thetoolsmethod, maybe at line 533:wp-web-push/wp-web-push/wp-web-push-admin.php
Lines 531 to 533 in fcfde51
Note also that the
optionsmethod - at line 360 - , and eventually thetoolsmethod implementing the same treatment of$icon_url- at line 566 - could be changed from:wp-web-push/wp-web-push/wp-web-push-admin.php
Line 360 in fcfde51
and:
wp-web-push/wp-web-push/wp-web-push-admin.php
Line 566 in fcfde51
to:
<label><input type="radio" name="webpush_icon" value="custom" <?php echo $icon_url ? 'checked' : ''; ?> /> <?php _e('Custom:'); ?></label>