Change Variable fix
-
Right after line 50 you need to add add the following:
$img = '';
Plugin throws errors because $img only shows on versions less than 3.8 so it never gets defined on versions greater than 3.8, but is called regardless. Adding an empty array should be an ok quick fix.
So it should go something like this:
if (floatval($wp_ver) >= 3.8) { $title = '<span class="ab-icon"></span><span class="ab-label">Edit Pages</span>'; $img = ''; } else { $title = '<span class="ab-icon"><img src="'. BS_ABEP_PATH . '/images/edit-page-icon.png" /></span><span class="ab-label">Edit Pages</span>'; $img = '_no_dashicon'; }
Alternatives could be to wrap the whole if then in a function, return the content instead of using variables and then just call the function directly. Isset would work too, but the method above seems like the easiest/quickest.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change Variable fix’ is closed to new replies.