Viewing 3 replies - 1 through 3 (of 3 total)
  • In fact, the plugin needs a few improvements as default values for arrays, compact these arrays…
    but, in this case and in a quickly way, line 200 change by this:

    if ( !empty($identifiers[$i]['text']) )
    	$footnotes[$identifiers[$i]['use_footnote']]['text']	= $identifiers[$i]['text'];
    if ( !empty($identifiers[$i]['symbol']) )
    	$footnotes[$identifiers[$i]['use_footnote']]['symbol']	= $identifiers[$i]['symbol'];

    ??

    And… a new small code improvement (right after):
    Change this redundant and innecessary code:

    // Footnotes and identifiers are stored in the array
    $use_full_link		= false;
    if ( is_feed() ) $use_full_link	= true;
    if ( is_preview() ) $use_full_link = false;

    $use_full_link is set to false except if is_feed(), we dont’t need set to false, again, if is_preview().
    So, set allways to false and true if is_feed():

    // Footnotes and identifiers are stored in the array
    $use_full_link		= (bool) is_feed() ? true : false;

    or more strict:

    // Footnotes and identifiers are stored in the array
    $use_full_link		= (bool) !is_feed() ? false : true;

    More improvements, 2 internal – private helpers _getLinkFormat() for links and _getCurrentOption():
    https://pastebin.com/TVNgrM7W

    More (perfomance): We don’t need call extra functions in each instance of loop for static values as permalink…

    Near line 208:
    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP-Footnotes] Undefined index: symbol’ is closed to new replies.